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
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index bf2d3cc..d168a90 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3705,7 +3705,9 @@
     if (!FD->getAttr<FormatAttr>())
       FD->addAttr(::new (Context) FormatAttr("printf", 2,
                                              Name->isStr("vasprintf") ? 0 : 3));
-  }
+  } else if (Name->isStr("longjmp") &&
+             !FD->hasAttr<NoReturnAttr>())
+    FD->addAttr(::new (Context) NoReturnAttr());
 }
 
 TypedefDecl *Sema::ParseTypedefDecl(Scope *S, Declarator &D, QualType T) {