aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2020-09-28 14:58:27 +0200
committerAlexander Kornienko <alexfh@google.com>2020-09-28 15:14:04 +0200
commitfdfe324da195ebd9b9c691f006b0d6ccc64365e1 (patch)
tree8a988f4243a347fb0c968cc26af8fd036389ccef /clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
parentbf890dcb0f5eb05b1a98cbd1cdd24c0c4ece8f8d (diff)
downloadllvm-fdfe324da195ebd9b9c691f006b0d6ccc64365e1.zip
llvm-fdfe324da195ebd9b9c691f006b0d6ccc64365e1.tar.gz
llvm-fdfe324da195ebd9b9c691f006b0d6ccc64365e1.tar.bz2
[clang-tidy] IncludeInserter: allow <> in header name
This adds a pair of overloads for create(MainFile)?IncludeInsertion methods that use the presence of the <> in the file name to control whether the #include directive will use angle brackets or quotes. Motivating examples: https://reviews.llvm.org/D82089#inline-789412 and https://github.com/llvm/llvm-project/blob/master/clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp#L433 The overloads with the IsAngled parameter can be removed after the users are updated. Update usages of createIncludeInsertion. Update (almost all) usages of createMainFileIncludeInsertion. Reviewed By: hokein Differential Revision: https://reviews.llvm.org/D85666
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
index 9aef5a8..12fb2f5 100644
--- a/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/UnnecessaryValueParamCheck.cpp
@@ -203,8 +203,7 @@ void UnnecessaryValueParamCheck::handleMoveFix(const ParmVarDecl &Var,
Diag << FixItHint::CreateInsertion(CopyArgument.getBeginLoc(), "std::move(")
<< FixItHint::CreateInsertion(EndLoc, ")")
<< Inserter.createIncludeInsertion(
- SM.getFileID(CopyArgument.getBeginLoc()), "utility",
- /*IsAngled=*/true);
+ SM.getFileID(CopyArgument.getBeginLoc()), "<utility>");
}
} // namespace performance