From: Kristof Umann Date: Fri, 5 Jul 2019 14:22:10 +0000 (+0000) Subject: Removed the test case added in D63538 due to windows buildbot failures X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f15ef85a401973e3e566ae788f44b50c39ad5c9;p=clang Removed the test case added in D63538 due to windows buildbot failures git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365209 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Analysis/CFGTest.cpp b/unittests/Analysis/CFGTest.cpp index 2ab3b6403a..7cd3da2db5 100644 --- a/unittests/Analysis/CFGTest.cpp +++ b/unittests/Analysis/CFGTest.cpp @@ -67,44 +67,6 @@ TEST(CFG, IsLinear) { expectLinear(true, "void foo() { foo(); }"); // Recursion is not our problem. } -TEST(CFG, ConditionExpr) { - const char *Code = R"(void f(bool A, bool B, bool C) { - if (A && B && C) - int x; - })"; - BuildResult Result = BuildCFG(Code); - EXPECT_EQ(BuildResult::BuiltCFG, Result.getStatus()); - - // [B5 (ENTRY)] -> [B4] -> [B3] -> [B2] -> [B1] -> [B0 (EXIT)] - // \ \ \ / - // -------------------------------> - - CFG *cfg = Result.getCFG(); - - auto GetBlock = [cfg] (unsigned Index) -> CFGBlock * { - assert(Index < cfg->size()); - return *(cfg->begin() + Index); - }; - - EXPECT_EQ(GetBlock(1)->getLastCondition(), nullptr); - // Unfortunately, we can't check whether the correct Expr was returned by - // getLastCondition, because the lifetime of the AST ends by the time we - // retrieve the CFG. - - //===--------------------------------------------------------------------===// - - Code = R"(void foo(int x, int y) { - (void)(x + y); - })"; - Result = BuildCFG(Code); - EXPECT_EQ(BuildResult::BuiltCFG, Result.getStatus()); - - // [B2 (ENTRY)] -> [B1] -> [B0 (EXIT)] - - cfg = Result.getCFG(); - EXPECT_EQ(GetBlock(1)->getLastCondition(), nullptr); -} - } // namespace } // namespace analysis } // namespace clang