r213140 - clang/test: Introduce the feature "staticanalyzer" for --enable-clang-static-analyzer.

NAKAMURA Takumi geek4civic at gmail.com
Wed Jul 16 05:05:48 PDT 2014


Author: chapuni
Date: Wed Jul 16 07:05:45 2014
New Revision: 213140

URL: http://llvm.org/viewvc/llvm-project?rev=213140&view=rev
Log:
clang/test: Introduce the feature "staticanalyzer" for --enable-clang-static-analyzer.

Added:
    cfe/trunk/test/Tooling/lit.local.cfg
Modified:
    cfe/trunk/test/Coverage/html-diagnostics.c
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/Coverage/html-diagnostics.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Coverage/html-diagnostics.c?rev=213140&r1=213139&r2=213140&view=diff
==============================================================================
--- cfe/trunk/test/Coverage/html-diagnostics.c (original)
+++ cfe/trunk/test/Coverage/html-diagnostics.c Wed Jul 16 07:05:45 2014
@@ -2,6 +2,8 @@
 // RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
 // RUN: cat %t/*.html | FileCheck %s
 
+// REQUIRES: staticanalyzer
+
 // Because of the glob (*.html)
 // REQUIRES: shell
 

Added: cfe/trunk/test/Tooling/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Tooling/lit.local.cfg?rev=213140&view=auto
==============================================================================
--- cfe/trunk/test/Tooling/lit.local.cfg (added)
+++ cfe/trunk/test/Tooling/lit.local.cfg Wed Jul 16 07:05:45 2014
@@ -0,0 +1,2 @@
+if config.root.clang_staticanalyzer == 0:
+    config.unsupported = True

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=213140&r1=213139&r2=213140&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Wed Jul 16 07:05:45 2014
@@ -334,6 +334,10 @@ for pattern in [r"\bFileCheck\b",
 
 # Set available features we allow tests to conditionalize on.
 #
+# Enabled/disabled features
+if config.clang_staticanalyzer != 0:
+    config.available_features.add("staticanalyzer")
+
 # As of 2011.08, crash-recovery tests still do not pass on FreeBSD.
 if platform.system() not in ['FreeBSD']:
     config.available_features.add('crash-recovery')





More information about the cfe-commits mailing list