r354235 - [analyzer] Make valist.Uninitialized depend on ValistBase
Kristof Umann via cfe-commits
cfe-commits at lists.llvm.org
Sun Feb 17 11:51:42 PST 2019
Author: szelethus
Date: Sun Feb 17 11:51:42 2019
New Revision: 354235
URL: http://llvm.org/viewvc/llvm-project?rev=354235&view=rev
Log:
[analyzer] Make valist.Uninitialized depend on ValistBase
Accidentally left this dependency out, resulting in an assert failure if
only valist.Uninitialized is enabled from the valist package.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td
cfe/trunk/test/Analysis/valist-uninitialized.c
Modified: cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td?rev=354235&r1=354234&r2=354235&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Checkers/Checkers.td Sun Feb 17 11:51:42 2019
@@ -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">,
Modified: cfe/trunk/test/Analysis/valist-uninitialized.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/valist-uninitialized.c?rev=354235&r1=354234&r2=354235&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/valist-uninitialized.c (original)
+++ cfe/trunk/test/Analysis/valist-uninitialized.c Sun Feb 17 11:51:42 2019
@@ -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"
More information about the cfe-commits
mailing list