<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Dec 13, 2010, at 2:40 PM, Chandler Carruth wrote:</div><blockquote type="cite"><div class="gmail_quote">On Mon, Dec 13, 2010 at 2:27 PM, Abramo Bagnara <span dir="ltr"><<a href="mailto:abramo.bagnara@gmail.com">abramo.bagnara@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Skip ParenType on function instantiations.</blockquote></div><br><div>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.</div></blockquote><div><br></div>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.</div><div><br></div><div>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.</div><div><br></div><div>John.</div></body></html>