aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
index d26480f..7c90130 100644
--- a/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/FasterStringFindCheck.cpp
@@ -17,9 +17,8 @@ using namespace clang::ast_matchers;
namespace clang::tidy::performance {
-namespace {
-
-std::optional<std::string> makeCharacterLiteral(const StringLiteral *Literal) {
+static std::optional<std::string>
+makeCharacterLiteral(const StringLiteral *Literal) {
std::string Result;
{
llvm::raw_string_ostream OS(Result);
@@ -43,6 +42,8 @@ std::optional<std::string> makeCharacterLiteral(const StringLiteral *Literal) {
return Result;
}
+namespace {
+
AST_MATCHER_FUNCTION(ast_matchers::internal::Matcher<Expr>,
hasSubstitutedType) {
return hasType(qualType(anyOf(substTemplateTypeParmType(),