summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-06-24 23:57:13 +0000
committerHans Wennborg <hans@hanshq.net>2014-06-24 23:57:13 +0000
commitd03ed82c9d0c2fb1a03e4f8e1f2107a5fe15ec63 (patch)
tree4e5051518f4b3c9f2fb3e8af4320e2febb04c420 /lib
parent2c183aa7d4674ae3bea0cd1611415a8e8fe447f6 (diff)
downloadclang-d03ed82c9d0c2fb1a03e4f8e1f2107a5fe15ec63.tar.gz
clang-d03ed82c9d0c2fb1a03e4f8e1f2107a5fe15ec63.tar.bz2
clang-d03ed82c9d0c2fb1a03e4f8e1f2107a5fe15ec63.tar.xz
MS ABI: Ignore dll attributes on partial template specializations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211648 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaDeclAttr.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index af216d26e5..dcb6530552 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -3858,6 +3858,13 @@ DLLExportAttr *Sema::mergeDLLExportAttr(Decl *D, SourceRange Range,
}
static void handleDLLAttr(Sema &S, Decl *D, const AttributeList &A) {
+ if (isa<ClassTemplatePartialSpecializationDecl>(D) &&
+ S.Context.getTargetInfo().getCXXABI().isMicrosoft()) {
+ S.Diag(A.getRange().getBegin(), diag::warn_attribute_ignored)
+ << A.getName();
+ return;
+ }
+
unsigned Index = A.getAttributeSpellingListIndex();
Attr *NewAttr = A.getKind() == AttributeList::AT_DLLExport
? (Attr *)S.mergeDLLExportAttr(D, A.getRange(), Index)