r194969 - Remove a bad string compare from r194968
Manuel Klimek
klimek at google.com
Mon Nov 18 00:20:54 PST 2013
Wouldn't the right fix have been to s/"/'/g?
On Sun, Nov 17, 2013 at 5:49 PM, Alp Toker <alp at nuanti.com> wrote:
> 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);
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131118/bad6cc41/attachment.html>
More information about the cfe-commits
mailing list