From 4c0e4a12bd1ba0ce8af7f02dbd2dbb78af31a000 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Wed, 25 Feb 2015 14:42:02 +0000 Subject: [clang-tidy] Use the new ArrayRef inserter. llvm-svn: 230497 --- clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'clang-tools-extra/clang-tidy/utils/HeaderGuard.cpp') 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; } } } -- cgit v1.2.3