]> granicus.if.org Git - clang/commitdiff
Fixed a bad assert from r194968. r194969 removed the assert.
authorRichard Trieu <rtrieu@google.com>
Thu, 5 Dec 2013 04:27:16 +0000 (04:27 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 5 Dec 2013 04:27:16 +0000 (04:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196463 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Tooling/CompilationDatabase.cpp

index c962055de795a0702a979660cc51159998436624..286beb7ae2689249148bf5b7924bbd7f8f8ab376 100644 (file)
@@ -271,6 +271,7 @@ 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(strcmp(*(End - 1), "-c") == 0);
   --End;
 
   Result = std::vector<std::string>(Args.begin() + 1, End);