diff options
| author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-03-12 11:50:43 +0000 |
|---|---|---|
| committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-03-12 11:50:43 +0000 |
| commit | fa453cfdc3d91452a5240ef08ca43964f12bf640 (patch) | |
| tree | f7370300840e8f5df1753642aa1d2fffcb0beab4 /clang/lib/Parse/ParseTentative.cpp | |
| parent | f2a79d94e47719b3a3a0e85ede7d65a52a8e9104 (diff) | |
| download | bcm5719-llvm-fa453cfdc3d91452a5240ef08ca43964f12bf640.tar.gz bcm5719-llvm-fa453cfdc3d91452a5240ef08ca43964f12bf640.zip | |
Propagate the new exception information to FunctionProtoType.
Change the interface to expose the new information and deal with the enormous fallout.
Introduce the new ExceptionSpecificationType value EST_DynamicNone to more easily deal with empty throw specifications.
Update the tests for noexcept and fix the various bugs uncovered, such as lack of tentative parsing support.
llvm-svn: 127537
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
| -rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 10993276c62..68b599bd37c 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -1238,6 +1238,16 @@ Parser::TPResult Parser::TryParseFunctionDeclarator() { if (!SkipUntil(tok::r_paren)) return TPResult::Error(); } + if (Tok.is(tok::kw_noexcept)) { + ConsumeToken(); + // Possibly an expression as well. + if (Tok.is(tok::l_paren)) { + // Find the matching rparen. + ConsumeParen(); + if (!SkipUntil(tok::r_paren)) + return TPResult::Error(); + } + } return TPResult::Ambiguous(); } |

