[PATCH] D152180: [Sema] Do not emit -Wunused-variable for variables declared with cleanup attribute

2023-06-05 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I note I forgot to require a release note, so please add one of those (and make sure it gets incorporated in any cherry-pick that happens). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152180/new/ https://reviews.llvm.

[PATCH] D152180: [Sema] Do not emit -Wunused-variable for variables declared with cleanup attribute

2023-06-05 Thread Nathan Chancellor via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG877210faa447: [Sema] Do not emit -Wunused-variable for variables declared with cleanup… (authored by nathanchance). Repository: rG LLVM Github Mon

[PATCH] D152180: [Sema] Do not emit -Wunused-variable for variables declared with cleanup attribute

2023-06-05 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance updated this revision to Diff 528510. nathanchance added a comment. Change `f4()`'s return type to `void` (Nick) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152180/new/ https://reviews.llvm.org/D152180 Files: clang/lib/Sema/SemaDecl.cpp clang/test/Sema/warn-unused-va

[PATCH] D152180: [Sema] Do not emit -Wunused-variable for variables declared with cleanup attribute

2023-06-05 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. Thanks for the patch! Comment at: clang/test/Sema/warn-unused-variables.c:35 +void c1(int *); +int f4(void) { + int __attribute__((cleanup(c1))) X1 = 4; `void` return type Repository:

[PATCH] D152180: [Sema] Do not emit -Wunused-variable for variables declared with cleanup attribute

2023-06-05 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance created this revision. nathanchance added reviewers: aaron.ballman, nickdesaulniers, erichkeane. Herald added a project: All. nathanchance requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. A variable declared with `__attribute__(