Support unary type traits in a scalar context. Not that I've actually seen

this construct, but might as well for completeness.

llvm-svn: 91071
This commit is contained in:
Eli Friedman 2009-12-10 22:40:32 +00:00
parent ee275c82ff
commit d70bbfd7d8
2 changed files with 7 additions and 0 deletions

View File

@ -263,6 +263,10 @@ public:
CGF.EmitCXXDeleteExpr(E);
return 0;
}
Value *VisitUnaryTypeTraitExpr(const UnaryTypeTraitExpr *E) {
return llvm::ConstantInt::get(Builder.getInt1Ty(),
E->EvaluateTrait(CGF.getContext()));
}
Value *VisitCXXPseudoDestructorExpr(const CXXPseudoDestructorExpr *E) {
// C++ [expr.pseudo]p1:

View File

@ -0,0 +1,3 @@
// RUN: clang-cc -emit-llvm-only -verify %s
bool a() { return __is_pod(int); }