-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] Fix null dereference on return in lambda attribute statement …
…expr (#66643) clang was crashing on a lambda attribute with a statement expression that contained a `return`. It attempted to access the lambda type which was unknown at that point. Fixes #48527
- Loading branch information
Showing
4 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// RUN: %clang_cc1 -fsyntax-only -verify %s | ||
|
||
int main() { // expected-note {{to match this '{'}} | ||
auto a = [](void)__attribute__((b(({ // expected-note {{to match this '('}} | ||
return 0; | ||
} // expected-error 3 {{expected ')'}} \ | ||
// expected-error {{expected ';' at end of declaration}} | ||
// expected-error@+2 {{expected ')'}} | ||
// expected-error@+1 {{expected body of lambda expression}} | ||
// expected-error {{expected '}'}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters