The constant folder's diagnosic mechanism is irrelevant for C; don't bother
producing a C-only diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152181 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 1b15cb1..08794f3 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -1691,10 +1691,6 @@
static bool HandleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv,
QualType Type,
const LValue &LVal, APValue &RVal) {
- // In C, an lvalue-to-rvalue conversion is never a constant expression.
- if (!Info.getLangOpts().CPlusPlus)
- Info.CCEDiag(Conv->getExprLoc(), diag::note_invalid_subexpr_in_const_expr);
-
if (LVal.Designator.Invalid)
// A diagnostic will have already been produced.
return false;