Author: aaronballman Date: Tue Jul 21 16:07:11 2015 New Revision: 242835 URL: http://llvm.org/viewvc/llvm-project?rev=242835&view=rev Log: Replace some uses of Self.Context with the local variable C; NFC.
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=242835&r1=242834&r2=242835&view=diff ============================================================================== --- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original) +++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Tue Jul 21 16:07:11 2015 @@ -3696,15 +3696,15 @@ static bool EvaluateUnaryTypeTrait(Sema case UTT_IsVolatile: return T.isVolatileQualified(); case UTT_IsTrivial: - return T.isTrivialType(Self.Context); + return T.isTrivialType(C); case UTT_IsTriviallyCopyable: - return T.isTriviallyCopyableType(Self.Context); + return T.isTriviallyCopyableType(C); case UTT_IsStandardLayout: return T->isStandardLayoutType(); case UTT_IsPOD: - return T.isPODType(Self.Context); + return T.isPODType(C); case UTT_IsLiteral: - return T->isLiteralType(Self.Context); + return T->isLiteralType(C); case UTT_IsEmpty: if (const CXXRecordDecl *RD = T->getAsCXXRecordDecl()) return !RD->isUnion() && RD->isEmpty(); @@ -3755,7 +3755,7 @@ static bool EvaluateUnaryTypeTrait(Sema // If __is_pod (type) is true then the trait is true, else if type is // a cv class or union type (or array thereof) with a trivial default // constructor ([class.ctor]) then the trait is true, else it is false. - if (T.isPODType(Self.Context)) + if (T.isPODType(C)) return true; if (CXXRecordDecl *RD = C.getBaseElementType(T)->getAsCXXRecordDecl()) return RD->hasTrivialDefaultConstructor() && @@ -3765,7 +3765,7 @@ static bool EvaluateUnaryTypeTrait(Sema // This trait is implemented by MSVC 2012 and needed to parse the // standard library headers. Specifically this is used as the logic // behind std::is_trivially_move_constructible (20.9.4.3). - if (T.isPODType(Self.Context)) + if (T.isPODType(C)) return true; if (CXXRecordDecl *RD = C.getBaseElementType(T)->getAsCXXRecordDecl()) return RD->hasTrivialMoveConstructor() && !RD->hasNonTrivialMoveConstructor(); @@ -3776,7 +3776,7 @@ static bool EvaluateUnaryTypeTrait(Sema // the trait is true, else if type is a cv class or union type // with a trivial copy constructor ([class.copy]) then the trait // is true, else it is false. - if (T.isPODType(Self.Context) || T->isReferenceType()) + if (T.isPODType(C) || T->isReferenceType()) return true; if (CXXRecordDecl *RD = T->getAsCXXRecordDecl()) return RD->hasTrivialCopyConstructor() && @@ -3786,7 +3786,7 @@ static bool EvaluateUnaryTypeTrait(Sema // This trait is implemented by MSVC 2012 and needed to parse the // standard library headers. Specifically it is used as the logic // behind std::is_trivially_move_assignable (20.9.4.3) - if (T.isPODType(Self.Context)) + if (T.isPODType(C)) return true; if (CXXRecordDecl *RD = C.getBaseElementType(T)->getAsCXXRecordDecl()) return RD->hasTrivialMoveAssignment() && !RD->hasNonTrivialMoveAssignment(); @@ -3806,7 +3806,7 @@ static bool EvaluateUnaryTypeTrait(Sema if (T.isConstQualified()) return false; - if (T.isPODType(Self.Context)) + if (T.isPODType(C)) return true; if (CXXRecordDecl *RD = T->getAsCXXRecordDecl()) return RD->hasTrivialCopyAssignment() && @@ -3823,7 +3823,7 @@ static bool EvaluateUnaryTypeTrait(Sema // type (or array thereof) with a trivial destructor // ([class.dtor]) then the trait is true, else it is // false. - if (T.isPODType(Self.Context) || T->isReferenceType()) + if (T.isPODType(C) || T->isReferenceType()) return true; // Objective-C++ ARC: autorelease types don't require destruction. @@ -3847,7 +3847,7 @@ static bool EvaluateUnaryTypeTrait(Sema return false; if (T->isReferenceType()) return false; - if (T.isPODType(Self.Context) || T->isObjCLifetimeType()) + if (T.isPODType(C) || T->isObjCLifetimeType()) return true; if (const RecordType *RT = T->getAs<RecordType>()) @@ -3860,7 +3860,7 @@ static bool EvaluateUnaryTypeTrait(Sema // This trait is implemented by MSVC 2012 and needed to parse the // standard library headers. Specifically this is used as the logic // behind std::is_nothrow_move_assignable (20.9.4.3). - if (T.isPODType(Self.Context)) + if (T.isPODType(C)) return true; if (const RecordType *RT = C.getBaseElementType(T)->getAs<RecordType>()) @@ -3902,7 +3902,7 @@ static bool EvaluateUnaryTypeTrait(Sema return false; // TODO: check whether evaluating default arguments can throw. // For now, we'll be conservative and assume that they can throw. - if (!CPT->isNothrow(Self.Context) || CPT->getNumParams() > 1) + if (!CPT->isNothrow(C) || CPT->getNumParams() > 1) return false; } } @@ -3940,7 +3940,7 @@ static bool EvaluateUnaryTypeTrait(Sema return false; // FIXME: check whether evaluating default arguments can throw. // For now, we'll be conservative and assume that they can throw. - if (!CPT->isNothrow(Self.Context) || CPT->getNumParams() > 0) + if (!CPT->isNothrow(C) || CPT->getNumParams() > 0) return false; } } _______________________________________________ cfe-commits mailing list cfe-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits