cor3ntin added a comment. This looks good to me modulo nitpicks. When you land that, please make an issue on github for the missing narrowing warning, it seems important.
I'll wait before approving in case @aaron.ballman spot things i missed ================ Comment at: clang/lib/Sema/SemaExpr.cpp:7089 DiagnosedUnqualifiedCallsToStdFunctions(*this, CE); + DiagnoseTautologicalIsConstantEvaluated(*this, CE); + } ---------------- I think `DiagnoseTautologicalIsConstantEvaluated` might be confusing without context, suggesting another name ================ Comment at: clang/lib/Sema/SemaStmt.cpp:938-944 + bool AlwaysFalse = ExprEvalContexts.back().IsRuntimeEvaluated; + if (AlwaysTrue) + Diags.Report(IfLoc, diag::warn_tautological_consteval_if) + << (StatementKind == IfStatementKind::ConstevalNegated); + else if (AlwaysFalse) + Diags.Report(IfLoc, diag::warn_tautological_consteval_if) + << (StatementKind == IfStatementKind::ConstevalNonNegated); ---------------- I think that might be somewhat nicer (make sure to run clang-format :)) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155064/new/ https://reviews.llvm.org/D155064 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits