[clang] [C23] Fix typeof handling in enum declarations (PR #146394)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 2 11:57:13 PDT 2025


================
@@ -2850,7 +2870,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
              isFoldOperator(NextToken().getKind())) {
     ExprType = ParenParseOption::FoldExpr;
     return ParseFoldExpression(ExprResult(), T);
-  } else if (isTypeCast) {
+  } else if (CorrectionBehavior == TypoCorrectionTypeBehavior::AllowTypes) {
+    // FIXME: This should not be predicated on typo correction behavior.
----------------
Sirraide wrote:

Not surprised that that happened given the name of the enum...

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


More information about the cfe-commits mailing list