On Dec 13, 2010, at 2:40 PM, Chandler Carruth wrote:
> On Mon, Dec 13, 2010 at 2:27 PM, Abramo Bagnara <[email protected]>
> wrote:
> Skip ParenType on function instantiations.
>
> While this fixes one case, your patch remains fundamentally broken. There are
> more cases throughout Sema that reason about a QualType or TypeSourceInfo or
> TypeLoc and expect getAs<FunctionType> or dyn_cast<FunctionType> to Just
> Work. They don't any more. Function attributes won't work now for example.
> Can you audit the codebase looking for these? They should be very easy to
> craft test cases for.
getAs<>() should be working just fine because (1) the canonical type is
untouched and (2) isSugared() and desugar() have been implemented correctly.
Chandler is right that we probably need to check all the explicit isa<>s on
TypeLocs.
I am skeptical that we need QualType::IgnoreParens() at all, but
TypeLoc::IgnoreParens is reasonable, although I agree with Chandler that this
should be an inline function.
John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits