From 4ef13f8ac919c0c056cc3fcd1d166bbf79ccad49 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Fri, 13 Nov 2009 18:46:29 +0000 Subject: [PATCH] Add clang-cc option "--analyzer-experimental-internal-checks". This option enables new "internal" checks that will eventually be turned on by default but still require broader testing. llvm-svn: 88671 --- clang/include/clang/Analysis/LocalCheckers.h | 1 + clang/include/clang/Frontend/AnalysisConsumer.h | 3 ++- .../Analysis/GRExprEngineExperimentalChecks.cpp | 16 +++++++++++++++- .../lib/Analysis/GRExprEngineInternalChecks.cpp | 7 ------- clang/lib/Frontend/AnalysisConsumer.cpp | 4 ++++ clang/test/Analysis/CFDateGC.m | 10 +++++----- clang/test/Analysis/CFNumber.c | 8 ++++---- .../CFRetainRelease_NSAssertionHandler.m | 8 ++++---- clang/test/Analysis/CGColorSpace.c | 8 ++++---- clang/test/Analysis/CheckNSError.m | 8 ++++---- clang/test/Analysis/MissingDealloc.m | 2 +- clang/test/Analysis/NSPanel.m | 8 ++++---- clang/test/Analysis/NSString.m | 16 ++++++++-------- clang/test/Analysis/NSWindow.m | 8 ++++---- clang/test/Analysis/NoReturn.m | 8 ++++---- clang/test/Analysis/ObjCProperties.m | 8 ++++---- clang/test/Analysis/ObjCRetSigs.m | 2 +- clang/test/Analysis/PR2599.m | 8 ++++---- clang/test/Analysis/PR2978.m | 2 +- clang/test/Analysis/PR3991.m | 8 ++++---- clang/test/Analysis/array-struct.c | 8 ++++---- clang/test/Analysis/casts.c | 2 +- clang/test/Analysis/casts.m | 4 ++-- clang/test/Analysis/cfref_PR2519.c | 8 ++++---- clang/test/Analysis/cfref_rdar6080742.c | 8 ++++---- clang/test/Analysis/complex.c | 8 ++++---- clang/test/Analysis/concrete-address.c | 4 ++-- clang/test/Analysis/conditional-op-missing-lhs.c | 2 +- clang/test/Analysis/dead-stores.c | 10 +++++----- clang/test/Analysis/dead-stores.cpp | 10 +++++----- clang/test/Analysis/dead-stores.m | 2 +- clang/test/Analysis/delegates.m | 4 ++-- clang/test/Analysis/elementtype.c | 2 +- clang/test/Analysis/exercise-ps.c | 4 ++-- clang/test/Analysis/fields.c | 4 ++-- clang/test/Analysis/func.c | 4 ++-- clang/test/Analysis/malloc.c | 2 +- clang/test/Analysis/misc-ps-64.m | 8 ++++---- clang/test/Analysis/misc-ps-basic-store.m | 2 +- clang/test/Analysis/misc-ps-eager-assume.m | 2 +- clang/test/Analysis/misc-ps-ranges.m | 4 ++-- clang/test/Analysis/misc-ps-region-store-i386.m | 2 +- .../test/Analysis/misc-ps-region-store-x86_64.m | 2 +- clang/test/Analysis/misc-ps-region-store.m | 4 ++-- clang/test/Analysis/misc-ps.m | 8 ++++---- ...-receiver-undefined-larger-than-voidptr-ret.m | 4 ++-- clang/test/Analysis/no-exit-cfg.c | 4 ++-- clang/test/Analysis/no-outofbounds.c | 4 ++-- clang/test/Analysis/null-deref-ps-region.c | 2 +- clang/test/Analysis/null-deref-ps.c | 8 ++++---- clang/test/Analysis/outofbound.c | 2 +- clang/test/Analysis/override-werror.c | 4 ++-- clang/test/Analysis/pr4209.m | 4 ++-- clang/test/Analysis/pr_2542_rdar_6793404.m | 4 ++-- clang/test/Analysis/pr_4164.c | 4 ++-- clang/test/Analysis/ptr-arith.c | 4 ++-- clang/test/Analysis/rdar-6442306-1.m | 4 ++-- clang/test/Analysis/rdar-6540084.m | 2 +- clang/test/Analysis/rdar-6541136-region.c | 2 +- clang/test/Analysis/rdar-6541136.c | 2 +- clang/test/Analysis/rdar-6562655.m | 4 ++-- clang/test/Analysis/rdar-6582778-basic-store.c | 2 +- ...r-6600344-nil-receiver-undefined-struct-ret.m | 4 ++-- clang/test/Analysis/rdar-7168531.m | 4 ++-- clang/test/Analysis/refcnt_naming.m | 4 ++-- clang/test/Analysis/region-1.m | 4 ++-- clang/tools/clang-cc/Options.cpp | 5 +++++ clang/utils/ccc-analyzer | 5 +++++ clang/utils/scan-build | 8 ++++++++ 69 files changed, 193 insertions(+), 162 deletions(-) diff --git a/clang/include/clang/Analysis/LocalCheckers.h b/clang/include/clang/Analysis/LocalCheckers.h index 5182d63b0dd3..8c70e4fc7b6c 100644 --- a/clang/include/clang/Analysis/LocalCheckers.h +++ b/clang/include/clang/Analysis/LocalCheckers.h @@ -51,6 +51,7 @@ void CheckObjCUnusedIvar(const ObjCImplementationDecl *D, BugReporter& BR); void RegisterAppleChecks(GRExprEngine& Eng, const Decl &D); void RegisterExperimentalChecks(GRExprEngine &Eng); +void RegisterExperimentalInternalChecks(GRExprEngine &Eng); void CheckSecuritySyntaxOnly(const Decl *D, BugReporter &BR); diff --git a/clang/include/clang/Frontend/AnalysisConsumer.h b/clang/include/clang/Frontend/AnalysisConsumer.h index fb0baff00523..fecc0f7f8945 100644 --- a/clang/include/clang/Frontend/AnalysisConsumer.h +++ b/clang/include/clang/Frontend/AnalysisConsumer.h @@ -68,7 +68,7 @@ public: unsigned VisualizeEGDot : 1; unsigned VisualizeEGUbi : 1; unsigned EnableExperimentalChecks : 1; - + unsigned EnableExperimentalInternalChecks : 1; public: AnalyzerOptions() { AnalyzeAll = 0; @@ -79,6 +79,7 @@ public: VisualizeEGDot = 0; VisualizeEGUbi = 0; EnableExperimentalChecks = 0; + EnableExperimentalInternalChecks = 0; } }; diff --git a/clang/lib/Analysis/GRExprEngineExperimentalChecks.cpp b/clang/lib/Analysis/GRExprEngineExperimentalChecks.cpp index 75f97898ff14..2fb7e9fa482f 100644 --- a/clang/lib/Analysis/GRExprEngineExperimentalChecks.cpp +++ b/clang/lib/Analysis/GRExprEngineExperimentalChecks.cpp @@ -12,13 +12,27 @@ // //===----------------------------------------------------------------------===// +#include "GRExprEngineInternalChecks.h" #include "GRExprEngineExperimentalChecks.h" #include "clang/Analysis/LocalCheckers.h" using namespace clang; -void clang::RegisterExperimentalChecks(GRExprEngine &Eng) { +void clang::RegisterExperimentalChecks(GRExprEngine &Eng) { + // These are checks that never belong as internal checks + // within GRExprEngine. RegisterPthreadLockChecker(Eng); RegisterMallocChecker(Eng); } +void clang::RegisterExperimentalInternalChecks(GRExprEngine &Eng) { + // These are internal checks that should eventually migrate to + // RegisterInternalChecks() once they have been further tested. + + // Note that this must be registered after ReturnStackAddresEngsChecker. + RegisterReturnPointerRangeChecker(Eng); + RegisterPointerSubChecker(Eng); + RegisterPointerArithChecker(Eng); + RegisterCastToStructChecker(Eng); + RegisterArrayBoundChecker(Eng); +} diff --git a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp index dc01b96d92cd..d0f60fde5b1b 100644 --- a/clang/lib/Analysis/GRExprEngineInternalChecks.cpp +++ b/clang/lib/Analysis/GRExprEngineInternalChecks.cpp @@ -395,13 +395,6 @@ void GRExprEngine::RegisterInternalChecks() { RegisterDivZeroChecker(*this); RegisterReturnStackAddressChecker(*this); RegisterReturnUndefChecker(*this); - RegisterPointerSubChecker(*this); - RegisterPointerArithChecker(*this); RegisterFixedAddressChecker(*this); - // Note that this must be registered after ReturnStackAddressChecker. - RegisterReturnPointerRangeChecker(*this); - - RegisterCastToStructChecker(*this); - RegisterArrayBoundChecker(*this); RegisterUndefinedArraySubscriptChecker(*this); } diff --git a/clang/lib/Frontend/AnalysisConsumer.cpp b/clang/lib/Frontend/AnalysisConsumer.cpp index e8bd920d412a..b0799af3bf51 100644 --- a/clang/lib/Frontend/AnalysisConsumer.cpp +++ b/clang/lib/Frontend/AnalysisConsumer.cpp @@ -331,6 +331,10 @@ static void ActionGRExprEngine(AnalysisConsumer &C, AnalysisManager& mgr, Decl * Eng.setTransferFunctions(tf); Eng.RegisterInternalChecks(); // FIXME: Internal checks should just // automatically register. + + if (C.Opts.EnableExperimentalInternalChecks) + RegisterExperimentalInternalChecks(Eng); + RegisterAppleChecks(Eng, *D); if (C.Opts.EnableExperimentalChecks) diff --git a/clang/test/Analysis/CFDateGC.m b/clang/test/Analysis/CFDateGC.m index d796c4c6a0ad..b23998cfc68f 100644 --- a/clang/test/Analysis/CFDateGC.m +++ b/clang/test/Analysis/CFDateGC.m @@ -1,8 +1,8 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=basic %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=range %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify -fobjc-gc -disable-free %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fobjc-gc %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fobjc-gc %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=basic %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -analyzer-constraints=range %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify -fobjc-gc -disable-free %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -fobjc-gc %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -fobjc-gc %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/clang/test/Analysis/CFNumber.c b/clang/test/Analysis/CFNumber.c index 905dcdd312b1..f3d371cbde46 100644 --- a/clang/test/Analysis/CFNumber.c +++ b/clang/test/Analysis/CFNumber.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s typedef signed long CFIndex; typedef const struct __CFAllocator * CFAllocatorRef; diff --git a/clang/test/Analysis/CFRetainRelease_NSAssertionHandler.m b/clang/test/Analysis/CFRetainRelease_NSAssertionHandler.m index 9cc2acf07e52..04e9add58b5a 100644 --- a/clang/test/Analysis/CFRetainRelease_NSAssertionHandler.m +++ b/clang/test/Analysis/CFRetainRelease_NSAssertionHandler.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic -// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic -// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=region -// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=region +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=region +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=region typedef struct objc_selector *SEL; typedef signed char BOOL; diff --git a/clang/test/Analysis/CGColorSpace.c b/clang/test/Analysis/CGColorSpace.c index a67974fa995f..ae628989cd61 100644 --- a/clang/test/Analysis/CGColorSpace.c +++ b/clang/test/Analysis/CGColorSpace.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s typedef struct CGColorSpace *CGColorSpaceRef; extern CGColorSpaceRef CGColorSpaceCreateDeviceRGB(void); diff --git a/clang/test/Analysis/CheckNSError.m b/clang/test/Analysis/CheckNSError.m index 76b43e77ffda..219354b20fdf 100644 --- a/clang/test/Analysis/CheckNSError.m +++ b/clang/test/Analysis/CheckNSError.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s typedef signed char BOOL; diff --git a/clang/test/Analysis/MissingDealloc.m b/clang/test/Analysis/MissingDealloc.m index 41498e56ec1d..3942391ee982 100644 --- a/clang/test/Analysis/MissingDealloc.m +++ b/clang/test/Analysis/MissingDealloc.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s --verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-objc-missing-dealloc '-DIBOutlet=__attribute__((iboutlet))' %s --verify typedef signed char BOOL; @protocol NSObject - (BOOL)isEqual:(id)object; diff --git a/clang/test/Analysis/NSPanel.m b/clang/test/Analysis/NSPanel.m index 498dfba5ca40..20e3efff4c60 100644 --- a/clang/test/Analysis/NSPanel.m +++ b/clang/test/Analysis/NSPanel.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s // BEGIN delta-debugging reduced header stuff diff --git a/clang/test/Analysis/NSString.m b/clang/test/Analysis/NSString.m index 9b63790a06ef..1cf8ae8b1ef5 100644 --- a/clang/test/Analysis/NSString.m +++ b/clang/test/Analysis/NSString.m @@ -1,13 +1,13 @@ -// RUN: clang-cc -triple i386-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -triple i386-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s -// RUN: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s // ==-- FIXME: -analyzer-store=basic fails on this file (false negatives). --== -// NOTWORK: clang-cc -triple i386-apple-darwin10 -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s && -// NOTWORK: clang-cc -triple i386-apple-darwin10 -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && -// NOTWORK: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && -// NOTWORK: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// NOTWORK: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s && +// NOTWORK: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && +// NOTWORK: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s && +// NOTWORK: clang-cc -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from diff --git a/clang/test/Analysis/NSWindow.m b/clang/test/Analysis/NSWindow.m index bfd979f44f3f..5eb6cf1e4770 100644 --- a/clang/test/Analysis/NSWindow.m +++ b/clang/test/Analysis/NSWindow.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -warn-dead-stores -analyzer-store=region -analyzer-constraints=range -verify %s // These declarations were reduced using Delta-Debugging from Foundation.h // on Mac OS X. The test cases are below. diff --git a/clang/test/Analysis/NoReturn.m b/clang/test/Analysis/NoReturn.m index b2c5cb088850..cf708b4f8970 100644 --- a/clang/test/Analysis/NoReturn.m +++ b/clang/test/Analysis/NoReturn.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s #include diff --git a/clang/test/Analysis/ObjCProperties.m b/clang/test/Analysis/ObjCProperties.m index 260098be90ab..6c367f427d46 100644 --- a/clang/test/Analysis/ObjCProperties.m +++ b/clang/test/Analysis/ObjCProperties.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic %s -verify -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range %s -verify -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic %s -verify -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic %s -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range %s -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic %s -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range %s -verify // The point of this test cases is to exercise properties in the static // analyzer diff --git a/clang/test/Analysis/ObjCRetSigs.m b/clang/test/Analysis/ObjCRetSigs.m index 0d699168a551..3ee13e0e63e4 100644 --- a/clang/test/Analysis/ObjCRetSigs.m +++ b/clang/test/Analysis/ObjCRetSigs.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -warn-objc-methodsigs -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-objc-methodsigs -verify %s #include diff --git a/clang/test/Analysis/PR2599.m b/clang/test/Analysis/PR2599.m index 58e846cfc4e0..fd5ae95d5842 100644 --- a/clang/test/Analysis/PR2599.m +++ b/clang/test/Analysis/PR2599.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s -// RUN: clang-cc -analyze -analyzer-constraints=range -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s -// RUN: clang-cc -analyze -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s -// RUN: clang-cc -analyze -analyzer-constraints=range -analyzer-store=region -checker-cfref -fobjc-gc -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -analyzer-constraints=range -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -analyzer-constraints=range -analyzer-store=region -checker-cfref -fobjc-gc -verify %s typedef const void * CFTypeRef; typedef const struct __CFString * CFStringRef; diff --git a/clang/test/Analysis/PR2978.m b/clang/test/Analysis/PR2978.m index 0cb3dea8ea86..8a94fe848993 100644 --- a/clang/test/Analysis/PR2978.m +++ b/clang/test/Analysis/PR2978.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -warn-objc-missing-dealloc %s -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-objc-missing-dealloc %s -verify // Tests for the checker which checks missing/extra ivar 'release' calls // in dealloc. diff --git a/clang/test/Analysis/PR3991.m b/clang/test/Analysis/PR3991.m index fb86bbd91a5d..765cc7e486a8 100644 --- a/clang/test/Analysis/PR3991.m +++ b/clang/test/Analysis/PR3991.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify -triple x86_64-apple-darwin9 %s //===----------------------------------------------------------------------===// // Delta-debugging produced forward declarations. diff --git a/clang/test/Analysis/array-struct.c b/clang/test/Analysis/array-struct.c index 1ab67874c6a5..c3822cdb443a 100644 --- a/clang/test/Analysis/array-struct.c +++ b/clang/test/Analysis/array-struct.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s struct s { int data; diff --git a/clang/test/Analysis/casts.c b/clang/test/Analysis/casts.c index ae51ffb69aa5..fc9e27bfe755 100644 --- a/clang/test/Analysis/casts.c +++ b/clang/test/Analysis/casts.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref -analyzer-store=region --verify %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region --verify %s // Test if the 'storage' region gets properly initialized after it is cast to // 'struct sockaddr *'. diff --git a/clang/test/Analysis/casts.m b/clang/test/Analysis/casts.m index 4d2ff9adb886..4e201bf7eb4c 100644 --- a/clang/test/Analysis/casts.m +++ b/clang/test/Analysis/casts.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic --verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region --verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic --verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region --verify %s // Test function pointer casts. Currently we track function addresses using // loc::FunctionVal. Because casts can be arbitrary, do we need to model diff --git a/clang/test/Analysis/cfref_PR2519.c b/clang/test/Analysis/cfref_PR2519.c index 674ba4f9ef87..ee1da1fff972 100644 --- a/clang/test/Analysis/cfref_PR2519.c +++ b/clang/test/Analysis/cfref_PR2519.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=range -verify %s typedef unsigned char Boolean; typedef signed long CFIndex; diff --git a/clang/test/Analysis/cfref_rdar6080742.c b/clang/test/Analysis/cfref_rdar6080742.c index b47babb9fd91..a2b7477db8bc 100644 --- a/clang/test/Analysis/cfref_rdar6080742.c +++ b/clang/test/Analysis/cfref_rdar6080742.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s // This test case was reported in . // It tests path-sensitivity with respect to '!(cfstring != 0)' (negation of inequality). diff --git a/clang/test/Analysis/complex.c b/clang/test/Analysis/complex.c index 6fc92e950c7c..6b71a93e65a9 100644 --- a/clang/test/Analysis/complex.c +++ b/clang/test/Analysis/complex.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s #include diff --git a/clang/test/Analysis/concrete-address.c b/clang/test/Analysis/concrete-address.c index 477f192f372b..31802d038019 100644 --- a/clang/test/Analysis/concrete-address.c +++ b/clang/test/Analysis/concrete-address.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic --verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region --verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic --verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region --verify %s void foo() { int *p = (int*) 0x10000; // Should not crash here. diff --git a/clang/test/Analysis/conditional-op-missing-lhs.c b/clang/test/Analysis/conditional-op-missing-lhs.c index bebf155f4640..ed81d7b67200 100644 --- a/clang/test/Analysis/conditional-op-missing-lhs.c +++ b/clang/test/Analysis/conditional-op-missing-lhs.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -warn-dead-stores -warn-uninit-values -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-dead-stores -warn-uninit-values -verify %s void f1() { diff --git a/clang/test/Analysis/dead-stores.c b/clang/test/Analysis/dead-stores.c index 23ea1f09c7ec..811ac813c7e2 100644 --- a/clang/test/Analysis/dead-stores.c +++ b/clang/test/Analysis/dead-stores.c @@ -1,8 +1,8 @@ -// RUN: clang-cc -analyze -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s void f1() { int k, y; diff --git a/clang/test/Analysis/dead-stores.cpp b/clang/test/Analysis/dead-stores.cpp index fa5b639b7d67..0bf32567f9db 100644 --- a/clang/test/Analysis/dead-stores.cpp +++ b/clang/test/Analysis/dead-stores.cpp @@ -1,8 +1,8 @@ -// RUN: clang-cc -analyze -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -analyzer-constraints=range -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=basic -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -analyzer-constraints=range -warn-dead-stores -verify %s int j; void f1() { diff --git a/clang/test/Analysis/dead-stores.m b/clang/test/Analysis/dead-stores.m index 218cb4458580..0a5c0f837301 100644 --- a/clang/test/Analysis/dead-stores.m +++ b/clang/test/Analysis/dead-stores.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; diff --git a/clang/test/Analysis/delegates.m b/clang/test/Analysis/delegates.m index 82568d263457..b854da6ec330 100644 --- a/clang/test/Analysis/delegates.m +++ b/clang/test/Analysis/delegates.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s //===----------------------------------------------------------------------===// diff --git a/clang/test/Analysis/elementtype.c b/clang/test/Analysis/elementtype.c index 2bdaad423a39..b6873ad89980 100644 --- a/clang/test/Analysis/elementtype.c +++ b/clang/test/Analysis/elementtype.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region %s typedef struct added_obj_st { int type; diff --git a/clang/test/Analysis/exercise-ps.c b/clang/test/Analysis/exercise-ps.c index 3a7a7a67bd7d..098ec48f4ea3 100644 --- a/clang/test/Analysis/exercise-ps.c +++ b/clang/test/Analysis/exercise-ps.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // // Just exercise the analyzer on code that has at one point caused issues // (i.e., no assertions or crashes). diff --git a/clang/test/Analysis/fields.c b/clang/test/Analysis/fields.c index 13d7ac4d0f55..d6bc84575ef4 100644 --- a/clang/test/Analysis/fields.c +++ b/clang/test/Analysis/fields.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify -// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref %s --analyzer-store=basic -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref %s --analyzer-store=region -verify unsigned foo(); typedef struct bf { unsigned x:2; } bf; diff --git a/clang/test/Analysis/func.c b/clang/test/Analysis/func.c index 33e01111af82..390a2793a497 100644 --- a/clang/test/Analysis/func.c +++ b/clang/test/Analysis/func.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s void f(void) { void (*p)(void); diff --git a/clang/test/Analysis/malloc.c b/clang/test/Analysis/malloc.c index 270b3d1b6959..b881b1b2babe 100644 --- a/clang/test/Analysis/malloc.c +++ b/clang/test/Analysis/malloc.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-experimental-checks -analyzer-store=region -verify %s #include void f1() { diff --git a/clang/test/Analysis/misc-ps-64.m b/clang/test/Analysis/misc-ps-64.m index 2ada9ea33bab..506dc8b0e530 100644 --- a/clang/test/Analysis/misc-ps-64.m +++ b/clang/test/Analysis/misc-ps-64.m @@ -1,7 +1,7 @@ -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic --verify -fblocks %s -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic -analyzer-constraints=basic --verify -fblocks %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s // - A bunch of misc. failures involving evaluating // these expressions and building CFGs. These tests are here to prevent diff --git a/clang/test/Analysis/misc-ps-basic-store.m b/clang/test/Analysis/misc-ps-basic-store.m index c6ae20c86a36..2b9913461718 100644 --- a/clang/test/Analysis/misc-ps-basic-store.m +++ b/clang/test/Analysis/misc-ps-basic-store.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic --verify -fblocks %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic --verify -fblocks %s //--------------------------------------------------------------------------- // Test case 'checkaccess_union' differs for region store and basic store. diff --git a/clang/test/Analysis/misc-ps-eager-assume.m b/clang/test/Analysis/misc-ps-eager-assume.m index db1a80b8efd9..66eb1256f42a 100644 --- a/clang/test/Analysis/misc-ps-eager-assume.m +++ b/clang/test/Analysis/misc-ps-eager-assume.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s -analyzer-eagerly-assume +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s -analyzer-eagerly-assume // Delta-reduced header stuff (needed for test cases). typedef signed char BOOL; diff --git a/clang/test/Analysis/misc-ps-ranges.m b/clang/test/Analysis/misc-ps-ranges.m index cf04e3977d83..49cc5933ccad 100644 --- a/clang/test/Analysis/misc-ps-ranges.m +++ b/clang/test/Analysis/misc-ps-ranges.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s // // main's 'argc' argument is always > 0 diff --git a/clang/test/Analysis/misc-ps-region-store-i386.m b/clang/test/Analysis/misc-ps-region-store-i386.m index c2c4d5b9413c..a833a653a425 100644 --- a/clang/test/Analysis/misc-ps-region-store-i386.m +++ b/clang/test/Analysis/misc-ps-region-store-i386.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref --analyzer-store=region --verify -fblocks %s +// RUN: clang-cc -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region --verify -fblocks %s // Here is a case where a pointer is treated as integer, invalidated as an // integer, and then used again as a pointer. This test just makes sure diff --git a/clang/test/Analysis/misc-ps-region-store-x86_64.m b/clang/test/Analysis/misc-ps-region-store-x86_64.m index 154ffaf3a003..7e614fd24833 100644 --- a/clang/test/Analysis/misc-ps-region-store-x86_64.m +++ b/clang/test/Analysis/misc-ps-region-store-x86_64.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref --analyzer-store=region --verify -fblocks %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region --verify -fblocks %s // Here is a case where a pointer is treated as integer, invalidated as an // integer, and then used again as a pointer. This test just makes sure diff --git a/clang/test/Analysis/misc-ps-region-store.m b/clang/test/Analysis/misc-ps-region-store.m index 2c5180791e0f..7ebc4a9fe5e5 100644 --- a/clang/test/Analysis/misc-ps-region-store.m +++ b/clang/test/Analysis/misc-ps-region-store.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref --analyzer-store=region --verify -fblocks %s -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref --analyzer-store=region --verify -fblocks %s +// RUN: clang-cc -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region --verify -fblocks %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region --verify -fblocks %s typedef struct objc_selector *SEL; typedef signed char BOOL; diff --git a/clang/test/Analysis/misc-ps.m b/clang/test/Analysis/misc-ps.m index de53d41e7855..3004afc9b981 100644 --- a/clang/test/Analysis/misc-ps.m +++ b/clang/test/Analysis/misc-ps.m @@ -1,8 +1,8 @@ // NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple reports are not issued. -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -fobjc-gc -analyzer-constraints=basic --verify -fblocks %s -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s -// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic -fobjc-gc -analyzer-constraints=basic --verify -fblocks %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=basic --verify -fblocks %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s typedef struct objc_ivar *Ivar; typedef struct objc_selector *SEL; diff --git a/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m b/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m index 3c20a64f0d23..536c4a1b6731 100644 --- a/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m +++ b/clang/test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify -// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify +// RUN: clang-cc -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify +// RUN: clang-cc -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify @interface MyClass {} - (void *)voidPtrM; diff --git a/clang/test/Analysis/no-exit-cfg.c b/clang/test/Analysis/no-exit-cfg.c index 5c4571b3138d..af8db135926f 100644 --- a/clang/test/Analysis/no-exit-cfg.c +++ b/clang/test/Analysis/no-exit-cfg.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // This is a test case for the issue reported in PR 2819: // http://llvm.org/bugs/show_bug.cgi?id=2819 diff --git a/clang/test/Analysis/no-outofbounds.c b/clang/test/Analysis/no-outofbounds.c index 67ea6b5ac8e4..475a2116a7c8 100644 --- a/clang/test/Analysis/no-outofbounds.c +++ b/clang/test/Analysis/no-outofbounds.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic -verify %s -// RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s +// RUN: clang-cc -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=basic -verify %s +// RUN: clang-cc -checker-cfref -analyze -analyzer-experimental-internal-checks -analyzer-store=region -verify %s // XFAIL: * //===----------------------------------------------------------------------===// diff --git a/clang/test/Analysis/null-deref-ps-region.c b/clang/test/Analysis/null-deref-ps-region.c index 80a5f9212fac..ab1151382573 100644 --- a/clang/test/Analysis/null-deref-ps-region.c +++ b/clang/test/Analysis/null-deref-ps-region.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -verify %s // The store for 'a[1]' should not be removed mistakenly. SymbolicRegions may diff --git a/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c index 9d18059663b7..4604db542980 100644 --- a/clang/test/Analysis/null-deref-ps.c +++ b/clang/test/Analysis/null-deref-ps.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -triple i386-apple-darwin10 -analyze -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic -// RUN: clang-cc -triple i386-apple-darwin10 -analyze -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic -// RUN: clang-cc -triple i386-apple-darwin10 -analyze -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -analyzer-purge-dead=false -verify %s -// RUN: clang-cc -triple i386-apple-darwin10 -analyze -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s +// RUN: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic +// RUN: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic +// RUN: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -analyzer-purge-dead=false -verify %s +// RUN: clang-cc -triple i386-apple-darwin10 -analyze -analyzer-experimental-internal-checks -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s typedef unsigned uintptr_t; diff --git a/clang/test/Analysis/outofbound.c b/clang/test/Analysis/outofbound.c index 102ab59874c5..d1a07abf527f 100644 --- a/clang/test/Analysis/outofbound.c +++ b/clang/test/Analysis/outofbound.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s char f1() { char* s = "abcd"; diff --git a/clang/test/Analysis/override-werror.c b/clang/test/Analysis/override-werror.c index 26601bb705c7..e8ce7bdc66dd 100644 --- a/clang/test/Analysis/override-werror.c +++ b/clang/test/Analysis/override-werror.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -Werror %s -analyzer-store=basic -verify -// RUN: clang-cc -analyze -checker-cfref -Werror %s -analyzer-store=region -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -Werror %s -analyzer-store=basic -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -Werror %s -analyzer-store=region -verify // This test case illustrates that using '-analyze' overrides the effect of // -Werror. This allows basic warnings not to interfere with producing diff --git a/clang/test/Analysis/pr4209.m b/clang/test/Analysis/pr4209.m index fd557b14ad69..5d77414921e6 100644 --- a/clang/test/Analysis/pr4209.m +++ b/clang/test/Analysis/pr4209.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // This test case was crashing due to how CFRefCount.cpp resolved the // ObjCInterfaceDecl* and ClassName in EvalObjCMessageExpr. diff --git a/clang/test/Analysis/pr_2542_rdar_6793404.m b/clang/test/Analysis/pr_2542_rdar_6793404.m index 9e6e79242d05..ebb69028a709 100644 --- a/clang/test/Analysis/pr_2542_rdar_6793404.m +++ b/clang/test/Analysis/pr_2542_rdar_6793404.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -pedantic -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -pedantic -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -pedantic -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -pedantic -analyzer-store=region -verify %s // BEGIN delta-debugging reduced header stuff diff --git a/clang/test/Analysis/pr_4164.c b/clang/test/Analysis/pr_4164.c index b820f0ffab79..176871773959 100644 --- a/clang/test/Analysis/pr_4164.c +++ b/clang/test/Analysis/pr_4164.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // PR 4164: http://llvm.org/bugs/show_bug.cgi?id=4164 // diff --git a/clang/test/Analysis/ptr-arith.c b/clang/test/Analysis/ptr-arith.c index fd780e8e1066..b585c85d67fe 100644 --- a/clang/test/Analysis/ptr-arith.c +++ b/clang/test/Analysis/ptr-arith.c @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify -triple i686-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify -triple i686-apple-darwin9 %s void f1() { int a[10]; diff --git a/clang/test/Analysis/rdar-6442306-1.m b/clang/test/Analysis/rdar-6442306-1.m index e6af7cbf853c..7b0a1a685bdf 100644 --- a/clang/test/Analysis/rdar-6442306-1.m +++ b/clang/test/Analysis/rdar-6442306-1.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify -// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref %s --analyzer-store=basic -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref %s --analyzer-store=region -verify typedef int bar_return_t; typedef struct { diff --git a/clang/test/Analysis/rdar-6540084.m b/clang/test/Analysis/rdar-6540084.m index cfe522074ed3..4d191d2f1e35 100644 --- a/clang/test/Analysis/rdar-6540084.m +++ b/clang/test/Analysis/rdar-6540084.m @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -warn-dead-stores -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -warn-dead-stores -verify %s // // This test exercises the live variables analysis (LiveVariables.cpp). // The case originally identified a non-termination bug. diff --git a/clang/test/Analysis/rdar-6541136-region.c b/clang/test/Analysis/rdar-6541136-region.c index cb7bf3ac020e..5190a032df8a 100644 --- a/clang/test/Analysis/rdar-6541136-region.c +++ b/clang/test/Analysis/rdar-6541136-region.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=region %s +// RUN: clang-cc -verify -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region %s struct tea_cheese { unsigned magic; }; typedef struct tea_cheese kernel_tea_cheese_t; diff --git a/clang/test/Analysis/rdar-6541136.c b/clang/test/Analysis/rdar-6541136.c index 6e6a479136b9..d5fc2e0ff1bd 100644 --- a/clang/test/Analysis/rdar-6541136.c +++ b/clang/test/Analysis/rdar-6541136.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=basic %s +// RUN: clang-cc -verify -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic %s struct tea_cheese { unsigned magic; }; typedef struct tea_cheese kernel_tea_cheese_t; diff --git a/clang/test/Analysis/rdar-6562655.m b/clang/test/Analysis/rdar-6562655.m index eea12c5ca4a1..0b837c6fa6e7 100644 --- a/clang/test/Analysis/rdar-6562655.m +++ b/clang/test/Analysis/rdar-6562655.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region -verify %s // // This test case mainly checks that the retain/release checker doesn't crash // on this file. diff --git a/clang/test/Analysis/rdar-6582778-basic-store.c b/clang/test/Analysis/rdar-6582778-basic-store.c index 9ec38ef7a5f0..a4850c133201 100644 --- a/clang/test/Analysis/rdar-6582778-basic-store.c +++ b/clang/test/Analysis/rdar-6582778-basic-store.c @@ -1,4 +1,4 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s typedef const void * CFTypeRef; typedef double CFTimeInterval; diff --git a/clang/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m b/clang/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m index eb490794fa7c..7230f21c08c3 100644 --- a/clang/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m +++ b/clang/test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify -// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=basic %s -verify +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify typedef struct Foo { int x; } Bar; diff --git a/clang/test/Analysis/rdar-7168531.m b/clang/test/Analysis/rdar-7168531.m index a73471f54007..6c34125d056c 100644 --- a/clang/test/Analysis/rdar-7168531.m +++ b/clang/test/Analysis/rdar-7168531.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -triple i386-apple-darwin10 -analyzer-store=region -// RUN: clang-cc -analyze -checker-cfref -triple i386-apple-darwin10 -analyzer-store=basic +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -triple i386-apple-darwin10 -analyzer-store=region +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -triple i386-apple-darwin10 -analyzer-store=basic // Note that the target triple is important for this test case. It specifies that we use the // fragile Objective-C ABI. diff --git a/clang/test/Analysis/refcnt_naming.m b/clang/test/Analysis/refcnt_naming.m index 927c70a9dae9..a4c290442a57 100644 --- a/clang/test/Analysis/refcnt_naming.m +++ b/clang/test/Analysis/refcnt_naming.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s typedef const struct __CFString * CFStringRef; typedef const struct __CFAllocator * CFAllocatorRef; diff --git a/clang/test/Analysis/region-1.m b/clang/test/Analysis/region-1.m index ae7a91400c7d..2ac1a9b78d2e 100644 --- a/clang/test/Analysis/region-1.m +++ b/clang/test/Analysis/region-1.m @@ -1,5 +1,5 @@ -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s -// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=basic -verify %s +// RUN: clang-cc -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s // // This test case simply should not crash. It evaluates the logic of not // using MemRegion::getRValueType in incorrect places. diff --git a/clang/tools/clang-cc/Options.cpp b/clang/tools/clang-cc/Options.cpp index 0a6c2143e06b..4f01c301383c 100644 --- a/clang/tools/clang-cc/Options.cpp +++ b/clang/tools/clang-cc/Options.cpp @@ -86,6 +86,10 @@ AnalyzerDisplayProgress("analyzer-display-progress", static llvm::cl::opt AnalyzerExperimentalChecks("analyzer-experimental-checks", llvm::cl::desc("Use experimental path-sensitive checks")); + +static llvm::cl::opt +AnalyzerExperimentalInternalChecks("analyzer-experimental-internal-checks", + llvm::cl::desc("Use new default path-sensitive checks currently in testing")); static llvm::cl::opt AnalyzeSpecificFunction("analyze-function", @@ -131,6 +135,7 @@ void clang::InitializeAnalyzerOptions(AnalyzerOptions &Opts) { Opts.EagerlyAssume = EagerlyAssume; Opts.AnalyzeSpecificFunction = AnalyzeSpecificFunction; Opts.EnableExperimentalChecks = AnalyzerExperimentalChecks; + Opts.EnableExperimentalInternalChecks = AnalyzerExperimentalInternalChecks; Opts.TrimGraph = TrimGraph; } diff --git a/clang/utils/ccc-analyzer b/clang/utils/ccc-analyzer index ddc5030bc2ef..ecc00ea56dfc 100755 --- a/clang/utils/ccc-analyzer +++ b/clang/utils/ccc-analyzer @@ -160,6 +160,11 @@ sub Analyze { push @CmdArgs,"-analyzer-display-progress"; push @CmdArgs,"-analyzer-eagerly-assume"; push @CmdArgs,(split /\s/,$Analyses); + + if (defined $ENV{"CCC_EXPERIMENTAL_CHECKS"}) { + push @CmdArgs,"-analyzer-experimental-internal-checks"; + } + $RunAnalyzer = 1; } diff --git a/clang/utils/scan-build b/clang/utils/scan-build index 78394b179d56..1e07ae72385d 100755 --- a/clang/utils/scan-build +++ b/clang/utils/scan-build @@ -902,6 +902,8 @@ print <