summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-09-22 10:28:57 +0000
committerSteve Naroff <snaroff@apple.com>2008-09-22 10:28:57 +0000
commitcd5e782bce0f1c93757f170a80da3d3a69abee50 (patch)
treeb8e5f5b2f12f8d129269753f918500b8dbe9e6bb /clang/lib/Parse/ParseDecl.cpp
parent73a5406d246185d79cd3448eed94244c2092a48f (diff)
downloadbcm5719-llvm-cd5e782bce0f1c93757f170a80da3d3a69abee50.tar.gz
bcm5719-llvm-cd5e782bce0f1c93757f170a80da3d3a69abee50.zip
Fix http://llvm.org/bugs/show_bug.cgi?id=2816.
llvm-svn: 56433
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index e81a8b87c39..80970a2f14d 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -445,9 +445,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) {
DS.SetRangeEnd(EndProtoLoc);
- // Do not allow any other declspecs after the protocol qualifier list
- // "<foo,bar>short" is not allowed.
- goto DoneWithDeclSpec;
+ // Need to support trailing type qualifiers (e.g. "id<p> const").
+ // If a type specifier follows, it will be diagnosed elsewhere.
+ continue;
}
// GNU attributes support.
case tok::kw___attribute:
@@ -585,9 +585,9 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) {
Diag(Loc, diag::warn_objc_protocol_qualifier_missing_id,
SourceRange(Loc, EndProtoLoc));
- // Do not allow any other declspecs after the protocol qualifier list
- // "<foo,bar>short" is not allowed.
- goto DoneWithDeclSpec;
+ // Need to support trailing type qualifiers (e.g. "id<p> const").
+ // If a type specifier follows, it will be diagnosed elsewhere.
+ continue;
}
}
// If the specifier combination wasn't legal, issue a diagnostic.
OpenPOWER on IntegriCloud