From: Richard Smith Date: Wed, 10 Aug 2011 18:11:37 +0000 (+0000) Subject: Renamings to consistently use 'Constexpr' not 'ConstExpr' when referring to the C... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b8bc0707f26aa6acfdd80a59b9a3850cafbe387;p=clang Renamings to consistently use 'Constexpr' not 'ConstExpr' when referring to the C++0x 'constexpr' keyword. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137230 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 1ff9e55cf4..3d14ed88c7 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -1604,7 +1604,7 @@ public: /// Whether this is a constexpr function or constexpr constructor. // FIXME: C++0x: Implement tracking of the constexpr specifier. - bool isConstExpr() const { return false; } + bool isConstexpr() const { return false; } /// Whether this templated function will be late parsed. bool isLateTemplateParsed() const { return IsLateTemplateParsed; } diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 3ce45bc36b..01ca2e312d 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -363,10 +363,10 @@ class CXXRecordDecl : public RecordDecl { /// default constructor. bool HasTrivialDefaultConstructor : 1; - /// HasConstExprNonCopyMoveConstructor - True when this class has at least + /// HasConstexprNonCopyMoveConstructor - True when this class has at least /// one constexpr constructor which is neither the copy nor move /// constructor. - bool HasConstExprNonCopyMoveConstructor : 1; + bool HasConstexprNonCopyMoveConstructor : 1; /// HasTrivialCopyConstructor - True when this class has a trivial copy /// constructor. @@ -889,10 +889,10 @@ public: data().DeclaredDefaultConstructor); } - // hasConstExprNonCopyMoveConstructor - Whether this class has at least one + // hasConstexprNonCopyMoveConstructor - Whether this class has at least one // constexpr constructor other than the copy or move constructors - bool hasConstExprNonCopyMoveConstructor() const { - return data().HasConstExprNonCopyMoveConstructor; + bool hasConstexprNonCopyMoveConstructor() const { + return data().HasConstexprNonCopyMoveConstructor; } // hasTrivialCopyConstructor - Whether this class has a trivial copy diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp index aaa75dcad7..9e62f49ad7 100644 --- a/lib/AST/DeclCXX.cpp +++ b/lib/AST/DeclCXX.cpp @@ -35,7 +35,7 @@ CXXRecordDecl::DefinitionData::DefinitionData(CXXRecordDecl *D) Abstract(false), IsStandardLayout(true), HasNoNonEmptyBases(true), HasPrivateFields(false), HasProtectedFields(false), HasPublicFields(false), HasMutableFields(false), HasTrivialDefaultConstructor(true), - HasConstExprNonCopyMoveConstructor(false), HasTrivialCopyConstructor(true), + HasConstexprNonCopyMoveConstructor(false), HasTrivialCopyConstructor(true), HasTrivialMoveConstructor(true), HasTrivialCopyAssignment(true), HasTrivialMoveAssignment(true), HasTrivialDestructor(true), HasNonLiteralTypeFieldsOrBases(false), ComputedVisibleConversions(false), @@ -544,11 +544,10 @@ NotASpecialMember:; } } } - if (Constructor->isConstExpr() && - !Constructor->isCopyOrMoveConstructor()) { - // Record if we see any constexpr constructors which are niether copy + if (Constructor->isConstexpr() && !Constructor->isCopyOrMoveConstructor()) { + // Record if we see any constexpr constructors which are neither copy // nor move constructors. - data().HasConstExprNonCopyMoveConstructor = true; + data().HasConstexprNonCopyMoveConstructor = true; } // C++ [dcl.init.aggr]p1: diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 81627f2bf9..3b2154f1f6 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1144,7 +1144,7 @@ bool Type::isLiteralType() const { // constructor or constructor template that is not a copy or move // constructor, and if (!ClassDecl->isAggregate() && - !ClassDecl->hasConstExprNonCopyMoveConstructor()) + !ClassDecl->hasConstexprNonCopyMoveConstructor()) return false; // -- all non-static data members and base classes of literal types if (ClassDecl->hasNonLiteralTypeFieldsOrBases()) return false; diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index 0455b3291d..707ee8a8bb 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -873,7 +873,7 @@ void ASTDeclReader::ReadCXXDefinitionData( Data.HasPublicFields = Record[Idx++]; Data.HasMutableFields = Record[Idx++]; Data.HasTrivialDefaultConstructor = Record[Idx++]; - Data.HasConstExprNonCopyMoveConstructor = Record[Idx++]; + Data.HasConstexprNonCopyMoveConstructor = Record[Idx++]; Data.HasTrivialCopyConstructor = Record[Idx++]; Data.HasTrivialMoveConstructor = Record[Idx++]; Data.HasTrivialCopyAssignment = Record[Idx++]; diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index a4cd279112..1b33efc105 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -3965,7 +3965,7 @@ void ASTWriter::AddCXXDefinitionData(const CXXRecordDecl *D, RecordDataImpl &Rec Record.push_back(Data.HasPublicFields); Record.push_back(Data.HasMutableFields); Record.push_back(Data.HasTrivialDefaultConstructor); - Record.push_back(Data.HasConstExprNonCopyMoveConstructor); + Record.push_back(Data.HasConstexprNonCopyMoveConstructor); Record.push_back(Data.HasTrivialCopyConstructor); Record.push_back(Data.HasTrivialMoveConstructor); Record.push_back(Data.HasTrivialCopyAssignment);