summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-05-02 22:22:32 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-05-02 22:22:32 +0000
commit2331bbfb4ec52a51eec9fab6a6e8e7e3a9e5a4af (patch)
tree82de8c9fd20085a31833a97201f4c214ced03f64 /clang/lib/Parse/ParseDecl.cpp
parent90ff4683f79b4c0c57fb32130f043725339b4dcb (diff)
downloadbcm5719-llvm-2331bbfb4ec52a51eec9fab6a6e8e7e3a9e5a4af.tar.gz
bcm5719-llvm-2331bbfb4ec52a51eec9fab6a6e8e7e3a9e5a4af.zip
Revert most of r154844, which was disabled in r155975. Keep around the
refactorings in that revision, and some of the subsequent bugfixes, which seem to be relevant even without delayed exception specification parsing. llvm-svn: 156031
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 7e2db69fd62..12941b09ba2 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -4208,7 +4208,6 @@ void Parser::ParseFunctionDeclarator(Declarator &D,
SmallVector<ParsedType, 2> DynamicExceptions;
SmallVector<SourceRange, 2> DynamicExceptionRanges;
ExprResult NoexceptExpr;
- CachedTokens *ExceptionSpecTokens = 0;
ParsedAttributes FnAttrs(AttrFactory);
ParsedType TrailingReturnType;
@@ -4275,26 +4274,12 @@ void Parser::ParseFunctionDeclarator(Declarator &D,
dyn_cast<CXXRecordDecl>(Actions.CurContext),
DS.getTypeQualifiers(),
IsCXX11MemberFunction);
-
+
// Parse exception-specification[opt].
- // FIXME: Remove the code to perform delayed parsing of exception
- // specifications.
-#if 0
- bool Delayed = (D.getContext() == Declarator::MemberContext &&
- D.getDeclSpec().getStorageClassSpec()
- != DeclSpec::SCS_typedef &&
- !D.getDeclSpec().isFriendSpecified());
- for (unsigned i = 0, e = D.getNumTypeObjects(); Delayed && i != e; ++i)
- Delayed &= D.getTypeObject(i).Kind == DeclaratorChunk::Paren;
-#else
- const bool Delayed = false;
-#endif
- ESpecType = tryParseExceptionSpecification(Delayed,
- ESpecRange,
+ ESpecType = tryParseExceptionSpecification(ESpecRange,
DynamicExceptions,
DynamicExceptionRanges,
- NoexceptExpr,
- ExceptionSpecTokens);
+ NoexceptExpr);
if (ESpecType != EST_None)
EndLoc = ESpecRange.getEnd();
@@ -4329,7 +4314,6 @@ void Parser::ParseFunctionDeclarator(Declarator &D,
DynamicExceptions.size(),
NoexceptExpr.isUsable() ?
NoexceptExpr.get() : 0,
- ExceptionSpecTokens,
Tracker.getOpenLocation(),
EndLoc, D,
TrailingReturnType),
OpenPOWER on IntegriCloud