diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-02-25 14:40:56 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-02-25 14:40:56 +0000 |
commit | a9b01eb77641cce46dcc69bce27635a72187a89c (patch) | |
tree | 8504083b0bd14afe7e2452999e5220a7ffff34fd /clang/lib | |
parent | c9c7a3e4e563696b0dd40accdc7be1bcbdc97ccf (diff) | |
download | bcm5719-llvm-a9b01eb77641cce46dcc69bce27635a72187a89c.tar.gz bcm5719-llvm-a9b01eb77641cce46dcc69bce27635a72187a89c.zip |
Add support for inserting ArrayRef<FixItHint> into DiagnosticBuilder.
This is going to be needed in clang-tidy as more checks add complex fixits.
llvm-svn: 230495
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index c26ba3cf9bb..409a1b6ebd5 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -3152,10 +3152,7 @@ void CheckFormatHandler::EmitFormatDiagnostic(Sema &S, bool InFunctionCall, if (InFunctionCall) { const Sema::SemaDiagnosticBuilder &D = S.Diag(Loc, PDiag); D << StringRange; - for (ArrayRef<FixItHint>::iterator I = FixIt.begin(), E = FixIt.end(); - I != E; ++I) { - D << *I; - } + D << FixIt; } else { S.Diag(IsStringLocation ? ArgumentExpr->getExprLoc() : Loc, PDiag) << ArgumentExpr->getSourceRange(); @@ -3165,10 +3162,7 @@ void CheckFormatHandler::EmitFormatDiagnostic(Sema &S, bool InFunctionCall, diag::note_format_string_defined); Note << StringRange; - for (ArrayRef<FixItHint>::iterator I = FixIt.begin(), E = FixIt.end(); - I != E; ++I) { - Note << *I; - } + Note << FixIt; } } |