diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-13 22:18:37 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-04-13 22:18:37 +0000 |
| commit | 38675543c578d60de3702881bbfcc8f7813018ee (patch) | |
| tree | ac060944cd02da68b861307e90517bf611abfb6f /clang/lib/Sema | |
| parent | d0fb04f4372c3fdb86bcb5f4fccfa720f17d8114 (diff) | |
| download | bcm5719-llvm-38675543c578d60de3702881bbfcc8f7813018ee.tar.gz bcm5719-llvm-38675543c578d60de3702881bbfcc8f7813018ee.zip | |
Issue the 2nd fixit even if fix-it hint is supressed.
// rdar://9091893
llvm-svn: 129481
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 3d2b14933e2..ac1128b361d 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -10081,12 +10081,11 @@ void Sema::DiagnoseAssignmentAsCondition(Expr *E) { SourceLocation Open = E->getSourceRange().getBegin(); SourceLocation Close = E->getSourceRange().getEnd(); - if (!Open.isMacroID() && !Close.isMacroID()) { - SourceLocation LocForEndOfToken = PP.getLocForEndOfToken(Close); - Diag(Loc, diag::note_condition_assign_silence) - << FixItHint::CreateInsertion(Open, "(") - << FixItHint::CreateInsertion(LocForEndOfToken, ")"); - } + SourceLocation LocForEndOfToken = + Close.isMacroID() ? Close : PP.getLocForEndOfToken(Close); + Diag(Loc, diag::note_condition_assign_silence) + << FixItHint::CreateInsertion(Open, "(") + << FixItHint::CreateInsertion(LocForEndOfToken, ")"); } /// \brief Redundant parentheses over an equality comparison can indicate |

