One can use "class" and "struct" interchangeably to refer to a class
in C++. Fixes <rdar://problem/6815995>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70784 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 9647740..69989b1 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -3295,7 +3295,7 @@
if (TK == TK_Reference || isDeclInScope(PrevDecl, SearchDC, S)) {
// Make sure that this wasn't declared as an enum and now used as a
// struct or something similar.
- if (PrevTagDecl->getTagKind() != Kind) {
+ if (!isAcceptableTagRedeclaration(PrevTagDecl->getTagKind(), Kind)) {
bool SafeToContinue
= (PrevTagDecl->getTagKind() != TagDecl::TK_enum &&
Kind != TagDecl::TK_enum);