[clang] Don't wrap immediate invocations in ConstantExprs within constexpr initializers (PR #89565)
Daniel M. Katz via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 22 10:34:36 PDT 2024
================
@@ -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))
----------------
katzdm wrote:
@cor3ntin I take it back - I think this can be null during certain error codepaths (I got some crashes in a handful of tests when I changed to `dyn_cast`). Going to use `dyn_cast_if_present` instead.
https://github.com/llvm/llvm-project/pull/89565
More information about the cfe-commits
mailing list