summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/openmp-unsupported.c
diff options
context:
space:
mode:
authorAleksei Sidorin <a.sidorin@samsung.com>2017-03-03 16:58:53 +0000
committerAleksei Sidorin <a.sidorin@samsung.com>2017-03-03 16:58:53 +0000
commitf82a63277ab5fedb1f415a51ae6180e29259504a (patch)
treeea05d66307d1050eb6d8299890985b1be9f040de /clang/test/Analysis/openmp-unsupported.c
parent1716aa45f1d61cfe89ccda64328fc71ad1cf533d (diff)
downloadbcm5719-llvm-f82a63277ab5fedb1f415a51ae6180e29259504a.tar.gz
bcm5719-llvm-f82a63277ab5fedb1f415a51ae6180e29259504a.zip
[Analyzer] Terminate analysis on OpenMP code instead of assertion crash
* ExprEngine assumes that OpenMP statements should never appear in CFG. However, current CFG doesn't know anything about OpenMP and passes such statements as CFG nodes causing "UNREACHABLE executed!" crashes. Since there is no OpenMP implementation in ExprEngine or CFG, we stop the analysis on OpenMP statements to avoid crashes. This fixes PR31835. Differential Revision: https://reviews.llvm.org/D30565 llvm-svn: 296884
Diffstat (limited to 'clang/test/Analysis/openmp-unsupported.c')
-rw-r--r--clang/test/Analysis/openmp-unsupported.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Analysis/openmp-unsupported.c b/clang/test/Analysis/openmp-unsupported.c
new file mode 100644
index 00000000000..7e363eecbaa
--- /dev/null
+++ b/clang/test/Analysis/openmp-unsupported.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core.builtin -fopenmp -verify %s
+// expected-no-diagnostics
+
+void openmp_parallel_crash_test() {
+#pragma omp parallel
+ ;
+}
OpenPOWER on IntegriCloud