Skip to content

Commit 28dfc43

Browse files
committed
Format
1 parent 12293ce commit 28dfc43

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

llvm/unittests/Analysis/AliasAnalysisTest.cpp

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,9 @@ TEST_F(AliasAnalysisTest, PartialAliasOffsetSign) {
367367

368368
TEST_F(AliasAnalysisTest, IsNoAliasForInstructions) {
369369
// Create global variable
370-
auto *GlobalVar = new GlobalVariable(M, Type::getInt32Ty(C), false,
371-
GlobalValue::ExternalLinkage,
372-
ConstantInt::get(Type::getInt32Ty(C), 0),
373-
"g");
370+
auto *GlobalVar = new GlobalVariable(
371+
M, Type::getInt32Ty(C), false, GlobalValue::ExternalLinkage,
372+
ConstantInt::get(Type::getInt32Ty(C), 0), "g");
374373
GlobalVar->setAlignment(Align(4));
375374

376375
// Create function declarations
@@ -380,15 +379,18 @@ TEST_F(AliasAnalysisTest, IsNoAliasForInstructions) {
380379

381380
// Create test function
382381
FunctionType *TestFnTy = FunctionType::get(Type::getInt32Ty(C), false);
383-
Function *TestFn = Function::Create(TestFnTy, Function::ExternalLinkage, "test", M);
384-
382+
Function *TestFn =
383+
Function::Create(TestFnTy, Function::ExternalLinkage, "test", M);
384+
385385
// Create basic block
386386
BasicBlock *BB = BasicBlock::Create(C, "entry", TestFn);
387-
387+
388388
// Create instructions
389389
auto *Alloca = new AllocaInst(Type::getInt32Ty(C), 0, "p", BB);
390-
auto *Store1 = new StoreInst(ConstantInt::get(Type::getInt32Ty(C), 42), Alloca, BB);
391-
auto *Store2 = new StoreInst(ConstantInt::get(Type::getInt32Ty(C), 100), GlobalVar, BB);
390+
auto *Store1 =
391+
new StoreInst(ConstantInt::get(Type::getInt32Ty(C), 42), Alloca, BB);
392+
auto *Store2 =
393+
new StoreInst(ConstantInt::get(Type::getInt32Ty(C), 100), GlobalVar, BB);
392394
auto *Call1 = CallInst::Create(M.getFunction("foo"), {}, BB);
393395
auto *Call2 = CallInst::Create(M.getFunction("bar"), {}, BB);
394396
auto *Load = new LoadInst(Type::getInt32Ty(C), Alloca, "val", BB);
@@ -401,7 +403,6 @@ TEST_F(AliasAnalysisTest, IsNoAliasForInstructions) {
401403
EXPECT_EQ(false, AA.isNoAlias(Store2, Call1));
402404
EXPECT_EQ(false, AA.isNoAlias(Call1, Call2));
403405
EXPECT_EQ(true, AA.isNoAlias(Store2, Load));
404-
405406
}
406407

407408
class AAPassInfraTest : public testing::Test {

0 commit comments

Comments
 (0)