llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Demo_mod (Glitch-On)

<details>
<summary>Changes</summary>

The parser crash on `int decltype {}` was fixed by #<!-- -->211221, but the 
test it added only covers the `= 0` forms. Add the brace-init form reported in 
the issue.

Fixes #<!-- -->165246

---
Full diff: https://github.com/llvm/llvm-project/pull/224855.diff


1 Files Affected:

- (modified) clang/test/Parser/decltype-crash.cpp (+5) 


``````````diff
diff --git a/clang/test/Parser/decltype-crash.cpp 
b/clang/test/Parser/decltype-crash.cpp
index af4622df5e54a..8471309665f1d 100644
--- a/clang/test/Parser/decltype-crash.cpp
+++ b/clang/test/Parser/decltype-crash.cpp
@@ -13,3 +13,8 @@ int decltype = 0;
 int *decltype = 0;
 // expected-error@-1 {{expected '(' after 'decltype'}}
 // expected-error@-2 {{expected unqualified-id}}
+
+// GH165246
+int decltype {};
+// expected-error@-1 {{expected '(' after 'decltype'}}
+// expected-error@-2 {{expected unqualified-id}}

``````````

</details>


https://github.com/llvm/llvm-project/pull/224855
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to