r194969 - Remove a bad string compare from r194968

Alp Toker alp at nuanti.com
Sun Nov 17 08:49:24 PST 2013


Author: alp
Date: Sun Nov 17 10:49:24 2013
New Revision: 194969

URL: http://llvm.org/viewvc/llvm-project?rev=194969&view=rev
Log:
Remove a bad string compare from r194968

  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.

Modified:
    cfe/trunk/lib/Tooling/CompilationDatabase.cpp

Modified: cfe/trunk/lib/Tooling/CompilationDatabase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/CompilationDatabase.cpp?rev=194969&r1=194968&r2=194969&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CompilationDatabase.cpp (original)
+++ cfe/trunk/lib/Tooling/CompilationDatabase.cpp Sun Nov 17 10:49:24 2013
@@ -272,7 +272,6 @@ bool stripPositionalArgs(std::vector<con
   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);





More information about the cfe-commits mailing list