summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Analysis/CFGTest.cpp
diff options
context:
space:
mode:
authorKristof Umann <dkszelethus@gmail.com>2019-07-05 14:22:10 +0000
committerKristof Umann <dkszelethus@gmail.com>2019-07-05 14:22:10 +0000
commitc8499ae35ae16d51582eb463cc02cca293afbb61 (patch)
treee71e183a41575bcfc541ec80b1dbc983f8cb0ba1 /clang/unittests/Analysis/CFGTest.cpp
parentb55745606fa6b905a1324fc07d792a4eb7493974 (diff)
downloadbcm5719-llvm-c8499ae35ae16d51582eb463cc02cca293afbb61.tar.gz
bcm5719-llvm-c8499ae35ae16d51582eb463cc02cca293afbb61.zip
Removed the test case added in D63538 due to windows buildbot failures
llvm-svn: 365209
Diffstat (limited to 'clang/unittests/Analysis/CFGTest.cpp')
-rw-r--r--clang/unittests/Analysis/CFGTest.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/clang/unittests/Analysis/CFGTest.cpp b/clang/unittests/Analysis/CFGTest.cpp
index 2ab3b6403a0..7cd3da2db5f 100644
--- a/clang/unittests/Analysis/CFGTest.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud