summaryrefslogtreecommitdiffstats
path: root/clang/tools/scan-build-py/tests/unit/test_clang.py
diff options
context:
space:
mode:
authorIlya Biryukov <ibiryukov@google.com>2018-03-01 14:54:16 +0000
committerIlya Biryukov <ibiryukov@google.com>2018-03-01 14:54:16 +0000
commit8b9b3bd07c5046ae3010516d84d3217934ad10d5 (patch)
treeb352ac923482fa800709b5291976798ace5613b5 /clang/tools/scan-build-py/tests/unit/test_clang.py
parent1bab70109b9fa259f928fe30a8ad153db8f4ecbe (diff)
downloadbcm5719-llvm-8b9b3bd07c5046ae3010516d84d3217934ad10d5.tar.gz
bcm5719-llvm-8b9b3bd07c5046ae3010516d84d3217934ad10d5.zip
Resubmit [analyzer] Support for naive cross translation unit analysis
Originally submitted as r326323 and r326324. Reverted in r326432. Reverting the commit was a mistake. The breakage was due to invalid build files in our internal buildsystem, CMakeLists did not have any cyclic dependencies. llvm-svn: 326439
Diffstat (limited to 'clang/tools/scan-build-py/tests/unit/test_clang.py')
-rw-r--r--clang/tools/scan-build-py/tests/unit/test_clang.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/tools/scan-build-py/tests/unit/test_clang.py b/clang/tools/scan-build-py/tests/unit/test_clang.py
index eef8c26bbd1..07ac4d9fb80 100644
--- a/clang/tools/scan-build-py/tests/unit/test_clang.py
+++ b/clang/tools/scan-build-py/tests/unit/test_clang.py
@@ -92,3 +92,15 @@ class ClangGetCheckersTest(unittest.TestCase):
self.assertEqual('Checker One description', result.get('checker.one'))
self.assertTrue('checker.two' in result)
self.assertEqual('Checker Two description', result.get('checker.two'))
+
+
+class ClangIsCtuCapableTest(unittest.TestCase):
+ def test_ctu_not_found(self):
+ is_ctu = sut.is_ctu_capable('not-found-clang-func-mapping')
+ self.assertFalse(is_ctu)
+
+
+class ClangGetTripleArchTest(unittest.TestCase):
+ def test_arch_is_not_empty(self):
+ arch = sut.get_triple_arch(['clang', '-E', '-'], '.')
+ self.assertTrue(len(arch) > 0)
OpenPOWER on IntegriCloud