[clang-tools-extra] [clang-tidy] ignore `[[clang::lifetimebound]]` param in return-const-ref-from-parameter (PR #118315)

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 14:29:49 PST 2024


================
@@ -15,14 +16,23 @@ using namespace clang::ast_matchers;
 
 namespace clang::tidy::bugprone {
 
+namespace {
+
+AST_MATCHER(ParmVarDecl, hasLifetimeBoundAttr) {
+  return Node.getAttr<LifetimeBoundAttr>() != nullptr;
----------------
5chmidti wrote:

nit: `Node.hasAttr<LifetimeBoundAttr>()`

https://github.com/llvm/llvm-project/pull/118315


More information about the cfe-commits mailing list