================ @@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa<BlockDecl>(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline bool hasDeclarator(const Decl *D) { + // In some sense, TypedefDecl really *ought* to be a DeclaratorDecl. + return isa<DeclaratorDecl>(D) || isa<BlockDecl>(D) || + isa<TypedefNameDecl>(D) || isa<ObjCPropertyDecl>(D); ---------------- AaronBallman wrote:
```suggestion return isa<DeclaratorDec, BlockDecl, TypedefNameDecl, ObjCPropertyDecl>(D); ``` https://github.com/llvm/llvm-project/pull/93966 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits