Kaydet (Commit) 23f439df authored tarafından Stephan Bergmann's avatar Stephan Bergmann

...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
üst 53b6a6a1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment