Skip to content

Conversation

@SimplyDanny
Copy link
Member

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Feb 3, 2024

@llvm/pr-subscribers-clang-tidy

@llvm/pr-subscribers-clang-tools-extra

Author: Danny Mösch (SimplyDanny)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/80537.diff

1 Files Affected:

  • (modified) clang-tools-extra/clang-tidy/add_new_check.py (+1-2)
diff --git a/clang-tools-extra/clang-tidy/add_new_check.py b/clang-tools-extra/clang-tidy/add_new_check.py index ada2ee1119cf9..a6af76809af02 100755 --- a/clang-tools-extra/clang-tidy/add_new_check.py +++ b/clang-tools-extra/clang-tidy/add_new_check.py @@ -131,7 +131,6 @@ def write_implementation(module_path, module, namespace, check_name_camel): //===----------------------------------------------------------------------===// #include "%(check_name)s.h" -#include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchFinder.h" using namespace clang::ast_matchers; @@ -146,7 +145,7 @@ def write_implementation(module_path, module, namespace, check_name_camel): void %(check_name)s::check(const MatchFinder::MatchResult &Result) { // FIXME: Add callback implementation. const auto *MatchedDecl = Result.Nodes.getNodeAs<FunctionDecl>("x"); - if (!MatchedDecl->getIdentifier() || MatchedDecl->getName().startswith("awesome_")) + if (!MatchedDecl->getIdentifier() || MatchedDecl->getName().starts_with("awesome_")) return; diag(MatchedDecl->getLocation(), "function %%0 is insufficiently awesome") << MatchedDecl 
@SimplyDanny SimplyDanny merged commit 514d069 into llvm:main Feb 3, 2024
@SimplyDanny SimplyDanny deleted the template-warnings branch February 3, 2024 12:49
agozillon pushed a commit to agozillon/llvm-project that referenced this pull request Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment