[cfe-commits] r121720 - in /cfe/trunk: include/clang/AST/TypeLoc.h lib/AST/TypeLoc.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp

Chandler Carruth chandlerc at google.com
Mon Dec 13 14:40:52 PST 2010


On Mon, Dec 13, 2010 at 2:27 PM, Abramo Bagnara <abramo.bagnara at gmail.com>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.

Also, I would appreciate at least the initial check for whether the type (or
type loc) is a ParenType to be in the inline section of code. The
overwhelming common case is that this is a no-op, and we don't want to force
a function call just to find that out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101213/e55d6b2d/attachment.html>


More information about the cfe-commits mailing list