aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclAttr.cpp
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2012-02-23 22:46:33 +0000
committerAaron Ballman <aaron@aaronballman.com>2012-02-23 22:46:33 +0000
commit9428772f16e379bcad35254251f96e3d1077c730 (patch)
tree3541d6aec69130b59746e015c0b3c9d7fc5bdfbc /lib/Sema/SemaDeclAttr.cpp
parent97df54e0c075bc8d6a869597e771dad0c11a2180 (diff)
Turned on support for __declspecs: noreturn, noinline, nothrow and naked in MS compatibility mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151295 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclAttr.cpp')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index daf225978e..f0fcd6e91c 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -3463,10 +3463,19 @@ static void handleObjCPreciseLifetimeAttr(Sema &S, Decl *D,
}
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;
+ }
}
//===----------------------------------------------------------------------===//