summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-25 03:22:00 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-25 03:22:00 +0000
commit2afd0be069e87664b64bea0229f266fd8192ebf1 (patch)
tree2d412ecd4072b18e04b4226e6ddbb4905ae1581d /clang/lib/Parse/ParseDecl.cpp
parentf39268ae8c0cb15ea0ea7dcb108cc416eafdad59 (diff)
downloadbcm5719-llvm-2afd0be069e87664b64bea0229f266fd8192ebf1.tar.gz
bcm5719-llvm-2afd0be069e87664b64bea0229f266fd8192ebf1.zip
Simple parsing of exception specifications, with no semantic analysis yet
llvm-svn: 60005
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 1b5a0a5e7a3..eaf9f8b0f98 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -1653,7 +1653,10 @@ void Parser::ParseFunctionDeclarator(SourceLocation LParenLoc, Declarator &D,
DeclSpec DS;
if (getLang().CPlusPlus) {
ParseTypeQualifierListOpt(DS);
- // FIXME: Parse exception-specification[opt].
+
+ // Parse exception-specification[opt].
+ if (Tok.is(tok::kw_throw))
+ ParseExceptionSpecification();
}
// Remember that we parsed a function type, and remember the attributes.
@@ -1783,11 +1786,14 @@ void Parser::ParseFunctionDeclarator(SourceLocation LParenLoc, Declarator &D,
// If we have the closing ')', eat it.
MatchRHSPunctuation(tok::r_paren, LParenLoc);
- // cv-qualifier-seq[opt].
DeclSpec DS;
if (getLang().CPlusPlus) {
+ // Parse cv-qualifier-seq[opt].
ParseTypeQualifierListOpt(DS);
- // FIXME: Parse exception-specification[opt].
+
+ // Parse exception-specification[opt].
+ if (Tok.is(tok::kw_throw))
+ ParseExceptionSpecification();
}
// Remember that we parsed a function type, and remember the attributes.
OpenPOWER on IntegriCloud