From 6a330da043fe6dbf1953cb98d83445c7742acdba Mon Sep 17 00:00:00 2001 From: Devin Coughlin Date: Sat, 12 Nov 2016 01:23:01 +0000 Subject: [PATCH] [analyzer] Fix copy-pasta in NullableReturnedFromNonnullChecker checker name. The name of the NullableReturnedFromNonnullChecker in Checkers.td was accidentally "NullablePassedToNonnull", which made it impossible to explicitly turn the checker on. rdar://problem/28354459 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@286697 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/StaticAnalyzer/Checkers/Checkers.td | 2 +- test/Analysis/nullability.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/clang/StaticAnalyzer/Checkers/Checkers.td b/include/clang/StaticAnalyzer/Checkers/Checkers.td index 16ccea615a..6ea500fa74 100644 --- a/include/clang/StaticAnalyzer/Checkers/Checkers.td +++ b/include/clang/StaticAnalyzer/Checkers/Checkers.td @@ -192,7 +192,7 @@ def NullablePassedToNonnullChecker : Checker<"NullablePassedToNonnull">, HelpText<"Warns when a nullable pointer is passed to a pointer which has a _Nonnull type.">, DescFile<"NullabilityChecker.cpp">; -def NullableReturnedFromNonnullChecker : Checker<"NullablePassedToNonnull">, +def NullableReturnedFromNonnullChecker : Checker<"NullableReturnedFromNonnull">, HelpText<"Warns when a nullable pointer is returned from a function that has _Nonnull return type.">, DescFile<"NullabilityChecker.cpp">; diff --git a/test/Analysis/nullability.mm b/test/Analysis/nullability.mm index c6d6519d90..ac2a839f40 100644 --- a/test/Analysis/nullability.mm +++ b/test/Analysis/nullability.mm @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability -DNOSYSTEMHEADERS=0 -verify %s -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=true -DNOSYSTEMHEADERS=1 -verify %s +// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -DNOSYSTEMHEADERS=0 -verify %s +// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=true -DNOSYSTEMHEADERS=1 -verify %s #include "Inputs/system-header-simulator-for-nullability.h" -- 2.40.0