driver.cpp:211: warning: ISO C++ forbids zero-size array 'argv'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89455
91177308-0d34-0410-b5e6-
96231b3b80d8
//
// Note that we intentionally want to use argv[0] here, to support "clang++"
// being a symlink.
- std::string ProgName(llvm::sys::Path(argv[0]).getBasename());
+ //
+ // We use *argv instead of argv[0] to work around a bogus g++ warning.
+ std::string ProgName(llvm::sys::Path(*argv).getBasename());
if (llvm::StringRef(ProgName).endswith("++") ||
llvm::StringRef(ProgName).rsplit('-').first.endswith("++"))
TheDriver.CCCIsCXX = true;