[cfe-commits] r152181 - /cfe/trunk/lib/AST/ExprConstant.cpp

Richard Smith richard-llvm at metafoo.co.uk
Tue Mar 6 16:30:45 PST 2012


Author: rsmith
Date: Tue Mar  6 18:30:44 2012
New Revision: 152181

URL: http://llvm.org/viewvc/llvm-project?rev=152181&view=rev
Log:
The constant folder's diagnosic mechanism is irrelevant for C; don't bother
producing a C-only diagnostic.

Modified:
    cfe/trunk/lib/AST/ExprConstant.cpp

Modified: cfe/trunk/lib/AST/ExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=152181&r1=152180&r2=152181&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ExprConstant.cpp (original)
+++ cfe/trunk/lib/AST/ExprConstant.cpp Tue Mar  6 18:30:44 2012
@@ -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;





More information about the cfe-commits mailing list