aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/DeclCXX.h10
-rw-r--r--lib/AST/DeclCXX.cpp28
-rw-r--r--lib/AST/Type.cpp4
-rw-r--r--lib/Serialization/ASTReaderDecl.cpp2
-rw-r--r--lib/Serialization/ASTWriter.cpp2
5 files changed, 23 insertions, 23 deletions
diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h
index bee290f8f1..9d337382a5 100644
--- a/include/clang/AST/DeclCXX.h
+++ b/include/clang/AST/DeclCXX.h
@@ -306,7 +306,7 @@ class CXXRecordDecl : public RecordDecl {
/// one pure virtual function, (that can come from a base class).
bool Abstract : 1;
- /// HasStandardLayout - True when this class has standard layout.
+ /// IsStandardLayout - True when this class has standard layout.
///
/// C++0x [class]p7. A standard-layout class is a class that:
/// * has no non-static data members of type non-standard-layout class (or
@@ -319,11 +319,11 @@ class CXXRecordDecl : public RecordDecl {
/// classes with non-static data members, and
/// * has no base classes of the same type as the first non-static data
/// member.
- bool HasStandardLayout : 1;
+ bool IsStandardLayout : 1;
/// HasNoNonEmptyBases - True when there are no non-empty base classes.
///
- /// This is a helper bit of state used to implement HasStandardLayout more
+ /// This is a helper bit of state used to implement IsStandardLayout more
/// efficiently.
bool HasNoNonEmptyBases : 1;
@@ -796,9 +796,9 @@ public:
/// which means that the class contains or inherits a pure virtual function.
bool isAbstract() const { return data().Abstract; }
- /// hasStandardLayout - Whether this class has standard layout
+ /// isStandardLayout - Whether this class has standard layout
/// (C++ [class]p7)
- bool hasStandardLayout() const { return data().HasStandardLayout; }
+ bool isStandardLayout() const { return data().IsStandardLayout; }
// hasTrivialConstructor - Whether this class has a trivial constructor
// (C++ [class.ctor]p5)
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index d5ec263126..9099cd524f 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -31,7 +31,7 @@ CXXRecordDecl::DefinitionData::DefinitionData(CXXRecordDecl *D)
: UserDeclaredConstructor(false), UserDeclaredCopyConstructor(false),
UserDeclaredCopyAssignment(false), UserDeclaredDestructor(false),
Aggregate(true), PlainOldData(true), Empty(true), Polymorphic(false),
- Abstract(false), HasStandardLayout(true), HasNoNonEmptyBases(true),
+ Abstract(false), IsStandardLayout(true), HasNoNonEmptyBases(true),
HasPrivateFields(false), HasProtectedFields(false), HasPublicFields(false),
HasTrivialConstructor(true), HasConstExprNonCopyMoveConstructor(false),
HasTrivialCopyConstructor(true), HasTrivialMoveConstructor(true),
@@ -122,7 +122,7 @@ CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases,
// or has no base classes with non-static data members, and
// If this is the second non-empty base, then neither of these two
// clauses can be true.
- data().HasStandardLayout = false;
+ data().IsStandardLayout = false;
}
data().Empty = false;
@@ -138,8 +138,8 @@ CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases,
// C++0x [class]p7:
// A standard-layout class is a class that: [...]
// -- has no non-standard-layout base classes
- if (!BaseClassDecl->hasStandardLayout())
- data().HasStandardLayout = false;
+ if (!BaseClassDecl->isStandardLayout())
+ data().IsStandardLayout = false;
// Record if this base is the first non-literal field or base.
if (!hasNonLiteralTypeFieldsOrBases() && !BaseType->isLiteralType())
@@ -185,7 +185,7 @@ CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases,
// C++0x [class]p7:
// A standard-layout class is a class that: [...]
// -- has [...] no virtual base classes
- data().HasStandardLayout = false;
+ data().IsStandardLayout = false;
} else {
// C++ [class.ctor]p5:
// A constructor is trivial if all the direct base classes of its
@@ -440,7 +440,7 @@ void CXXRecordDecl::addedMember(Decl *D) {
// C++0x [class]p7:
// A standard-layout class is a class that: [...]
// -- has no virtual functions
- data().HasStandardLayout = false;
+ data().IsStandardLayout = false;
}
}
@@ -665,7 +665,7 @@ void CXXRecordDecl::addedMember(Decl *D) {
};
if ((data().HasPrivateFields + data().HasProtectedFields +
data().HasPublicFields) > 1)
- data().HasStandardLayout = false;
+ data().IsStandardLayout = false;
// C++0x [class]p9:
// A POD struct is a class that is both a trivial class and a
@@ -681,7 +681,7 @@ void CXXRecordDecl::addedMember(Decl *D) {
// C++0x [class]p7:
// A standard-layout class is a class that:
// -- has no non-static data members of type [...] reference,
- data().HasStandardLayout = false;
+ data().IsStandardLayout = false;
}
// Record if this field is the first non-literal field or base.
@@ -725,8 +725,8 @@ void CXXRecordDecl::addedMember(Decl *D) {
// A standard-layout class is a class that:
// -- has no non-static data members of type non-standard-layout
// class (or array of such types) [...]
- if (!FieldRec->hasStandardLayout())
- data().HasStandardLayout = false;
+ if (!FieldRec->isStandardLayout())
+ data().IsStandardLayout = false;
// C++0x [class]p7:
// A standard-layout class is a class that:
@@ -740,15 +740,15 @@ void CXXRecordDecl::addedMember(Decl *D) {
// also make it non-standard-layout so we needn't check here.
// A non-empty base class may leave the class standard-layout, but not
// if we have arrived here, and have at least on non-static data
- // member. If HasStandardLayout remains true, then the first non-static
+ // member. If IsStandardLayout remains true, then the first non-static
// data member must come through here with Empty still true, and Empty
// will subsequently be set to false below.
- if (data().HasStandardLayout && data().Empty) {
+ if (data().IsStandardLayout && data().Empty) {
for (CXXRecordDecl::base_class_const_iterator BI = bases_begin(),
BE = bases_end();
BI != BE; ++BI) {
if (Context.hasSameUnqualifiedType(BI->getType(), T)) {
- data().HasStandardLayout = false;
+ data().IsStandardLayout = false;
break;
}
}
@@ -765,7 +765,7 @@ void CXXRecordDecl::addedMember(Decl *D) {
// At this point we know that we have a non-static data member, so the last
// clause holds.
if (!data().HasNoNonEmptyBases)
- data().HasStandardLayout = false;
+ data().IsStandardLayout = false;
// If this is not a zero-length bit-field, then the class is not empty.
if (data().Empty) {
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index dbced252aa..d359265090 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -957,7 +957,7 @@ bool Type::isStandardLayoutType() const {
if (const RecordType *RT = BaseTy->getAs<RecordType>()) {
if (const CXXRecordDecl *ClassDecl =
dyn_cast<CXXRecordDecl>(RT->getDecl()))
- if (!ClassDecl->hasStandardLayout())
+ if (!ClassDecl->isStandardLayout())
return false;
// Default to 'true' for non-C++ class types.
@@ -997,7 +997,7 @@ bool Type::isCXX11PODType() const {
// C++11 [class]p10:
// A POD struct is a non-union class that is both a trivial class and
// a standard-layout class [...]
- if (!ClassDecl->hasStandardLayout()) return false;
+ if (!ClassDecl->isStandardLayout()) return false;
// C++11 [class]p10:
// A POD struct is a non-union class that is both a trivial class and
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp
index 5cb51a05f6..481763e91a 100644
--- a/lib/Serialization/ASTReaderDecl.cpp
+++ b/lib/Serialization/ASTReaderDecl.cpp
@@ -842,7 +842,7 @@ void ASTDeclReader::ReadCXXDefinitionData(
Data.Empty = Record[Idx++];
Data.Polymorphic = Record[Idx++];
Data.Abstract = Record[Idx++];
- Data.HasStandardLayout = Record[Idx++];
+ Data.IsStandardLayout = Record[Idx++];
Data.HasNoNonEmptyBases = Record[Idx++];
Data.HasPrivateFields = Record[Idx++];
Data.HasProtectedFields = Record[Idx++];
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp
index cc951b1a4b..52c28ff6e8 100644
--- a/lib/Serialization/ASTWriter.cpp
+++ b/lib/Serialization/ASTWriter.cpp
@@ -3782,7 +3782,7 @@ void ASTWriter::AddCXXDefinitionData(const CXXRecordDecl *D, RecordDataImpl &Rec
Record.push_back(Data.Empty);
Record.push_back(Data.Polymorphic);
Record.push_back(Data.Abstract);
- Record.push_back(Data.HasStandardLayout);
+ Record.push_back(Data.IsStandardLayout);
Record.push_back(Data.HasNoNonEmptyBases);
Record.push_back(Data.HasPrivateFields);
Record.push_back(Data.HasProtectedFields);