[clang-tidy] Use the new ArrayRef<FixItHint> inserter.

llvm-svn: 230497
This commit is contained in:
Alexander Kornienko 2015-02-25 14:42:02 +00:00
parent b9887ef32a
commit 4c0e4a12bd
1 changed files with 5 additions and 8 deletions

View File

@ -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;
}
}
}