summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang/includeform.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-03-23 15:41:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-03-23 15:41:26 +0100
commit1ed1753be26325edf3660c9b9cbd76dc0e9d36ce (patch)
tree112267f248a226220dffb4d280a58286ce7f60e7 /compilerplugins/clang/includeform.cxx
parentsw XHTML import: support OLE2-in-RTF objects (diff)
downloadcore-1ed1753be26325edf3660c9b9cbd76dc0e9d36ce.tar.gz
core-1ed1753be26325edf3660c9b9cbd76dc0e9d36ce.zip
Handle .. path segments in loplugin:includeform again
...after 119d8137695e38c16e9fad9f3ce8a774f58e4b9a "Revert 'Allow compiler plugins for online'", to fix cases like > In file included from vcl/unx/gtk3_kde5/gtk3_kde5_cairo.cxx:20: > vcl/unx/gtk3_kde5/../gtk3/cairo_gtk3_cairo.cxx:12:10: error: replace "..." include form with <...> for inclusion of a source file not next to the current source file, or a header, vcl/unx/gtk3/cairo_gtk3_cairo.hxx [loplugin:includeform] > #include "cairo_gtk3_cairo.hxx" > ^~~~~~~~~~~~~~~~~~~~~~ Change-Id: I12b3049862825f10834333b154c9343a3e3bec6d
Diffstat (limited to 'compilerplugins/clang/includeform.cxx')
-rw-r--r--compilerplugins/clang/includeform.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/clang/includeform.cxx b/compilerplugins/clang/includeform.cxx
index 4994e8ddd75b..becc1c028c3c 100644
--- a/compilerplugins/clang/includeform.cxx
+++ b/compilerplugins/clang/includeform.cxx
@@ -64,7 +64,8 @@ private:
pos = pos2;
}
#endif
- auto const dir = compat::take_front(file, pos);
+ auto dir = std::string(compat::take_front(file, pos));
+ loplugin::normalizeDotDotInFilePath(dir);
shouldUseAngles = !loplugin::isSamePathname(SearchPath, dir);
}
if (shouldUseAngles == IsAngled) {