projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c55051e
)
Change while to do-while
author
Seija Kijin
<doremylover123@gmail.com>
Thu, 25 Jun 2020 16:29:50 +0000
(09:29 -0700)
committer
Fangrui Song
<maskray@google.com>
Thu, 25 Jun 2020 16:30:30 +0000
(09:30 -0700)
Differential Revision: https://reviews.llvm.org/D70603
clang/lib/Analysis/ReachableCode.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Analysis/ReachableCode.cpp
b/clang/lib/Analysis/ReachableCode.cpp
index
369879a
..
221d137
100644
(file)
--- 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;
}