]> granicus.if.org Git - clang/commitdiff
[analyzer] Make valist.Uninitialized depend on ValistBase
authorKristof Umann <dkszelethus@gmail.com>
Sun, 17 Feb 2019 19:51:42 +0000 (19:51 +0000)
committerKristof Umann <dkszelethus@gmail.com>
Sun, 17 Feb 2019 19:51:42 +0000 (19:51 +0000)
Accidentally left this dependency out, resulting in an assert failure if
only valist.Uninitialized is enabled from the valist package.

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

include/clang/StaticAnalyzer/Checkers/Checkers.td
test/Analysis/valist-uninitialized.c

index 89ce3c62ff137831ba2780ed8262da5e5e248466..0f7ed610df9ec46eaeae3aadcf921acbc613973d 100644 (file)
@@ -508,6 +508,7 @@ def ValistBase : Checker<"ValistBase">,
 
 def UninitializedChecker : Checker<"Uninitialized">,
   HelpText<"Check for usages of uninitialized (or already released) va_lists.">,
+  Dependencies<[ValistBase]>,
   Documentation<NotDocumented>;
 
 def UnterminatedChecker : Checker<"Unterminated">,
index 19308537e02cd040fb43959296ca8d4cea03b09f..003592997eab8c3be9cd787e8d56f7145493e162 100644 (file)
@@ -1,5 +1,15 @@
-// RUN: %clang_analyze_cc1 -triple hexagon-unknown-linux -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf -analyzer-disable-checker=core.CallAndMessage -analyzer-output=text -analyzer-store=region -verify %s
-// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf -analyzer-disable-checker=core.CallAndMessage -analyzer-output=text -analyzer-store=region -verify %s
+// RUN: %clang_analyze_cc1 -triple hexagon-unknown-linux -verify %s \
+// RUN:   -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf \
+// RUN:   -analyzer-disable-checker=core.CallAndMessage \
+// RUN:   -analyzer-output=text
+//
+// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu -verify %s \
+// RUN:   -analyzer-checker=core,valist.Uninitialized,valist.CopyToSelf \
+// RUN:   -analyzer-disable-checker=core.CallAndMessage \
+// RUN:   -analyzer-output=text
+//
+// RUN: %clang_analyze_cc1 -triple x86_64-pc-linux-gnu %s \
+// RUN:   -analyzer-checker=core,valist.Uninitialized
 
 #include "Inputs/system-header-simulator-for-valist.h"