https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/181792
This diagnostic is untested and this code path should be dead. >From 1f2791337d0e9a9644425ead20854781cfeafb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <[email protected]> Date: Tue, 17 Feb 2026 10:35:44 +0100 Subject: [PATCH] [clang][ExprConst] Remove bogus diagnostic This diagnostic is untested and this code path should be dead. --- clang/include/clang/Basic/DiagnosticASTKinds.td | 6 ------ clang/lib/AST/ExprConstant.cpp | 6 ------ 2 files changed, 12 deletions(-) diff --git a/clang/include/clang/Basic/DiagnosticASTKinds.td b/clang/include/clang/Basic/DiagnosticASTKinds.td index f36c02851a6a1..bb3951157e70d 100644 --- a/clang/include/clang/Basic/DiagnosticASTKinds.td +++ b/clang/include/clang/Basic/DiagnosticASTKinds.td @@ -429,12 +429,6 @@ def note_constexpr_unscoped_enum_out_of_range : Note< "integer value %0 is outside the valid range of values [%1, %2] for the " "enumeration type %3">; -// This is a temporary diagnostic, and shall be removed once our -// implementation is complete, and like the preceding constexpr notes belongs -// in Sema. -def note_unimplemented_constexpr_lambda_feature_ast : Note< - "unimplemented constexpr lambda feature: %0 (coming soon!)">; - def warn_is_constant_evaluated_always_true_constexpr : Warning< "'%0' will always evaluate to 'true' in a manifestly constant-evaluated expression">, InGroup<DiagGroup<"constant-evaluated">>; diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 2c13befec02f2..26d4f5afb7603 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -3373,12 +3373,6 @@ static bool evaluateVarDeclInit(EvalInfo &Info, const Expr *E, "missing value for local variable"); if (Info.checkingPotentialConstantExpression()) return false; - // FIXME: This diagnostic is bogus; we do support captures. Is this code - // still reachable at all? - Info.FFDiag(E->getBeginLoc(), - diag::note_unimplemented_constexpr_lambda_feature_ast) - << "captures not currently allowed"; - return false; } } _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
