[clang] Gh165246 decltype brace init test (PR #231021)

via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 11 11:41:27 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Demo_mod (Glitch-On)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/231021.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 at -1 {{expected '(' after 'decltype'}}
 // expected-error at -2 {{expected unqualified-id}}
+
+// GH165246
+int decltype {};
+// expected-error at -1 {{expected '(' after 'decltype'}}
+// expected-error at -2 {{expected unqualified-id}}

``````````

</details>


https://github.com/llvm/llvm-project/pull/231021


More information about the cfe-commits mailing list