diff options
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index ec0c27b2d2e..09fcf1c8cbe 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -9111,9 +9111,11 @@ Sema::FinalizeDeclaration(Decl *ThisDecl) { VD->isThisDeclarationADefinition()) { // We allow definitions of dllimport class template static data members // with a warning. + CXXRecordDecl *Context = + cast<CXXRecordDecl>(VD->getFirstDecl()->getDeclContext()); bool IsClassTemplateMember = - cast<CXXRecordDecl>(VD->getFirstDecl()->getDeclContext()) - ->getDescribedClassTemplate(); + isa<ClassTemplatePartialSpecializationDecl>(Context) || + Context->getDescribedClassTemplate(); Diag(VD->getLocation(), IsClassTemplateMember |