[clang] [clang-tools-extra] [clang-include-cleaner] Make cleanup attr report expr location (PR #140233)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon May 19 12:34:06 PDT 2025
================
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr {
def Cleanup : InheritableAttr {
let Spellings = [GCC<"cleanup">];
- let Args = [DeclArgument<Function, "FunctionDecl">];
+ let Args = [DeclArgument<Function, "FunctionDecl">,
+ ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>];
----------------
AaronBallman wrote:
Good point, we'd likely need to handle unresolved lookups and other kinds of expressions, so maybe it would take a `const Expr *` instead.
https://github.com/llvm/llvm-project/pull/140233
More information about the cfe-commits
mailing list