]> granicus.if.org Git - clang/commit
Introduce a RecursiveASTVisitor subclass that finds all unexpanded
authorDouglas Gregor <dgregor@apple.com>
Wed, 15 Dec 2010 19:43:21 +0000 (19:43 +0000)
committerDouglas Gregor <dgregor@apple.com>
Wed, 15 Dec 2010 19:43:21 +0000 (19:43 +0000)
commit9ef75899bae6dd9a4be1252ae9cadcb619c170ff
tree5790f6909a1738efde006a9ff1e20d3e98cabd72
parent0827408865e32789e0ec4b8113a302ccdc531423
Introduce a RecursiveASTVisitor subclass that finds all unexpanded
parameter packs within a statement, type, etc. Use this visitor to
provide improved diagnostics for the presence of unexpanded parameter
packs in a full expression, base type, declaration type, etc., by
highlighting the unexpanded parameter packs and providing their names,
e.g.,

test/CXX/temp/temp.decls/temp.variadic/p5.cpp:28:85: error: declaration type
      contains unexpanded parameter packs 'VeryInnerTypes',
      'OuterTypes', ...
  ...VeryInnerTypes, OuterTypes>, pair<InnerTypes, OuterTypes> > types;
     ~~~~~~~~~~~~~~  ~~~~~~~~~~        ~~~~~~~~~~  ~~~~~~~~~~    ^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121883 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaTemplateVariadic.cpp
test/CXX/temp/temp.decls/temp.variadic/p5.cpp