[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 14:50:08 PST 2019
sthibaul marked 3 inline comments as done.
sthibaul added inline comments.
================
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:
> sthibaul wrote:
> > 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?
> `std::string` has a default constructor, but the `int` needs to be initialized. I was only referring to the string.
> std::string has a default constructor
Ah, ok. Now fixed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69758/new/
https://reviews.llvm.org/D69758
More information about the cfe-commits
mailing list