aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-07-27 19:14:18 +0000
committerMike Stump <mrs@apple.com>2009-07-27 19:14:18 +0000
commit0feecbb3165b06ff34663a8c233316aaf7f84ce1 (patch)
tree9dee9a2a229297dcf02f59271dff4ceadd93cb2d /lib/Sema/SemaDecl.cpp
parentaecae629269fae3bf484baf1d109e9a89d14eead (diff)
Add noreturn for exit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 0f4e9a42d6..bf2d3ccec2 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3676,6 +3676,9 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) {
if (!FD->getAttr<ConstAttr>())
FD->addAttr(::new (Context) ConstAttr());
}
+
+ if (Context.BuiltinInfo.isNoReturn(BuiltinID))
+ FD->addAttr(::new (Context) NoReturnAttr());
}
IdentifierInfo *Name = FD->getIdentifier();