]> xenbits.xensource.com Git - libvirt.git/commitdiff
maint: detect clang 2.9
authorEric Blake <eblake@redhat.com>
Wed, 4 May 2011 23:18:42 +0000 (17:18 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 4 May 2011 23:22:22 +0000 (17:22 -0600)
In Fedora 15, with clang 2.8, 'scan-build env' shows:
CCC_ANALYZER_ANALYSIS=-analyzer-check-objc-mem -analyzer-check-security-syntactic -analyzer-check-dead-stores -analyzer-check-objc-unused-ivars -analyzer-check-objc-methodsigs

But in rawhide, with clang 2.9, the same variable is set but
empty, implying the default set of analysis.  We still want
sa_assert defined in that case, to stop clang from hitting
false positives.

* configure.ac (STATIC_ANALYSIS): Detect clang even when the set
of analyses is the default.

configure.ac

index 7c68bcad368e6a8c87e1945f4443e13a36227518..314a5945cbe8214f5903b11f8a8693c4b74d43c3 100644 (file)
@@ -2297,7 +2297,7 @@ cp -f COPYING.LIB COPYING
 
 # Detect when running under the clang static analyzer's scan-build driver
 # or Coverity-prevent's cov-build.  Define STATIC_ANALYSIS accordingly.
-test -n "$CCC_ANALYZER_ANALYSIS$COVERITY_BUILD_COMMAND" && t=1 || t=0
+test -n "${CCC_ANALYZER_ANALYSIS+set}$COVERITY_BUILD_COMMAND" && t=1 || t=0
 AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
   [Define to 1 when performing static analysis.])