summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTemplate.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-08-23 06:53:58 +0000
committerJohn McCall <rjmccall@apple.com>2010-08-23 06:53:58 +0000
commit572ccbc2c2ecfbdcf200cefca52ac2df9f627bce (patch)
treec9d83613d1556b99fc0848628404cef4474c427c /clang/lib/Parse/ParseTemplate.cpp
parent37ad551a2569c1fee1685ec83907b4debae2d4b0 (diff)
downloadbcm5719-llvm-572ccbc2c2ecfbdcf200cefca52ac2df9f627bce.tar.gz
bcm5719-llvm-572ccbc2c2ecfbdcf200cefca52ac2df9f627bce.zip
Kill off Parser::TemplateParameterList to avoid misparses.
llvm-svn: 111796
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r--clang/lib/Parse/ParseTemplate.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp
index dec41d9292d..5d5fc9ce3bd 100644
--- a/clang/lib/Parse/ParseTemplate.cpp
+++ b/clang/lib/Parse/ParseTemplate.cpp
@@ -127,7 +127,7 @@ Parser::ParseTemplateDeclarationOrSpecialization(unsigned Context,
// Parse the '<' template-parameter-list '>'
SourceLocation LAngleLoc, RAngleLoc;
- TemplateParameterList TemplateParams;
+ llvm::SmallVector<Decl*, 4> TemplateParams;
if (ParseTemplateParameters(Depth, TemplateParams, LAngleLoc,
RAngleLoc)) {
// Skip until the semi-colon or a }.
@@ -281,7 +281,7 @@ Parser::ParseSingleDeclarationAfterTemplate(
///
/// \returns true if an error occurred, false otherwise.
bool Parser::ParseTemplateParameters(unsigned Depth,
- TemplateParameterList &TemplateParams,
+ llvm::SmallVectorImpl<Decl*> &TemplateParams,
SourceLocation &LAngleLoc,
SourceLocation &RAngleLoc) {
// Get the template parameter list.
@@ -314,7 +314,7 @@ bool Parser::ParseTemplateParameters(unsigned Depth,
/// template-parameter-list ',' template-parameter
bool
Parser::ParseTemplateParameterList(unsigned Depth,
- TemplateParameterList &TemplateParams) {
+ llvm::SmallVectorImpl<Decl*> &TemplateParams) {
while (1) {
if (Decl *TmpParam
= ParseTemplateParameter(Depth, TemplateParams.size())) {
@@ -504,7 +504,7 @@ Parser::ParseTemplateTemplateParameter(unsigned Depth, unsigned Position) {
// Handle the template <...> part.
SourceLocation TemplateLoc = ConsumeToken();
- TemplateParameterList TemplateParams;
+ llvm::SmallVector<Decl*,8> TemplateParams;
SourceLocation LAngleLoc, RAngleLoc;
{
ParseScope TemplateParmScope(this, Scope::TemplateParamScope);
OpenPOWER on IntegriCloud