aboutsummaryrefslogtreecommitdiff
path: root/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
commit0fe7bea6fca9737c6c145aaa4a2ad3abe595782a (patch)
tree1893e68a51bdfc718d32d7e2609596070cf86e89 /lib/Parse/ParseDecl.cpp
parent661fc39abc5338e9dccd2f64467cac8bbe25c46a (diff)
Simple parsing of exception specifications, with no semantic analysis yet
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60005 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 1b5a0a5e7a..eaf9f8b0f9 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/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.