diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-02-25 14:42:02 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-02-25 14:42:02 +0000 |
commit | 4c0e4a12bd1ba0ce8af7f02dbd2dbb78af31a000 (patch) | |
tree | c7f4a2a18f7954435ba48052531db417c05fc893 /clang-tools-extra | |
parent | b9887ef32a5d06108dfabbbe181bd8e4ea7abbfe (diff) | |
download | bcm5719-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.cpp | 13 |
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; } } } |