[PATCH] D69758: [Gnu toolchain] Look at standard GCC paths for libstdcxx by default

Samuel Thibault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 09:06:18 PST 2019


sthibaul marked an inline comment as done.
sthibaul added a comment.

Not sure what NFCI means, but for Linux the behavior should just not change at all, and the testsuite indeed behaved exactly the same on Linux indeed.



================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2623
+  int MaxVersion = 0;
+  std::string MaxVersionString = "";
+  for (llvm::vfs::directory_iterator LI = vfs.dir_begin(base, EC), LE;
----------------
kristina wrote:
> No need for `= ""` here.
(it's the existing code just moved to here actually)

I'm afraid that a not-that-smart compiler would complain that it could be used uninitialized below, I have seen such cases produce warnings before because the compiler was not making the connection with MaxVersion being 0. Are we confident that this will not pose problem?


Repository:
  rC Clang

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

https://reviews.llvm.org/D69758





More information about the cfe-commits mailing list