[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 11:56:31 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:
Ah good call on those already being trailing objects on `ParsedAttr`, so it's an even bigger ask than I originally was thinking. Another good reason not to go that route yet, that's likely to be a complicated patch because of how much code changes (ClangAttrEmitter.cpp, SemaDeclAttr.cpp, probably the parser as well) and because of performance concerns (would definitely need to be tested for perf changes).
https://github.com/llvm/llvm-project/pull/140233
More information about the cfe-commits
mailing list