[clang] 772f482 - Change while to do-while
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 25 09:30:39 PDT 2020
Author: Seija Kijin
Date: 2020-06-25T09:30:30-07:00
New Revision: 772f4826465de80d8c7f11b2fb35b92f9fe58f45
URL: https://github.com/llvm/llvm-project/commit/772f4826465de80d8c7f11b2fb35b92f9fe58f45
DIFF: https://github.com/llvm/llvm-project/commit/772f4826465de80d8c7f11b2fb35b92f9fe58f45.diff
LOG: Change while to do-while
Differential Revision: https://reviews.llvm.org/D70603
Added:
Modified:
clang/lib/Analysis/ReachableCode.cpp
Removed:
################################################################################
diff --git a/clang/lib/Analysis/ReachableCode.cpp b/clang/lib/Analysis/ReachableCode.cpp
index 369879ad65f5..221d137dadb8 100644
--- a/clang/lib/Analysis/ReachableCode.cpp
+++ b/clang/lib/Analysis/ReachableCode.cpp
@@ -138,10 +138,10 @@ static bool isDeadReturn(const CFGBlock *B, const Stmt *S) {
static SourceLocation getTopMostMacro(SourceLocation Loc, SourceManager &SM) {
assert(Loc.isMacroID());
SourceLocation Last;
- while (Loc.isMacroID()) {
+ do {
Last = Loc;
Loc = SM.getImmediateMacroCallerLoc(Loc);
- }
+ } while (Loc.isMacroID());
return Last;
}
More information about the cfe-commits
mailing list