https://github.com/Glitch-On updated https://github.com/llvm/llvm-project/pull/224855
>From a861f94320fb8f43e9f57339a112a94325afa2cc Mon Sep 17 00:00:00 2001 From: Vansh <[email protected]> Date: Sun, 20 Sep 2026 01:09:23 +0530 Subject: [PATCH] [clang][test] Add regression test for invalid 'int decltype {}' The parser crash on this input was fixed by #211221, which only added tests for the '= 0' forms. Add the brace-init form reported in the issue. Fixes #165246 --- clang/test/Parser/decltype-crash.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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}} _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
