From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- clang/lib/Analysis/ReachableCode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/lib/Analysis/ReachableCode.cpp') 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; } -- cgit v1.2.3