diff options
| author | Ted Kremenek <kremenek@apple.com> | 2010-04-09 20:26:53 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2010-04-09 20:26:53 +0000 |
| commit | 800b66be9d47e9671f5b83eb99324a6d6c391c48 (patch) | |
| tree | 43b761c26cafff116597ba6084c8a6775c8017e6 /clang/lib/Sema/SemaExpr.cpp | |
| parent | bfe98e644be6df1704fa1b30877153adf904998f (diff) | |
| download | bcm5719-llvm-800b66be9d47e9671f5b83eb99324a6d6c391c48.tar.gz bcm5719-llvm-800b66be9d47e9671f5b83eb99324a6d6c391c48.zip | |
Remove fixit for string literal comparison. Telling the user to use 'strcmp' is bad, and
we don't have enough information to tell them how to use 'strncmp'. Instead, change the
diagnostic to indicate they should use 'strncmp'.
llvm-svn: 100890
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 654b2204995..6820449e1c8 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -5402,11 +5402,7 @@ QualType Sema::CheckCompareOperands(Expr *&lex, Expr *&rex, SourceLocation Loc, DiagRuntimeBehavior(Loc, PDiag(diag::warn_stringcompare) << isa<ObjCEncodeExpr>(literalStringStripped) - << literalString->getSourceRange() - << FixItHint::CreateReplacement(SourceRange(Loc), ", ") - << FixItHint::CreateInsertion(lex->getLocStart(), "strcmp(") - << FixItHint::CreateInsertion(PP.getLocForEndOfToken(rex->getLocEnd()), - resultComparison)); + << literalString->getSourceRange()); } } |

