mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 02:26:27 +08:00
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:
@@ -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:
|
||||
|
||||
3
clang/test/CodeGenCXX/unary-type-trait.cpp
Normal file
3
clang/test/CodeGenCXX/unary-type-trait.cpp
Normal file
@@ -0,0 +1,3 @@
|
||||
// RUN: clang-cc -emit-llvm-only -verify %s
|
||||
|
||||
bool a() { return __is_pod(int); }
|
||||
Reference in New Issue
Block a user