]> granicus.if.org Git - clang/commitdiff
Remove a bad string compare from r194968
authorAlp Toker <alp@nuanti.com>
Sun, 17 Nov 2013 16:49:24 +0000 (16:49 +0000)
committerAlp Toker <alp@nuanti.com>
Sun, 17 Nov 2013 16:49:24 +0000 (16:49 +0000)
  lib/Tooling/CompilationDatabase.cpp:275:34: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare]

This assert() should probably be fixed and added back at some point.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194969 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/CompilationDatabase.cpp

index 37e0027246adbf9ea7ffcde821c4eec6b65bed3c..52452e7c6ea22ae5265c4ccf02ca9a71b3f8cc0d 100644 (file)
@@ -272,7 +272,6 @@ bool stripPositionalArgs(std::vector<const char *> Args,
   End = std::remove_if(Args.begin(), End, MatchesAny(DiagClient.UnusedInputs));
 
   // Remove the -c add above as well. It will be at the end right now.
-  assert(*(End - 1) == "-c");
   --End;
 
   Result = std::vector<std::string>(Args.begin() + 1, End);