[cfe-commits] r71598 - in /cfe/trunk: include/clang/Parse/Parser.h lib/Parse/Parser.cpp test/SemaTemplate/temp.cpp
Douglas Gregor
dgregor at apple.com
Tue May 12 14:43:46 PDT 2009
Author: dgregor
Date: Tue May 12 16:43:46 2009
New Revision: 71598
URL: http://llvm.org/viewvc/llvm-project?rev=71598&view=rev
Log:
Parser::ParseDeclarationOrFunctionDefinition no longer needs to accept
template parameters.
Modified:
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/lib/Parse/Parser.cpp
cfe/trunk/test/SemaTemplate/temp.cpp
Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=71598&r1=71597&r2=71598&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Tue May 12 16:43:46 2009
@@ -553,7 +553,6 @@
bool isDeclarationAfterDeclarator();
bool isStartOfFunctionDefinition();
DeclGroupPtrTy ParseDeclarationOrFunctionDefinition(
- TemplateParameterLists *TemplateParams = 0,
AccessSpecifier AS = AS_none);
DeclPtrTy ParseFunctionDefinition(Declarator &D);
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=71598&r1=71597&r2=71598&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Tue May 12 16:43:46 2009
@@ -477,12 +477,10 @@
/// [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] ';'
Modified: cfe/trunk/test/SemaTemplate/temp.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaTemplate/temp.cpp?rev=71598&r1=71597&r2=71598&view=diff
==============================================================================
--- cfe/trunk/test/SemaTemplate/temp.cpp (original)
+++ cfe/trunk/test/SemaTemplate/temp.cpp Tue May 12 16:43:46 2009
@@ -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}}
More information about the cfe-commits
mailing list