Skip to content

Commit ecc1247

Browse files
committed
The constant folder's diagnosic mechanism is irrelevant for C; don't bother
producing a C-only diagnostic. llvm-svn: 152181
1 parent bee5a1d commit ecc1247

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,10 +1691,6 @@ static bool AreElementsOfSameArray(QualType ObjType,
16911691
static bool HandleLValueToRValueConversion(EvalInfo &Info, const Expr *Conv,
16921692
QualType Type,
16931693
const LValue &LVal, APValue &RVal) {
1694-
// In C, an lvalue-to-rvalue conversion is never a constant expression.
1695-
if (!Info.getLangOpts().CPlusPlus)
1696-
Info.CCEDiag(Conv->getExprLoc(), diag::note_invalid_subexpr_in_const_expr);
1697-
16981694
if (LVal.Designator.Invalid)
16991695
// A diagnostic will have already been produced.
17001696
return false;

0 commit comments

Comments
 (0)