diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-01 22:22:40 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-07-01 22:22:40 +0000 |
commit | 774506918ca492c43ae5b0c50c81ed520aefa630 (patch) | |
tree | f511d800a7b80ebf701434a3a3aa9c15ab6f5b46 /clang/lib/Parse/ParseObjc.cpp | |
parent | b9a2c32219daa00755a61859c0db1854c08875a1 (diff) | |
download | bcm5719-llvm-774506918ca492c43ae5b0c50c81ed520aefa630.tar.gz bcm5719-llvm-774506918ca492c43ae5b0c50c81ed520aefa630.zip |
Introduce Declarator::ObjCCatchContext, this will result in correct error for 'auto' in obj-c catch.
llvm-svn: 134271
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index 8a6c9642143..7641565d1cc 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -1633,10 +1633,7 @@ StmtResult Parser::ParseObjCTryStmt(SourceLocation atLoc) { if (Tok.isNot(tok::ellipsis)) { DeclSpec DS(AttrFactory); ParseDeclarationSpecifiers(DS); - // For some odd reason, the name of the exception variable is - // optional. As a result, we need to use "PrototypeContext", because - // we must accept either 'declarator' or 'abstract-declarator' here. - Declarator ParmDecl(DS, Declarator::PrototypeContext); + Declarator ParmDecl(DS, Declarator::ObjCCatchContext); ParseDeclarator(ParmDecl); // Inform the actions module about the declarator, so it |