diff clang/lib/Analysis/ReachableCode.cpp @ 221:79ff65ed7e25

LLVM12 Original
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 15 Jun 2021 19:15:29 +0900
parents 1d019706d866
children c4bab56944e8
line wrap: on
line diff
--- a/clang/lib/Analysis/ReachableCode.cpp	Tue Jun 15 19:13:43 2021 +0900
+++ b/clang/lib/Analysis/ReachableCode.cpp	Tue Jun 15 19:15:29 2021 +0900
@@ -138,10 +138,10 @@
 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;
 }