r196463 - Fixed a bad assert from r194968. r194969 removed the assert.

Richard Trieu rtrieu at google.com
Wed Dec 4 20:27:16 PST 2013


Author: rtrieu
Date: Wed Dec  4 22:27:16 2013
New Revision: 196463

URL: http://llvm.org/viewvc/llvm-project?rev=196463&view=rev
Log:
Fixed a bad assert from r194968.  r194969 removed the assert.

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=196463&r1=196462&r2=196463&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/CompilationDatabase.cpp (original)
+++ cfe/trunk/lib/Tooling/CompilationDatabase.cpp Wed Dec  4 22:27:16 2013
@@ -271,6 +271,7 @@ 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(strcmp(*(End - 1), "-c") == 0);
   --End;
 
   Result = std::vector<std::string>(Args.begin() + 1, End);





More information about the cfe-commits mailing list