Index: lib/Sema/SemaDeclAttr.cpp
===================================================================
--- lib/Sema/SemaDeclAttr.cpp	(revision 151225)
+++ lib/Sema/SemaDeclAttr.cpp	(working copy)
@@ -3463,10 +3463,19 @@
 }
 
 static bool isKnownDeclSpecAttr(const AttributeList &Attr) {
-  return Attr.getKind() == AttributeList::AT_dllimport ||
-         Attr.getKind() == AttributeList::AT_dllexport ||
-         Attr.getKind() == AttributeList::AT_uuid ||
-         Attr.getKind() == AttributeList::AT_deprecated;
+  switch (Attr.getKind()) {
+  default:
+    return false;
+  case AttributeList::AT_dllimport:
+  case AttributeList::AT_dllexport:
+  case AttributeList::AT_uuid:
+  case AttributeList::AT_deprecated:
+  case AttributeList::AT_noreturn:
+  case AttributeList::AT_nothrow:
+  case AttributeList::AT_naked:
+  case AttributeList::AT_noinline:
+    return true;
+  }
 }
 
 //===----------------------------------------------------------------------===//
Index: test/CodeGen/attr-naked.c
===================================================================
--- test/CodeGen/attr-naked.c	(revision 151121)
+++ test/CodeGen/attr-naked.c	(working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 %s -emit-llvm -fms-compatibility -o - | FileCheck %s
 
 void t1() __attribute__((naked));
 
@@ -14,3 +14,6 @@
 // CHECK: define void @t2() nounwind noinline naked {
 __attribute((naked, always_inline)) void t2()  {
 }
+
+// CHECK: define void @t3() nounwind noinline naked {
+__declspec(naked) void t3() {}
\ No newline at end of file
Index: test/CodeGen/attr-noinline.c
===================================================================
--- test/CodeGen/attr-noinline.c	(revision 151121)
+++ test/CodeGen/attr-noinline.c	(working copy)
@@ -1,9 +1,12 @@
-// RUN: %clang_cc1 -g -emit-llvm -o %t %s
-// RUN: grep 'noinline' %t
+// RUN: %clang_cc1 -g -emit-llvm -fms-compatibility -o %t %s
+// RUN: FileCheck --input-file=%t %s
 
+// CHECK: define void @t1() nounwind noinline {
 void t1() __attribute__((noinline));
 
 void t1()
 {
 }
 
+// CHECK: define void @t2() nounwind noinline {
+__declspec(noinline) void t2() {}
\ No newline at end of file
Index: test/CodeGen/attributes.c
===================================================================
--- test/CodeGen/attributes.c	(revision 151121)
+++ test/CodeGen/attributes.c	(working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -triple i386-linux-gnu -o %t %s
+// RUN: %clang_cc1 -emit-llvm -triple i386-linux-gnu -fms-compatibility -o %t %s
 // RUN: FileCheck --input-file=%t %s
 
 // CHECK: @t5 = weak global i32 2
@@ -81,3 +81,7 @@
 }
 // CHECK: [[FPTRVAR:%[a-z0-9]+]] = load void (i32)** @fptr
 // CHECK-NEXT: call x86_fastcallcc void [[FPTRVAR]](i32 10)
+
+// CHECK: define void @t22() nounwind
+void __declspec(nothrow) t22();
+void t22() {}
Index: test/CodeGen/function-attributes.c
===================================================================
--- test/CodeGen/function-attributes.c	(revision 151121)
+++ test/CodeGen/function-attributes.c	(working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -fms-compatibility -Os -o - %s | FileCheck %s
 // CHECK: define signext i8 @f0(i32 %x) nounwind
 // CHECK: define zeroext i8 @f1(i32 %x) nounwind
 // CHECK: define void @f2(i8 signext %x) nounwind
@@ -36,6 +36,12 @@
 void __attribute__((noreturn)) f9_t(void);
 void f9(void) { f9_t(); }
 
+// CHECK: call void @f20_t()
+// CHECK: noreturn
+// CHECK: {
+__declspec(noreturn) void f20_t(void);
+void f20(void) { f20_t(); }
+
 // FIXME: We should be setting nounwind on calls.
 // CHECK: call i32 @f10_t()
 // CHECK: readnone
Index: test/Sema/attr-noreturn.c
===================================================================
--- test/Sema/attr-noreturn.c	(revision 151121)
+++ test/Sema/attr-noreturn.c	(working copy)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -verify -fsyntax-only -fms-compatibility %s
 
 static void (*fp0)(void) __attribute__((noreturn));
 
@@ -33,7 +33,7 @@
 void
 f5 (unsigned long size)
 {
-  
+
 }
 
 // PR2461
@@ -42,3 +42,7 @@
 }
 
 typedef void (*Fun)(void) __attribute__ ((noreturn(2))); // expected-error {{attribute takes no arguments}}
+
+__declspec(noreturn) void f6( void ) {
+	return;  // expected-error {{function 'f6' declared 'noreturn' should not return}}
+}
\ No newline at end of file
