]> granicus.if.org Git - clang/commitdiff
Parser::ParseDeclarationOrFunctionDefinition no longer needs to accept
authorDouglas Gregor <dgregor@apple.com>
Tue, 12 May 2009 21:43:46 +0000 (21:43 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 12 May 2009 21:43:46 +0000 (21:43 +0000)
template parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71598 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Parse/Parser.h
lib/Parse/Parser.cpp
test/SemaTemplate/temp.cpp

index 49554422bbeb5170dc792a695a59e5f1fb4686ba..a11cd7d78db6b5e3f058911d42afcb594c540dde 100644 (file)
@@ -553,7 +553,6 @@ private:
   bool isDeclarationAfterDeclarator();
   bool isStartOfFunctionDefinition();
   DeclGroupPtrTy ParseDeclarationOrFunctionDefinition(
-            TemplateParameterLists *TemplateParams = 0,
             AccessSpecifier AS = AS_none);
                                                
   DeclPtrTy ParseFunctionDefinition(Declarator &D);
index e886bd43ca999ece8156be3ace1d84c82e2572df..d07d52e58c3e5eeeafe488866d4cd4a42e40cbc5 100644 (file)
@@ -477,12 +477,10 @@ bool Parser::isStartOfFunctionDefinition() {
 /// [OMP]   threadprivate-directive                              [TODO]
 ///
 Parser::DeclGroupPtrTy
-Parser::ParseDeclarationOrFunctionDefinition(
-                                  TemplateParameterLists *TemplateParams,
-                                  AccessSpecifier AS) {
+Parser::ParseDeclarationOrFunctionDefinition(AccessSpecifier AS) {
   // Parse the common declaration-specifiers piece.
   DeclSpec DS;
-  ParseDeclarationSpecifiers(DS, TemplateParams, AS);
+  ParseDeclarationSpecifiers(DS, 0, AS);
 
   // C99 6.7.2.3p6: Handle "struct-or-union identifier;", "enum { X };"
   // declaration-specifiers init-declarator-list[opt] ';'
index bd37cc668b1c71a3a4bdb0661f8e5af97211c00c..8be4739a741bda81987d2e3ae2529e47f529fb93 100644 (file)
@@ -1,2 +1,5 @@
 // RUN: clang-cc -fsyntax-only -verify %s
+
+
+// p3
 template<typename T> int foo(T), bar(T, T); // expected-error{{single entity}}