diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2017-12-04 20:27:34 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2017-12-04 20:27:34 +0000 |
commit | 8873bce640405f88e12e47a88420825ae52a4806 (patch) | |
tree | 2dfcf9e39f548449a3520fac6318977d2fd352b8 /lib/Sema/SemaInit.cpp | |
parent | ed697294de007483c0a18e6bf56b1dfd4b6b539a (diff) | |
download | clang-8873bce640405f88e12e47a88420825ae52a4806.tar.gz |
Now that C++17 is official (https://www.iso.org/standard/68564.html), start changing the C++1z terminology over to C++17. NFC intended, these are all mechanical changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaInit.cpp')
-rw-r--r-- | lib/Sema/SemaInit.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 5ece958ee6..e4789cdf53 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -3631,7 +3631,7 @@ ResolveConstructorOverload(Sema &S, SourceLocation DeclLoc, // // Note: SecondStepOfCopyInit is only ever true in this case when // evaluating whether to produce a C++98 compatibility warning. - if (S.getLangOpts().CPlusPlus1z && Args.size() == 1 && + if (S.getLangOpts().CPlusPlus17 && Args.size() == 1 && !SecondStepOfCopyInit) { Expr *Initializer = Args[0]; auto *SourceRD = Initializer->getType()->getAsCXXRecordDecl(); @@ -3701,7 +3701,7 @@ static void TryConstructorInitialization(Sema &S, return; } - // C++1z [dcl.init]p17: + // C++17 [dcl.init]p17: // - If the initializer expression is a prvalue and the cv-unqualified // version of the source type is the same class as the class of the // destination, the initializer expression is used to initialize the @@ -3710,7 +3710,7 @@ static void TryConstructorInitialization(Sema &S, // class or delegating to another constructor from a mem-initializer. // ObjC++: Lambda captured by the block in the lambda to block conversion // should avoid copy elision. - if (S.getLangOpts().CPlusPlus1z && + if (S.getLangOpts().CPlusPlus17 && Entity.getKind() != InitializedEntity::EK_Base && Entity.getKind() != InitializedEntity::EK_Delegating && Entity.getKind() != @@ -4078,7 +4078,7 @@ static void TryListInitialization(Sema &S, // value T(v); if a narrowing conversion is required to convert v to // the underlying type of T, the program is ill-formed. auto *ET = DestType->getAs<EnumType>(); - if (S.getLangOpts().CPlusPlus1z && + if (S.getLangOpts().CPlusPlus17 && Kind.getKind() == InitializationKind::IK_DirectList && ET && ET->getDecl()->isFixed() && !S.Context.hasSameUnqualifiedType(E->getType(), DestType) && @@ -4511,7 +4511,7 @@ static void TryReferenceInitializationCore(Sema &S, RefRelationship == Sema::Ref_Related)) && ((InitCategory.isXValue() && !isNonReferenceableGLValue(Initializer)) || (InitCategory.isPRValue() && - (S.getLangOpts().CPlusPlus1z || T2->isRecordType() || + (S.getLangOpts().CPlusPlus17 || T2->isRecordType() || T2->isArrayType())))) { ExprValueKind ValueKind = InitCategory.isXValue() ? VK_XValue : VK_RValue; if (InitCategory.isPRValue() && T2->isRecordType()) { @@ -4887,7 +4887,7 @@ static void TryUserDefinedConversion(Sema &S, // copy-initialization. // Note that this just performs a simple object copy from the temporary. // - // C++1z: + // C++17: // - if the function is a constructor, the call is a prvalue of the // cv-unqualified version of the destination type whose return object // is initialized by the constructor. The call is used to @@ -4896,7 +4896,7 @@ static void TryUserDefinedConversion(Sema &S, // Therefore we need to do nothing further. // // FIXME: Mark this copy as extraneous. - if (!S.getLangOpts().CPlusPlus1z) + if (!S.getLangOpts().CPlusPlus17) Sequence.AddFinalCopy(DestType); else if (DestType.hasQualifiers()) Sequence.AddQualificationConversionStep(DestType, VK_RValue); @@ -4912,13 +4912,13 @@ static void TryUserDefinedConversion(Sema &S, // The call is used to direct-initialize [...] the object that is the // destination of the copy-initialization. // - // In C++1z, this does not call a constructor if we enter /17.6.1: + // In C++17, this does not call a constructor if we enter /17.6.1: // - If the initializer expression is a prvalue and the cv-unqualified // version of the source type is the same as the class of the // destination [... do not make an extra copy] // // FIXME: Mark this copy as extraneous. - if (!S.getLangOpts().CPlusPlus1z || + if (!S.getLangOpts().CPlusPlus17 || Function->getReturnType()->isReferenceType() || !S.Context.hasSameUnqualifiedType(ConvType, DestType)) Sequence.AddFinalCopy(DestType); |