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 | 0d729105ecb50a7e3cbe6e57c29149edfa5cf05a (patch) | |
tree | 8c4f1bc2fdc5e9cbbc8a853c152f440f642276b5 /lib/AST/ExprConstant.cpp | |
parent | 37f7a3326791dd625a4aa9a097b5fad0a757c956 (diff) |
Factor out computation of whether a typeid's expression is potentially
evaluated into a CXXTypeid member function. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprConstant.cpp')
-rw-r--r-- | lib/AST/ExprConstant.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/ExprConstant.cpp b/lib/AST/ExprConstant.cpp index 567002cf82..06c41a2e7e 100644 --- a/lib/AST/ExprConstant.cpp +++ b/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() |