From e03ea6bfdf374a94d2b96a06b5f91a16d810c2d3 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Fri, 7 May 2021 11:42:16 -0700 Subject: [PATCH] [unittest] Fix -Wunused-variable after D94717 --- unittests/Analysis/LoopInfoTest.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/unittests/Analysis/LoopInfoTest.cpp b/unittests/Analysis/LoopInfoTest.cpp index db6484f6928..550458c2701 100644 --- a/unittests/Analysis/LoopInfoTest.cpp +++ b/unittests/Analysis/LoopInfoTest.cpp @@ -1534,8 +1534,7 @@ TEST(LoopInfoTest, LoopUserBranch) { runWithLoopInfo(*M, "foo", [&](Function &F, LoopInfo &LI) { Function::iterator FI = F.begin(); FI = ++FI; - BasicBlock *Guard = &*FI; - assert(Guard->getName() == "guard"); + assert(FI->getName() == "guard"); FI = ++FI; BasicBlock *Header = &*(++FI);