[cfe-commits] [patch] __has_trivial_* type traits

John McCall rjmccall at apple.com
Thu Jul 23 01:03:40 PDT 2009


This patch fixes the implementations of the __has_trivial_destructor and 
__has_trivial_constructor builtin pseudo-functions and additionally 
implements __has_trivial_copy and __has_trivial_assign.

I found it useful to introduce a method 
clang::Type::getBaseElementTypeNoTypeQual(), which just drills down past 
any array types and type qualifiers;  it's both more convenient and 
probably more efficient than iteratively calling getAsArrayType() / 
getElementType().  I'm not totally confident in its implementation, so 
I'd appreciate a review specifically of that.  I also went ahead and 
retrofitted some call sites that fit the iterative pattern.

John.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.txt
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090723/90ecd55f/attachment.txt>


More information about the cfe-commits mailing list