summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-17 22:16:11 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-17 22:16:11 +0000
commit0015f0987792014c9f9daf595c8f4594cb465213 (patch)
tree4f60f278c12f3861df6718e1a61c31082b81f2ea /clang/lib/Parse/ParseDecl.cpp
parent01a7fba820a612d55d2c09ab734f4c774ba6aa0a (diff)
downloadbcm5719-llvm-0015f0987792014c9f9daf595c8f4594cb465213.tar.gz
bcm5719-llvm-0015f0987792014c9f9daf595c8f4594cb465213.zip
Parsing support for C11's _Noreturn keyword. No semantics yet.
llvm-svn: 172761
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 74769bf7319..f9c68c79b9c 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -2619,6 +2619,11 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS,
case tok::kw_explicit:
isInvalid = DS.setFunctionSpecExplicit(Loc);
break;
+ case tok::kw__Noreturn:
+ if (!getLangOpts().C11)
+ Diag(Loc, diag::ext_c11_noreturn);
+ isInvalid = DS.setFunctionSpecNoreturn(Loc);
+ break;
// alignment-specifier
case tok::kw__Alignas:
@@ -3878,6 +3883,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) {
case tok::kw_inline:
case tok::kw_virtual:
case tok::kw_explicit:
+ case tok::kw__Noreturn:
// friend keyword.
case tok::kw_friend:
OpenPOWER on IntegriCloud