summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2015-02-25 14:42:02 +0000
committerAlexander Kornienko <alexfh@google.com>2015-02-25 14:42:02 +0000
commit4c0e4a12bd1ba0ce8af7f02dbd2dbb78af31a000 (patch)
treec7f4a2a18f7954435ba48052531db417c05fc893 /clang-tools-extra
parentb9887ef32a5d06108dfabbbe181bd8e4ea7abbfe (diff)
downloadbcm5719-llvm-4c0e4a12bd1ba0ce8af7f02dbd2dbb78af31a000.tar.gz
bcm5719-llvm-4c0e4a12bd1ba0ce8af7f02dbd2dbb78af31a000.zip
[clang-tidy] Use the new ArrayRef<FixItHint> inserter.
llvm-svn: 230497
Diffstat (limited to 'clang-tools-extra')
-rw-r--r--clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp b/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
index 535dd5c8b45..6fbc885e0a4 100644
--- a/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
+++ b/clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp
@@ -124,15 +124,12 @@ public:
// changed the header guard or not.
if (!FixIts.empty()) {
if (CurHeaderGuard != NewGuard) {
- auto D = Check->diag(Ifndef,
- "header guard does not follow preferred style");
- for (FixItHint &Fix : FixIts)
- D.AddFixItHint(std::move(Fix));
+ Check->diag(Ifndef, "header guard does not follow preferred style")
+ << FixIts;
} else {
- auto D = Check->diag(EndIf, "#endif for a header guard should "
- "reference the guard macro in a comment");
- for (FixItHint &Fix : FixIts)
- D.AddFixItHint(std::move(Fix));
+ Check->diag(EndIf, "#endif for a header guard should reference the "
+ "guard macro in a comment")
+ << FixIts;
}
}
}
OpenPOWER on IntegriCloud