summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCXXCast.cpp
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2011-06-05 12:23:28 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2011-06-05 12:23:28 +0000
commitc7ca58751261239817c7e90590549a5039ef37b9 (patch)
treef4d4038f30348e9c7c11322cbcb285e69a6e129f /clang/lib/Sema/SemaCXXCast.cpp
parentf08872fb29135cb43bfcfa90c440cd54297aec72 (diff)
downloadbcm5719-llvm-c7ca58751261239817c7e90590549a5039ef37b9.tar.gz
bcm5719-llvm-c7ca58751261239817c7e90590549a5039ef37b9.zip
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.
llvm-svn: 132664
Diffstat (limited to 'clang/lib/Sema/SemaCXXCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCXXCast.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaCXXCast.cpp b/clang/lib/Sema/SemaCXXCast.cpp
index 32fd0be375e..e46ad5bcfeb 100644
--- a/clang/lib/Sema/SemaCXXCast.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud