[PATCH] Recover from missing 'typename' in sizeof(T::InnerType)

Reid Kleckner rnk at google.com
Wed Jun 11 18:08:31 PDT 2014


Hi rsmith,

'sizeof' is a UnaryExprOrTypeTrait, and it can contain either a type or
an expression.  This change threads a RecoveryTSI parameter through the
layers between TransformUnaryExprOrTypeTrait the point at which we look
up the type.  If lookup finds a single type result after instantiation,
we now build TypeSourceInfo for it just like a normal transformation
would.

This fixes the last error in the hello world ATL app that I've been
working with, and it now links and runs with clang.  Please try it and
file bugs!

http://reviews.llvm.org/D4108

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/Sema/SemaDecl.cpp
  lib/Sema/SemaExpr.cpp
  lib/Sema/SemaTemplate.cpp
  lib/Sema/TreeTransform.h
  test/SemaTemplate/ms-sizeof-missing-typename.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4108.10341.patch
Type: text/x-patch
Size: 15120 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140612/34e47f9c/attachment.bin>


More information about the cfe-commits mailing list