[clang] 2a12acd - [analyzer][StreamChecker] Don't make StreamTestChecker depend on StreamChecker for the time being
Kirstóf Umann via cfe-commits
cfe-commits at lists.llvm.org
Wed May 13 11:05:48 PDT 2020
Author: Kirstóf Umann
Date: 2020-05-13T20:05:11+02:00
New Revision: 2a12acda4c9fad4d69dce7a43e99690df357648c
URL: https://github.com/llvm/llvm-project/commit/2a12acda4c9fad4d69dce7a43e99690df357648c
DIFF: https://github.com/llvm/llvm-project/commit/2a12acda4c9fad4d69dce7a43e99690df357648c.diff
LOG: [analyzer][StreamChecker] Don't make StreamTestChecker depend on StreamChecker for the time being
The comment in Checkers.td explains whats going on. As StreamChecker grows,
expect a need to have smaller checkers out of it, but let that be a worry for
later.
Differential Revision: https://reviews.llvm.org/D78120
Added:
Modified:
clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
clang/test/Analysis/stream-error.c
Removed:
################################################################################
diff --git a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
index 4315b0984abc..c35f8b115f16 100644
--- a/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
+++ b/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
@@ -1430,9 +1430,14 @@ def TaintTesterChecker : Checker<"TaintTest">,
HelpText<"Mark tainted symbols as such.">,
Documentation<NotDocumented>;
+// This checker *technically* depends on SteamChecker, but we don't allow
+// dependency checkers to emit diagnostics, and a debug checker isn't worth
+// the chore needed to create a modeling portion on its own. Since this checker
+// is for development purposes only anyways, make sure that StreamChecker is
+// also enabled, at least for the time being.
def StreamTesterChecker : Checker<"StreamTester">,
- HelpText<"Add test functions to StreamChecker for test and debugging purposes.">,
- Dependencies<[StreamChecker]>,
+ HelpText<"Add test functions to StreamChecker for test and debugging "
+ "purposes.">,
Documentation<NotDocumented>;
def ExprInspectionChecker : Checker<"ExprInspection">,
diff --git a/clang/test/Analysis/stream-error.c b/clang/test/Analysis/stream-error.c
index 2bd25ca30fa3..2302f3efc2f1 100644
--- a/clang/test/Analysis/stream-error.c
+++ b/clang/test/Analysis/stream-error.c
@@ -1,4 +1,8 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-checker=debug.StreamTester,debug.ExprInspection -analyzer-store region -verify %s
+// RUN: %clang_analyze_cc1 -verify %s \
+// RUN: -analyzer-checker=core \
+// RUN: -analyzer-checker=alpha.unix.Stream \
+// RUN: -analyzer-checker=debug.StreamTester \
+// RUN: -analyzer-checker=debug.ExprInspection
#include "Inputs/system-header-simulator.h"
More information about the cfe-commits
mailing list