aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-30 05:45:05 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-30 05:45:05 +0000
commit7586a6e6b7d79d4be031d2d0d6a35d5996cd0db9 (patch)
treec37b5c2f63d72a76a1a98f8bf54bec8ad8083b1a /lib/AST/Decl.cpp
parent4874a8143dc3032205f97527ff619730db3d1f57 (diff)
Semantic analysis and CodeGen support for C11's _Noreturn. This is modeled as
an attribute for consistency with our other noreturn mechanisms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r--lib/AST/Decl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp
index f9ad946109..ed2a0c36fd 100644
--- a/lib/AST/Decl.cpp
+++ b/lib/AST/Decl.cpp
@@ -1812,6 +1812,7 @@ bool FunctionDecl::isGlobal() const {
bool FunctionDecl::isNoReturn() const {
return hasAttr<NoReturnAttr>() || hasAttr<CXX11NoReturnAttr>() ||
+ hasAttr<C11NoReturnAttr>() ||
getType()->getAs<FunctionType>()->getNoReturnAttr();
}