Skip to content

Commit c8499ae

Browse files
committedJul 5, 2019
Removed the test case added in D63538 due to windows buildbot failures
llvm-svn: 365209
1 parent b557456 commit c8499ae

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed
 

‎clang/unittests/Analysis/CFGTest.cpp

-38
Original file line numberDiff line numberDiff line change
@@ -67,44 +67,6 @@ TEST(CFG, IsLinear) {
6767
expectLinear(true, "void foo() { foo(); }"); // Recursion is not our problem.
6868
}
6969

70-
TEST(CFG, ConditionExpr) {
71-
const char *Code = R"(void f(bool A, bool B, bool C) {
72-
if (A && B && C)
73-
int x;
74-
})";
75-
BuildResult Result = BuildCFG(Code);
76-
EXPECT_EQ(BuildResult::BuiltCFG, Result.getStatus());
77-
78-
// [B5 (ENTRY)] -> [B4] -> [B3] -> [B2] -> [B1] -> [B0 (EXIT)]
79-
// \ \ \ /
80-
// ------------------------------->
81-
82-
CFG *cfg = Result.getCFG();
83-
84-
auto GetBlock = [cfg] (unsigned Index) -> CFGBlock * {
85-
assert(Index < cfg->size());
86-
return *(cfg->begin() + Index);
87-
};
88-
89-
EXPECT_EQ(GetBlock(1)->getLastCondition(), nullptr);
90-
// Unfortunately, we can't check whether the correct Expr was returned by
91-
// getLastCondition, because the lifetime of the AST ends by the time we
92-
// retrieve the CFG.
93-
94-
//===--------------------------------------------------------------------===//
95-
96-
Code = R"(void foo(int x, int y) {
97-
(void)(x + y);
98-
})";
99-
Result = BuildCFG(Code);
100-
EXPECT_EQ(BuildResult::BuiltCFG, Result.getStatus());
101-
102-
// [B2 (ENTRY)] -> [B1] -> [B0 (EXIT)]
103-
104-
cfg = Result.getCFG();
105-
EXPECT_EQ(GetBlock(1)->getLastCondition(), nullptr);
106-
}
107-
10870
} // namespace
10971
} // namespace analysis
11072
} // namespace clang

0 commit comments

Comments
 (0)
Please sign in to comment.