[clang] [Clang] prevent crash on invalid nested name specifiers with a single colon (PR #169246)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 2 13:56:58 PST 2025


================
@@ -1063,7 +1063,8 @@ Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
       return TPResult::False;
     }
 
-    if (Next.isNot(tok::coloncolon) && Next.isNot(tok::less)) {
+    if (Next.isNot(tok::coloncolon) && Next.isNot(tok::less) &&
----------------
a-tarasyuk wrote:

Thanks for your feedback, @AaronBallman. I’ve added the helper.

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


More information about the cfe-commits mailing list