diff options
author | Mike Stump <mrs@apple.com> | 2009-07-27 21:33:40 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-07-27 21:33:40 +0000 |
commit | fd350b5b4ae557d6b74899b945e77508f33149a9 (patch) | |
tree | e34bd5bf39f31802c69d9fcde2887e2833954c47 /lib/AST/DeclPrinter.cpp | |
parent | bc0a2226c7fcd18b29b6846049e2cfcb872d3593 (diff) |
Add builtin knowledge about longjmp being noreturn. Add printing for
the noreturn attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index 589cdeca8a..e5bf59f8f9 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -335,6 +335,8 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { } Proto += ")"; + if (D->hasAttr<NoReturnAttr>()) + Proto += " __attribute((noreturn))"; if (CXXConstructorDecl *CDecl = dyn_cast<CXXConstructorDecl>(D)) { if (CDecl->getNumBaseOrMemberInitializers() > 0) { Proto += " : "; |