diff options
author | Anders Carlsson <andersca@mac.com> | 2009-03-22 01:52:17 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-03-22 01:52:17 +0000 |
commit | 67e4dd2e9936d828d68b20e01922b6442c6ce31b (patch) | |
tree | 579ceaced967bc6c45475ada5c44dbbca5febeb2 /lib/AST/ExprCXX.cpp | |
parent | 3403084886b3d0fc23eee2b5708f0ac0329423e0 (diff) |
Keep track of whether a class is abstract or not. This is currently only used for the __is_abstract type trait.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67461 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprCXX.cpp')
-rw-r--r-- | lib/AST/ExprCXX.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/AST/ExprCXX.cpp b/lib/AST/ExprCXX.cpp index 53be84b20d..5a9de19254 100644 --- a/lib/AST/ExprCXX.cpp +++ b/lib/AST/ExprCXX.cpp @@ -214,6 +214,10 @@ bool UnaryTypeTraitExpr::EvaluateTrait() const { return cast<CXXRecordDecl>(Record->getDecl())->isPolymorphic(); } return false; + case UTT_IsAbstract: + if (const RecordType *RT = QueriedType->getAsRecordType()) + return cast<CXXRecordDecl>(RT->getDecl())->isAbstract(); + return false; } } |