================
@@ -2554,16 +2554,26 @@ Decl *Parser::ParseDeclarationAfterDeclarator(
   return ParseDeclarationAfterDeclaratorAndAttributes(D, TemplateInfo);
 }
 
+static bool isConstexprVariable(const Decl *D) {
+  if (const VarDecl *Var = dyn_cast_or_null<VarDecl>(D))
----------------
cor3ntin wrote:

```suggestion
  if (const VarDecl *Var = dyn_cast<VarDecl>(D))
```
`D` can never be null here, right?
Beside I think the recommended practice would be to use `if_present` rather 
than `or_null`, the later being deprecated

https://github.com/llvm/llvm-project/pull/89565
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to