diff options
Diffstat (limited to 'lib/AST')
-rw-r--r-- | lib/AST/DeclCXX.cpp | 32 | ||||
-rw-r--r-- | lib/AST/MicrosoftMangle.cpp | 14 |
2 files changed, 23 insertions, 23 deletions
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index c68a16bdae..d2549eedd5 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -463,14 +463,14 @@ void CXXRecordDecl::markedConstructorConstexpr(CXXConstructorDecl *CD) { } void CXXRecordDecl::addedMember(Decl *D) { - if (!D->isImplicit() &&
- !isa<FieldDecl>(D) &&
- !isa<IndirectFieldDecl>(D) &&
- (!isa<TagDecl>(D) || cast<TagDecl>(D)->getTagKind() == TTK_Class ||
- cast<TagDecl>(D)->getTagKind() == TTK_Interface))
- data().HasOnlyCMembers = false;
-
- // Ignore friends and invalid declarations.
+ if (!D->isImplicit() && + !isa<FieldDecl>(D) && + !isa<IndirectFieldDecl>(D) && + (!isa<TagDecl>(D) || cast<TagDecl>(D)->getTagKind() == TTK_Class || + cast<TagDecl>(D)->getTagKind() == TTK_Interface)) + data().HasOnlyCMembers = false; + + // Ignore friends and invalid declarations. if (D->getFriendObjectKind() || D->isInvalidDecl()) return; @@ -934,14 +934,14 @@ NotASpecialMember:; if (Shadow->getDeclName().getNameKind() == DeclarationName::CXXConversionFunctionName) data().Conversions.addDecl(Shadow, Shadow->getAccess()); -}
-
-bool CXXRecordDecl::isCLike() const {
- if (getTagKind() == TTK_Class || getTagKind() == TTK_Interface ||
- !TemplateOrInstantiation.isNull())
- return false;
- if (!hasDefinition())
- return true;
+} + +bool CXXRecordDecl::isCLike() const { + if (getTagKind() == TTK_Class || getTagKind() == TTK_Interface || + !TemplateOrInstantiation.isNull()) + return false; + if (!hasDefinition()) + return true; return isPOD() && data().HasOnlyCMembers; } diff --git a/lib/AST/MicrosoftMangle.cpp b/lib/AST/MicrosoftMangle.cpp index f0041b2422..bf72b506b6 100644 --- a/lib/AST/MicrosoftMangle.cpp +++ b/lib/AST/MicrosoftMangle.cpp @@ -1270,13 +1270,13 @@ void MicrosoftCXXNameMangler::mangleType(const RecordType *T, SourceRange) { void MicrosoftCXXNameMangler::mangleType(const TagType *T) { switch (T->getDecl()->getTagKind()) { case TTK_Union: - Out << 'T';
- break;
- case TTK_Struct:
- case TTK_Interface:
- Out << 'U';
- break;
- case TTK_Class:
+ Out << 'T'; + break; + case TTK_Struct: + case TTK_Interface: + Out << 'U'; + break; + case TTK_Class: Out << 'V'; break; case TTK_Enum: |