]> granicus.if.org Git - clang/commitdiff
Add ubsan/not_ubsan features to Clang lit tests and use
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 3 Sep 2014 19:46:32 +0000 (19:46 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 3 Sep 2014 19:46:32 +0000 (19:46 +0000)
them to exclude tests with large stack usage from UBSan bootstrap.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217064 91177308-0d34-0410-b5e6-96231b3b80d8

test/Index/annotate-deep-statements.cpp
test/Index/index-many-call-ops.cpp
test/Index/index-many-logical-ops.c
test/lit.cfg

index c0a55f25e49dba2633f1407543cb9aaaddffd482..1803c2bacf5e75df72bfeae7410ed0c7344e9cbd 100644 (file)
@@ -3,8 +3,8 @@
 // rdar://11979525
 // Check that we don't get stack overflow trying to annotate an extremely deep AST.
 
-// AddressSanitizer increases stack usage.
-// REQUIRES: not_asan
+// AddressSanitizer and UndefinedBehaviorSanitizer increases stack usage.
+// REQUIRES: not_asan, not_ubsan
 
 struct S {
   S &operator()();
index e732b5f188ae973316931b89e10df9a1e1ee6598..7644697d4e7cbc0c88cb891b3c4de1404496617e 100644 (file)
@@ -4,6 +4,9 @@
 // Check that we don't get stack overflow trying to index a huge number of
 // call operators.
 
+// UBSan increses stack usage.
+// REQUIRES: not_ubsan
+
 struct S {
   S &operator()();
 };
index 67017decb777f4953238cf3739eacb1267b56e8d..0fd4e75236f1cc804f32e88486332cf59afadcd6 100644 (file)
@@ -4,6 +4,9 @@
 // Check that we don't get stack overflow trying to index a huge number of
 // logical operators.
 
+// UBSan increses stack usage.
+// REQUIRES: not_ubsan
+
 // CHECK: [indexDeclaration]: kind: function | name: foo
 int foo(int x) {
   return
index 2d946c5a65defeec9be3efc60a33b56263d8531c..64570d763a3645304a9a7408a10ab585267a6d85 100644 (file)
@@ -450,6 +450,10 @@ else:
 if (config.llvm_use_sanitizer == "Memory" or
         config.llvm_use_sanitizer == "MemoryWithOrigins"):
     config.available_features.add("msan")
+if config.llvm_use_sanitizer == "Undefined":
+    config.available_features.add("ubsan")
+else:
+    config.available_features.add("not_ubsan")
 
 # Check if we should run long running tests.
 if lit_config.params.get("run_long_tests", None) == "true":