summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaCast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaCast.cpp')
-rw-r--r--clang/lib/Sema/SemaCast.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaCast.cpp b/clang/lib/Sema/SemaCast.cpp
index a669956422c..b7f4629fbab 100644
--- a/clang/lib/Sema/SemaCast.cpp
+++ b/clang/lib/Sema/SemaCast.cpp
@@ -93,8 +93,8 @@ namespace {
// Walk down from the CE to the OrigSrcExpr, and mark all immediate
// ImplicitCastExpr's as being part of ExplicitCastExpr. The original CE
// (which is a ExplicitCastExpr), and the OrigSrcExpr are not touched.
- while ((CE = dyn_cast<ImplicitCastExpr>(CE->getSubExpr())))
- CE->setIsPartOfExplicitCast(true);
+ for (; auto *ICE = dyn_cast<ImplicitCastExpr>(CE->getSubExpr()); CE = ICE)
+ ICE->setIsPartOfExplicitCast(true);
}
/// Complete an apparently-successful cast operation that yields
OpenPOWER on IntegriCloud