diff options
author | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-06-05 12:23:28 +0000 |
---|---|---|
committer | Sebastian Redl <sebastian.redl@getdesigned.at> | 2011-06-05 12:23:28 +0000 |
commit | 383616cd2e61131a534afd9364ef53f643e1f834 (patch) | |
tree | a0ca9ede48a1dd1b745e5f5a8e06f47d50786759 /lib/Sema/SemaCXXCast.cpp | |
parent | 064e2366cc42ef81e939afbdaf3099af58e6620e (diff) |
Remove all references to InitializationSequence::FailedSequence from outside SemaInit.cpp. Replace them with the boolean conversion or the new Failed() function. This is a first step towards removing InitializationSequence::SequenceKind. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaCXXCast.cpp')
-rw-r--r-- | lib/Sema/SemaCXXCast.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Sema/SemaCXXCast.cpp b/lib/Sema/SemaCXXCast.cpp index 32fd0be375..e46ad5bcfe 100644 --- a/lib/Sema/SemaCXXCast.cpp +++ b/lib/Sema/SemaCXXCast.cpp @@ -252,8 +252,7 @@ static bool tryDiagnoseOverloadedCast(Sema &S, CastType CT, (CT == CT_CStyle || CT == CT_Functional)); InitializationSequence sequence(S, entity, initKind, &src, 1); - assert(sequence.getKind() == InitializationSequence::FailedSequence && - "initialization succeeded on second try?"); + assert(sequence.Failed() && "initialization succeeded on second try?"); switch (sequence.getFailureKind()) { default: return false; @@ -1195,8 +1194,7 @@ TryStaticImplicitCast(Sema &Self, ExprResult &SrcExpr, QualType DestType, // On the other hand, if we're checking a C-style cast, we've still got // the reinterpret_cast way. - if (InitSeq.getKind() == InitializationSequence::FailedSequence && - (CStyle || !DestType->isReferenceType())) + if (InitSeq.Failed() && (CStyle || !DestType->isReferenceType())) return TC_NotApplicable; ExprResult Result |