aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ExprConstant.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-03-07 00:30:44 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-03-07 00:30:44 +0000
commit485ea8e8ea6fd0ab406f10795e35087ee9a07689 (patch)
treea9692d125cb83b9cefd5663166fb8db6445aaf8f /lib/AST/ExprConstant.cpp
parent8ba9a6244c56b19bc2a24de5d0c32ff37d50177b (diff)
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
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r--lib/AST/ExprConstant.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp
index 1b15cb1d68..08794f355f 100644
--- a/lib/AST/ExprConstant.cpp
+++ b/lib/AST/ExprConstant.cpp
@@ -1691,10 +1691,6 @@ static bool AreElementsOfSameArray(QualType ObjType,
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;