[PATCH] Delay lookup of simple default template arguments under -fms-compatibility

Reid Kleckner rnk at google.com
Mon Jun 2 15:49:37 PDT 2014


Hi rsmith,

MSVC delays parsing of default arguments until instantiation.  If the
default argument is never used, it is never parsed.  We don't model
this.

Instead, if lookup of a type name fails in a template argument context,
we form a DependentNameType, which will be looked up at instantiation
time.

This fixes errors about 'CControlWinTraits' in atlwin.h.

http://reviews.llvm.org/D3995

Files:
  include/clang/AST/Type.h
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Parse/Parser.h
  include/clang/Sema/Sema.h
  lib/AST/ASTContext.cpp
  lib/Parse/ParseDecl.cpp
  lib/Sema/SemaDecl.cpp
  test/SemaTemplate/ms-delayed-default-template-args.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3995.10029.patch
Type: text/x-patch
Size: 9019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140602/25dcdbcd/attachment.bin>


More information about the cfe-commits mailing list