diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-12-15 21:57:59 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-12-15 21:57:59 +0000 |
| commit | a8461bb4390388ecabf18dcd2afd42adc745e710 (patch) | |
| tree | bb53481c5be454f3b84da4c488768c90216b040e /clang/lib | |
| parent | 763d1a17a18312f698409f5a1d063f060610f954 (diff) | |
| download | bcm5719-llvm-a8461bb4390388ecabf18dcd2afd42adc745e710.tar.gz bcm5719-llvm-a8461bb4390388ecabf18dcd2afd42adc745e710.zip | |
Test that all of the relevant types properly compute the "contains
unexpanded parameter pack" bit and that the recursive AST visitor can
then find those unexpanded parameter packs.
llvm-svn: 121899
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaTemplateVariadic.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplateVariadic.cpp b/clang/lib/Sema/SemaTemplateVariadic.cpp index 677b14635fc..057792914b2 100644 --- a/clang/lib/Sema/SemaTemplateVariadic.cpp +++ b/clang/lib/Sema/SemaTemplateVariadic.cpp @@ -103,9 +103,14 @@ namespace { return true; } - /// \brief Suppress traversal of declarations, since they cannot - /// contain unexpanded parameter packs. - bool TraverseDecl(Decl *D) { return true; } + /// \brief Suppress traversal of non-parameter declarations, since + /// they cannot contain unexpanded parameter packs. + bool TraverseDecl(Decl *D) { + if (D && isa<ParmVarDecl>(D)) + return inherited::TraverseDecl(D); + + return true; + } }; } |

