compilerplugins/clang/includeform.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
New commits: commit 23f439df05188785f7701763b3c24d8dff3df415 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Mar 23 21:15:26 2018 +0100 ...in which case .. path segments need to be resolved in SearchPath, too ...for cases like > In file included from vcl/source/outdev/hatch.cxx:32: > vcl/source/outdev/../gdi/pdfwriter_impl.hxx:47:10: error: replace "..." include form with <...> for inclusion of a source file not next to the current source file, or a header, vcl/source/outdev/../gdi/pdffontcache.hxx [loplugin:includeform] > #include "pdffontcache.hxx" > ^~~~~~~~~~~~~~~~~~ Change-Id: Ib486e0cf16a157b90f838536a15c40c2a34ef72b diff --git a/compilerplugins/clang/includeform.cxx b/compilerplugins/clang/includeform.cxx index becc1c028c3c..284b7dadccff 100644 --- a/compilerplugins/clang/includeform.cxx +++ b/compilerplugins/clang/includeform.cxx @@ -52,6 +52,8 @@ private: || loplugin::hasPathnamePrefix( SearchPath, WORKDIR "/UnpackedTarball")); } else { + auto dir1 = std::string(SearchPath); + loplugin::normalizeDotDotInFilePath(dir1); auto const file = StringRef( compiler.getSourceManager().getPresumedLoc(HashLoc) .getFilename()); @@ -64,9 +66,9 @@ private: pos = pos2; } #endif - auto dir = std::string(compat::take_front(file, pos)); - loplugin::normalizeDotDotInFilePath(dir); - shouldUseAngles = !loplugin::isSamePathname(SearchPath, dir); + auto dir2 = std::string(compat::take_front(file, pos)); + loplugin::normalizeDotDotInFilePath(dir2); + shouldUseAngles = !loplugin::isSamePathname(dir1, dir2); } if (shouldUseAngles == IsAngled) { return; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits