-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Open
Labels
c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party
Description
/* a.cpp */
int open() { return 0; }
void close(decltype(open()) *) {}
int main() {
auto fd [[gnu::cleanup(close)]] = open();
}$ clang-21 a.cpp
a.cpp:4:26: error: 'cleanup' function 'close' parameter has type 'decltype(open()) *' (aka 'int *') which is incompatible with type 'auto *'
4 | auto fd [[gnu::cleanup(close)]] = open();
| ^
1 error generated.I built Clang in the main branch when its HEAD is commit cb7030dbe7f3f1947c31b3059958ff3968cc22ff
cd-86 and shynur
Metadata
Metadata
Assignees
Labels
c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second party