diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-13 20:08:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-13 20:08:14 +0000 |
commit | ef8bf4368ec62eac1948f2c5c0f05f672d4fe1b1 (patch) | |
tree | c2be4f93512a27fd933c2fe16430a61887359856 /clang/lib/AST/ExprConstant.cpp | |
parent | 0bb7f23cfc9b7b27d45c6f3c4f75dd5850f98dbb (diff) | |
download | bcm5719-llvm-ef8bf4368ec62eac1948f2c5c0f05f672d4fe1b1.tar.gz bcm5719-llvm-ef8bf4368ec62eac1948f2c5c0f05f672d4fe1b1.zip |
Factor out computation of whether a typeid's expression is potentially
evaluated into a CXXTypeid member function. No functionality change.
llvm-svn: 161779
Diffstat (limited to 'clang/lib/AST/ExprConstant.cpp')
-rw-r--r-- | clang/lib/AST/ExprConstant.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp index 567002cf828..06c41a2e7ea 100644 --- a/clang/lib/AST/ExprConstant.cpp +++ b/clang/lib/AST/ExprConstant.cpp @@ -2881,6 +2881,9 @@ bool LValueExprEvaluator::VisitCXXTypeidExpr(const CXXTypeidExpr *E) { if (E->isTypeOperand()) return Success(E); CXXRecordDecl *RD = E->getExprOperand()->getType()->getAsCXXRecordDecl(); + // FIXME: The standard says "a typeid expression whose operand is of a + // polymorphic class type" is not a constant expression, but it probably + // means "a typeid expression whose operand is potentially evaluated". if (RD && RD->isPolymorphic()) { Info.Diag(E, diag::note_constexpr_typeid_polymorphic) << E->getExprOperand()->getType() |