[cfe-commits] [PATCH][Review request] - __is_base_of compiler intrisics

Douglas Gregor dgregor at apple.com
Mon Dec 6 15:21:02 PST 2010


On Dec 4, 2010, at 9:31 PM, Francois Pichet wrote:

> OK thank for the review I corrected the issues
> Here is an updated patch.

A few more nits...

Index: include/clang/AST/ExprCXX.h
===================================================================
--- include/clang/AST/ExprCXX.h	(revision 120911)
+++ include/clang/AST/ExprCXX.h	(working copy)
@@ -1452,6 +1452,72 @@
   friend class ASTStmtReader;
 };
 
+/// BinaryTypeTraitExpr - A GCC or MS binary type trait, as used in the
+/// implementation of TR1/C++0x type trait templates.
+/// Example:
+/// __is_base_of(Base, Derived) == true
+class BinaryTypeTraitExpr : public Expr {
+  /// BTT - The trait. A BinaryTypeTrait enum in MSVC compat unsigned.
+  unsigned BTT : 31;


How about making this 8 or 16 bits, so we don't have to do as much masking when loading/saving?

It occurs to me that TypesCompatibleExpr could just become a BinaryTraitExpr. That would make a great follow-on patch ;)

Looks great, thanks!

	- Doug



More information about the cfe-commits mailing list