[llvm-commits] [PATCH] Rewrite isa<> impl to match the cast<> impl (PR7952)

Chris Lattner clattner at apple.com
Sat May 21 11:29:06 PDT 2011


On Apr 16, 2011, at 12:18 AM, Eli Friedman wrote:

> Attached rewrites isa<> so it uses the same logic as cast<> to figure
> out the underlying type of the argument; in particular, this means
> that it won't automatically dereference multi-level pointers.  My
> knowledge of C++ templates is relatively weak, but this patch seems
> correct.
> 
> The change to include/clang/AST/DeclBase.h in clang is necessary
> because it specialized a template whose meaning has changed.
> 
> The rest of the changes are just making sure not to use isa<> on
> multi-level pointers.

Looks great to me Eli, please commit!

-Chris



More information about the llvm-commits mailing list