diff options
| author | Douglas Gregor <dgregor@apple.com> | 2008-11-25 03:22:00 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2008-11-25 03:22:00 +0000 |
| commit | 2afd0be069e87664b64bea0229f266fd8192ebf1 (patch) | |
| tree | 2d412ecd4072b18e04b4226e6ddbb4905ae1581d /clang/lib/Parse/ParseDecl.cpp | |
| parent | f39268ae8c0cb15ea0ea7dcb108cc416eafdad59 (diff) | |
| download | bcm5719-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.cpp | 12 |
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. |

