[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Fri Mar 23 14:43:11 UTC 2018
compilerplugins/clang/includeform.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 1ed1753be26325edf3660c9b9cbd76dc0e9d36ce
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Mar 23 15:41:26 2018 +0100
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
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) {
More information about the Libreoffice-commits
mailing list