[clang] [Clang] handle invalid close location in static assert declaration (PR #108701)

Oleksandr T. via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 14 09:28:39 PDT 2024


================
@@ -1110,6 +1110,8 @@ Decl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd) {
   }
 
   T.consumeClose();
+  if (T.getCloseLocation().isInvalid())
+    return nullptr;
----------------
a-tarasyuk wrote:

@cor3ntin Thanks for the review. I've added changes to omit redundant checks.

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


More information about the cfe-commits mailing list