[PATCH] D112289: Support: Use sys::path::is_style_{posix,windows}() in a few places

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 29 16:27:11 PDT 2021


dexonsmith added a comment.

In D112289#3097959 <https://reviews.llvm.org/D112289#3097959>, @thakis wrote:

> Looks like this breaks tests on windows: http://45.33.8.238/win/47971/step_7.txt
>
> Please take a look and revert for now if it takes a while to fix.

Should be fixed in 9091df5fad52ab6a281d7f4d6a508696e6f9fbae <https://reviews.llvm.org/rG9091df5fad52ab6a281d7f4d6a508696e6f9fbae>.



================
Comment at: clang/lib/Basic/FileManager.cpp:129-133
+    std::string DirNameStr;
+    if (DirName.size() > 1 && DirName.back() == ':' &&
+        DirName.equals_insensitive(llvm::sys::path::root_name(DirName))) {
+      DirNameStr = DirName.str() + '.';
+      DirName = DirNameStr;
----------------
This introduced a use-after-scope for DirNameStr. Fixed in 9091df5fad52ab6a281d7f4d6a508696e6f9fbae.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112289/new/

https://reviews.llvm.org/D112289



More information about the cfe-commits mailing list