forked from OSchip/llvm-project
Remove 'StoreManager::OldCastRegion()', TypedViewRegion (which only
OldCastRegion used), and the associated command line option '-analyzer-store=old-basic-cast'. llvm-svn: 77509
This commit is contained in:
parent
7667332899
commit
4301526e8d
|
@ -46,7 +46,6 @@ public:
|
|||
CodeTextRegionKind,
|
||||
CompoundLiteralRegionKind,
|
||||
StringRegionKind, ElementRegionKind,
|
||||
TypedViewRegionKind,
|
||||
// Decl Regions.
|
||||
BEG_DECL_REGIONS,
|
||||
VarRegionKind, FieldRegionKind,
|
||||
|
@ -340,46 +339,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
class TypedViewRegion : public TypedRegion {
|
||||
friend class MemRegionManager;
|
||||
QualType LValueType;
|
||||
|
||||
TypedViewRegion(QualType lvalueType, const MemRegion* sreg)
|
||||
: TypedRegion(sreg, TypedViewRegionKind), LValueType(lvalueType) {}
|
||||
|
||||
static void ProfileRegion(llvm::FoldingSetNodeID& ID, QualType T,
|
||||
const MemRegion* superRegion);
|
||||
|
||||
public:
|
||||
|
||||
void dumpToStream(llvm::raw_ostream& os) const;
|
||||
|
||||
QualType getLocationType(ASTContext&) const {
|
||||
return LValueType;
|
||||
}
|
||||
|
||||
QualType getValueType(ASTContext&) const {
|
||||
const PointerType* PTy = LValueType->getAsPointerType();
|
||||
assert(PTy);
|
||||
return PTy->getPointeeType();
|
||||
}
|
||||
|
||||
bool isBoundable() const {
|
||||
return isa<PointerType>(LValueType);
|
||||
}
|
||||
|
||||
void Profile(llvm::FoldingSetNodeID& ID) const {
|
||||
ProfileRegion(ID, LValueType, superRegion);
|
||||
}
|
||||
|
||||
static bool classof(const MemRegion* R) {
|
||||
return R->getKind() == TypedViewRegionKind;
|
||||
}
|
||||
|
||||
const MemRegion *removeViews() const;
|
||||
};
|
||||
|
||||
|
||||
/// CompoundLiteralRegion - A memory region representing a compound literal.
|
||||
/// Compound literals are essentially temporaries that are stack allocated
|
||||
/// or in the global constant pool.
|
||||
|
@ -575,22 +534,10 @@ public:
|
|||
|
||||
template<typename RegionTy>
|
||||
const RegionTy* MemRegion::getAs() const {
|
||||
const MemRegion *R = this;
|
||||
if (const RegionTy* RT = dyn_cast<RegionTy>(this))
|
||||
return RT;
|
||||
|
||||
do {
|
||||
if (const RegionTy* RT = dyn_cast<RegionTy>(R))
|
||||
return RT;
|
||||
|
||||
if (const TypedViewRegion *TR = dyn_cast<TypedViewRegion>(R)) {
|
||||
R = TR->getSuperRegion();
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
while (R);
|
||||
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -680,10 +627,6 @@ public:
|
|||
/// object).
|
||||
ObjCIvarRegion* getObjCIvarRegion(const ObjCIvarDecl* ivd,
|
||||
const MemRegion* superRegion);
|
||||
|
||||
TypedViewRegion* getTypedViewRegion(QualType LValueType,
|
||||
const MemRegion* superRegion);
|
||||
|
||||
CodeTextRegion* getCodeTextRegion(SymbolRef sym, QualType t);
|
||||
CodeTextRegion* getCodeTextRegion(const FunctionDecl* fd, QualType t);
|
||||
|
||||
|
|
|
@ -37,12 +37,11 @@ class StoreManager {
|
|||
protected:
|
||||
ValueManager &ValMgr;
|
||||
GRStateManager &StateMgr;
|
||||
const bool UseNewCastRegion;
|
||||
|
||||
/// MRMgr - Manages region objects associated with this StoreManager.
|
||||
MemRegionManager &MRMgr;
|
||||
|
||||
StoreManager(GRStateManager &stateMgr, bool useNewCastRegion = false);
|
||||
StoreManager(GRStateManager &stateMgr);
|
||||
|
||||
protected:
|
||||
virtual const GRState *AddRegionView(const GRState *state,
|
||||
|
@ -135,10 +134,7 @@ public:
|
|||
/// a MemRegion* to a specific location type. 'R' is the region being
|
||||
/// casted and 'CastToTy' the result type of the cast.
|
||||
CastResult CastRegion(const GRState *state, const MemRegion *region,
|
||||
QualType CastToTy) {
|
||||
return UseNewCastRegion ? NewCastRegion(state, region, CastToTy)
|
||||
: OldCastRegion(state, region, CastToTy);
|
||||
}
|
||||
QualType CastToTy);
|
||||
|
||||
virtual const GRState *setCastType(const GRState *state, const MemRegion* R,
|
||||
QualType T) {
|
||||
|
@ -203,12 +199,6 @@ public:
|
|||
private:
|
||||
CastResult MakeElementRegion(const GRState *state, const MemRegion *region,
|
||||
QualType pointeeTy, QualType castToTy);
|
||||
|
||||
CastResult NewCastRegion(const GRState *state, const MemRegion *region,
|
||||
QualType CastToTy);
|
||||
|
||||
CastResult OldCastRegion(const GRState *state, const MemRegion *region,
|
||||
QualType CastToTy);
|
||||
};
|
||||
|
||||
// FIXME: Do we still need this?
|
||||
|
@ -229,7 +219,6 @@ public:
|
|||
|
||||
// FIXME: Do we need to pass GRStateManager anymore?
|
||||
StoreManager *CreateBasicStoreManager(GRStateManager& StMgr);
|
||||
StoreManager *CreateBasicStoreOldCastManager(GRStateManager& StMgr);
|
||||
StoreManager *CreateRegionStoreManager(GRStateManager& StMgr);
|
||||
StoreManager *CreateFieldsOnlyRegionStoreManager(GRStateManager& StMgr);
|
||||
|
||||
|
|
|
@ -53,7 +53,6 @@ ANALYSIS(CheckerCFRef, "checker-cfref",
|
|||
#endif
|
||||
|
||||
ANALYSIS_STORE(BasicStore, "basic", "Use basic analyzer store", CreateBasicStoreManager)
|
||||
ANALYSIS_STORE(BasicStoreOldCast, "basic-old-cast", "Use basic analyzer store with the old CastRegion", CreateBasicStoreOldCastManager)
|
||||
ANALYSIS_STORE(RegionStore, "region", "Use region-based analyzer store", CreateRegionStoreManager)
|
||||
|
||||
#ifndef ANALYSIS_CONSTRAINTS
|
||||
|
|
|
@ -38,10 +38,8 @@ class VISIBILITY_HIDDEN BasicStoreManager : public StoreManager {
|
|||
const MemRegion* SelfRegion;
|
||||
|
||||
public:
|
||||
BasicStoreManager(GRStateManager& mgr, bool useNewCastRegion = true)
|
||||
: StoreManager(mgr, useNewCastRegion),
|
||||
VBFactory(mgr.getAllocator()),
|
||||
SelfRegion(0) {}
|
||||
BasicStoreManager(GRStateManager& mgr)
|
||||
: StoreManager(mgr), VBFactory(mgr.getAllocator()), SelfRegion(0) {}
|
||||
|
||||
~BasicStoreManager() {}
|
||||
|
||||
|
@ -130,10 +128,6 @@ StoreManager* clang::CreateBasicStoreManager(GRStateManager& StMgr) {
|
|||
return new BasicStoreManager(StMgr);
|
||||
}
|
||||
|
||||
StoreManager* clang::CreateBasicStoreOldCastManager(GRStateManager& StMgr) {
|
||||
return new BasicStoreManager(StMgr, false);
|
||||
}
|
||||
|
||||
SVal BasicStoreManager::getLValueVar(const GRState *state, const VarDecl* VD) {
|
||||
return ValMgr.makeLoc(MRMgr.getVarRegion(VD));
|
||||
}
|
||||
|
|
|
@ -74,13 +74,6 @@ void AllocaRegion::Profile(llvm::FoldingSetNodeID& ID) const {
|
|||
ProfileRegion(ID, Ex, Cnt, superRegion);
|
||||
}
|
||||
|
||||
void TypedViewRegion::ProfileRegion(llvm::FoldingSetNodeID& ID, QualType T,
|
||||
const MemRegion* superRegion) {
|
||||
ID.AddInteger((unsigned) TypedViewRegionKind);
|
||||
ID.Add(T);
|
||||
ID.AddPointer(superRegion);
|
||||
}
|
||||
|
||||
void CompoundLiteralRegion::Profile(llvm::FoldingSetNodeID& ID) const {
|
||||
CompoundLiteralRegion::ProfileRegion(ID, CL, superRegion);
|
||||
}
|
||||
|
@ -197,11 +190,6 @@ void SymbolicRegion::dumpToStream(llvm::raw_ostream& os) const {
|
|||
os << "SymRegion{" << sym << '}';
|
||||
}
|
||||
|
||||
void TypedViewRegion::dumpToStream(llvm::raw_ostream& os) const {
|
||||
os << "typed_view{" << LValueType.getAsString() << ','
|
||||
<< getSuperRegion() << '}';
|
||||
}
|
||||
|
||||
void VarRegion::dumpToStream(llvm::raw_ostream& os) const {
|
||||
os << cast<VarDecl>(D)->getNameAsString();
|
||||
}
|
||||
|
@ -314,11 +302,6 @@ MemRegionManager::getObjCObjectRegion(const ObjCInterfaceDecl* d,
|
|||
return getSubRegion<ObjCObjectRegion>(d, superRegion);
|
||||
}
|
||||
|
||||
TypedViewRegion*
|
||||
MemRegionManager::getTypedViewRegion(QualType t, const MemRegion* superRegion) {
|
||||
return getSubRegion<TypedViewRegion>(t, superRegion);
|
||||
}
|
||||
|
||||
AllocaRegion* MemRegionManager::getAllocaRegion(const Expr* E, unsigned cnt) {
|
||||
return getRegion<AllocaRegion>(E, cnt);
|
||||
}
|
||||
|
@ -389,16 +372,6 @@ bool MemRegion::hasGlobalsOrParametersStorage() const {
|
|||
// View handling.
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
const MemRegion *TypedViewRegion::removeViews() const {
|
||||
const SubRegion *SR = this;
|
||||
const MemRegion *R = SR;
|
||||
while (SR && isa<TypedViewRegion>(SR)) {
|
||||
R = SR->getSuperRegion();
|
||||
SR = dyn_cast<SubRegion>(R);
|
||||
}
|
||||
return R;
|
||||
}
|
||||
|
||||
const MemRegion *MemRegion::getBaseRegion() const {
|
||||
const MemRegion *R = this;
|
||||
while (true) {
|
||||
|
|
|
@ -170,7 +170,7 @@ class VISIBILITY_HIDDEN RegionStoreManager : public StoreManager {
|
|||
|
||||
public:
|
||||
RegionStoreManager(GRStateManager& mgr, const RegionStoreFeatures &f)
|
||||
: StoreManager(mgr, true),
|
||||
: StoreManager(mgr),
|
||||
Features(f),
|
||||
RBFactory(mgr.getAllocator()),
|
||||
RVFactory(mgr.getAllocator()),
|
||||
|
@ -679,10 +679,6 @@ SVal RegionStoreManager::getSizeInElements(const GRState *state,
|
|||
return ValMgr.makeIntVal(Str->getByteLength()+1, false);
|
||||
}
|
||||
|
||||
// TypedViewRegion will soon be removed.
|
||||
case MemRegion::TypedViewRegionKind:
|
||||
return UnknownVal();
|
||||
|
||||
case MemRegion::VarRegionKind: {
|
||||
const VarRegion* VR = cast<VarRegion>(R);
|
||||
// Get the type of the variable.
|
||||
|
@ -823,10 +819,6 @@ SVal RegionStoreManager::EvalBinOp(const GRState *state,
|
|||
case MemRegion::ObjCIvarRegionKind:
|
||||
return UnknownVal();
|
||||
|
||||
// TypedViewRegion will soon be removed.
|
||||
case MemRegion::TypedViewRegionKind:
|
||||
return UnknownVal();
|
||||
|
||||
case MemRegion::CodeTextRegionKind:
|
||||
// Technically this can happen if people do funny things with casts.
|
||||
return UnknownVal();
|
||||
|
|
|
@ -73,21 +73,10 @@ const FunctionDecl* SVal::getAsFunctionDecl() const {
|
|||
SymbolRef SVal::getAsLocSymbol() const {
|
||||
if (const loc::MemRegionVal *X = dyn_cast<loc::MemRegionVal>(this)) {
|
||||
const MemRegion *R = X->getBaseRegion();
|
||||
|
||||
while (R) {
|
||||
// Blast through region views.
|
||||
if (const TypedViewRegion *View = dyn_cast<TypedViewRegion>(R)) {
|
||||
R = View->getSuperRegion();
|
||||
continue;
|
||||
}
|
||||
if (const SymbolicRegion *SymR = dyn_cast<SymbolicRegion>(R))
|
||||
return SymR->getSymbol();
|
||||
|
||||
break;
|
||||
}
|
||||
if (const SymbolicRegion *SymR = dyn_cast<SymbolicRegion>(R))
|
||||
return SymR->getSymbol();
|
||||
}
|
||||
|
||||
return 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/// getAsSymbol - If this Sval wraps a symbol return that SymbolRef.
|
||||
|
|
|
@ -73,10 +73,6 @@ SValuator::CastResult SValuator::EvalCast(SVal val, const GRState *state,
|
|||
|
||||
// Check for casts from a region to a specific type.
|
||||
if (const MemRegion *R = val.getAsRegion()) {
|
||||
// FIXME: For TypedViewRegions, we should handle the case where the
|
||||
// underlying symbolic pointer is a function pointer or
|
||||
// block pointer.
|
||||
|
||||
// FIXME: We should handle the case where we strip off view layers to get
|
||||
// to a desugared type.
|
||||
|
||||
|
|
|
@ -16,10 +16,8 @@
|
|||
|
||||
using namespace clang;
|
||||
|
||||
StoreManager::StoreManager(GRStateManager &stateMgr, bool useNewCastRegion)
|
||||
: ValMgr(stateMgr.getValueManager()),
|
||||
StateMgr(stateMgr),
|
||||
UseNewCastRegion(useNewCastRegion),
|
||||
StoreManager::StoreManager(GRStateManager &stateMgr)
|
||||
: ValMgr(stateMgr.getValueManager()), StateMgr(stateMgr),
|
||||
MRMgr(ValMgr.getRegionManager()) {}
|
||||
|
||||
StoreManager::CastResult
|
||||
|
@ -46,8 +44,8 @@ static bool IsCompleteType(ASTContext &Ctx, QualType Ty) {
|
|||
}
|
||||
|
||||
StoreManager::CastResult
|
||||
StoreManager::NewCastRegion(const GRState *state, const MemRegion* R,
|
||||
QualType CastToTy) {
|
||||
StoreManager::CastRegion(const GRState *state, const MemRegion* R,
|
||||
QualType CastToTy) {
|
||||
|
||||
ASTContext& Ctx = StateMgr.getContext();
|
||||
|
||||
|
@ -87,8 +85,7 @@ StoreManager::NewCastRegion(const GRState *state, const MemRegion* R,
|
|||
case MemRegion::MemSpaceRegionKind:
|
||||
case MemRegion::BEG_DECL_REGIONS:
|
||||
case MemRegion::END_DECL_REGIONS:
|
||||
case MemRegion::END_TYPED_REGIONS:
|
||||
case MemRegion::TypedViewRegionKind: {
|
||||
case MemRegion::END_TYPED_REGIONS: {
|
||||
assert(0 && "Invalid region cast");
|
||||
break;
|
||||
}
|
||||
|
@ -147,90 +144,3 @@ StoreManager::NewCastRegion(const GRState *state, const MemRegion* R,
|
|||
|
||||
return CastResult(state, R);
|
||||
}
|
||||
|
||||
|
||||
StoreManager::CastResult
|
||||
StoreManager::OldCastRegion(const GRState* state, const MemRegion* R,
|
||||
QualType CastToTy) {
|
||||
|
||||
ASTContext& Ctx = StateMgr.getContext();
|
||||
|
||||
// We need to know the real type of CastToTy.
|
||||
QualType ToTy = Ctx.getCanonicalType(CastToTy);
|
||||
|
||||
// Return the same region if the region types are compatible.
|
||||
if (const TypedRegion* TR = dyn_cast<TypedRegion>(R)) {
|
||||
QualType Ta = Ctx.getCanonicalType(TR->getLocationType(Ctx));
|
||||
|
||||
if (Ta == ToTy)
|
||||
return CastResult(state, R);
|
||||
}
|
||||
|
||||
if (const PointerType* PTy = dyn_cast<PointerType>(ToTy.getTypePtr())) {
|
||||
// Check if we are casting to 'void*'.
|
||||
// FIXME: Handle arbitrary upcasts.
|
||||
QualType Pointee = PTy->getPointeeType();
|
||||
if (Pointee->isVoidType()) {
|
||||
while (true) {
|
||||
if (const TypedViewRegion *TR = dyn_cast<TypedViewRegion>(R)) {
|
||||
// Casts to void* removes TypedViewRegion. This happens when:
|
||||
//
|
||||
// void foo(void*);
|
||||
// ...
|
||||
// void bar() {
|
||||
// int x;
|
||||
// foo(&x);
|
||||
// }
|
||||
//
|
||||
R = TR->removeViews();
|
||||
continue;
|
||||
}
|
||||
else if (const ElementRegion *ER = dyn_cast<ElementRegion>(R)) {
|
||||
// Casts to void* also removes ElementRegions. This happens when:
|
||||
//
|
||||
// void foo(void*);
|
||||
// ...
|
||||
// void bar() {
|
||||
// int x;
|
||||
// foo((char*)&x);
|
||||
// }
|
||||
//
|
||||
R = ER->getSuperRegion();
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return CastResult(state, R);
|
||||
}
|
||||
else if (Pointee->isIntegerType()) {
|
||||
// FIXME: At some point, it stands to reason that this 'dyn_cast' should
|
||||
// become a 'cast' and that 'R' will always be a TypedRegion.
|
||||
if (const TypedRegion *TR = dyn_cast<TypedRegion>(R)) {
|
||||
// Check if we are casting to a region with an integer type. We now
|
||||
// the types aren't the same, so we construct an ElementRegion.
|
||||
SVal Idx = ValMgr.makeZeroArrayIndex();
|
||||
|
||||
// If the super region is an element region, strip it away.
|
||||
// FIXME: Is this the right thing to do in all cases?
|
||||
const MemRegion *Base = isa<ElementRegion>(TR) ? TR->getSuperRegion()
|
||||
: TR;
|
||||
ElementRegion* ER = MRMgr.getElementRegion(Pointee, Idx, Base,
|
||||
StateMgr.getContext());
|
||||
return CastResult(state, ER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Need to handle arbitrary downcasts.
|
||||
// FIXME: Handle the case where a TypedViewRegion (layering a SymbolicRegion
|
||||
// or an AllocaRegion is cast to another view, thus causing the memory
|
||||
// to be re-used for a different purpose.
|
||||
if (isa<SymbolicRegion>(R) || isa<AllocaRegion>(R)) {
|
||||
const MemRegion* ViewR = MRMgr.getTypedViewRegion(CastToTy, R);
|
||||
return CastResult(AddRegionView(state, ViewR, R), ViewR);
|
||||
}
|
||||
|
||||
return CastResult(state, R);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
// 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-old-cast -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-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// 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-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic-old-cast &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic-old-cast &&
|
||||
// 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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -analyzer-constraints=range -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=basic-old-cast -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=range -verify %s &&
|
||||
// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=basic-old-cast -analyzer-constraints=range -verify %s &&
|
||||
// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -triple i386-pc-linux-gnu -analyze -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// 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-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic %s -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
// RUN: clang-cc -analyze -analyzer-constraints=basic -analyzer-store=basic -checker-cfref -fobjc-gc -verify %s &&
|
||||
// RUN: clang-cc -analyze -analyzer-constraints=basic -analyzer-store=basic-old-cast -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=range -analyzer-store=basic-old-cast -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=basic -analyzer-store=basic-old-cast -checker-cfref -fobjc-gc -verify %s &&
|
||||
// RUN: clang-cc -analyze -analyzer-constraints=range -analyzer-store=region -checker-cfref -fobjc-gc -verify %s
|
||||
|
||||
typedef const void * CFTypeRef;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// 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-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic --verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast --verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region --verify %s
|
||||
|
||||
// Test function pointer casts. Currently we track function addresses using
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -analyzer-constraints=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic --verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast --verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region --verify %s
|
||||
|
||||
void foo() {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// 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-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
// 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-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
//
|
||||
// Just exercise the analyzer on code that has at one point caused issues
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic-old-cast -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
|
||||
|
||||
unsigned foo();
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
void f(void) {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// 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-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic --verify -fblocks %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast --verify -fblocks %s
|
||||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic --verify -fblocks %s
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Test case 'checkaccess_union' differs for region store and basic store.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=range --verify -fblocks %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast -analyzer-constraints=range --verify -fblocks %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=region -analyzer-constraints=range --verify -fblocks %s
|
||||
|
||||
// <rdar://problem/6776949>
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic --verify -fblocks %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
// XFAIL
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic -analyzer-constraints=basic --verify -fblocks %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref --analyzer-store=basic-old-cast -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=basic-old-cast -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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// 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=basic-old-cast %s -verify &&
|
||||
// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify
|
||||
|
||||
@interface MyClass {}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
// This is a test case for the issue reported in PR 2819:
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -checker-cfref -analyze -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -checker-cfref -analyze -analyzer-store=region -verify %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic &&
|
||||
// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=basic -analyzer-store=basic-old-cast &&
|
||||
// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic &&
|
||||
// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -verify %s -analyzer-constraints=range -analyzer-store=basic-old-cast &&
|
||||
// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -analyzer-purge-dead=false -verify %s &&
|
||||
// RUN: clang-cc -analyze -std=gnu99 -checker-cfref -analyzer-store=region -analyzer-constraints=range -verify %s
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -Werror %s -analyzer-store=basic -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -Werror %s -analyzer-store=basic-old-cast -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -Werror %s -analyzer-store=region -verify
|
||||
|
||||
// This test case illustrates that using '-analyze' overrides the effect of
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// 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=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -triple i386-apple-darwin9 -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
// This test case was crashing due to how CFRefCount.cpp resolved the
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -pedantic -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -pedantic -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -pedantic -analyzer-store=region -verify %s
|
||||
|
||||
// BEGIN delta-debugging reduced header stuff
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// 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=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
// PR 4164: http://llvm.org/bugs/show_bug.cgi?id=4164
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=basic-old-cast -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref %s --analyzer-store=region -verify
|
||||
|
||||
typedef int bar_return_t;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
typedef const struct __CFAllocator * CFAllocatorRef;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=basic %s &&
|
||||
// RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=basic-old-cast %s
|
||||
// RUN: clang-cc -verify -analyze -checker-cfref -analyzer-store=basic %s
|
||||
|
||||
struct tea_cheese { unsigned magic; };
|
||||
typedef struct tea_cheese kernel_tea_cheese_t;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// 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=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=region -verify %s
|
||||
//
|
||||
// This test case mainly checks that the retain/release checker doesn't crash
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s
|
||||
|
||||
typedef const void * CFTypeRef;
|
||||
typedef double CFTimeInterval;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// 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=basic-old-cast %s -verify &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-constraints=basic -analyzer-store=region %s -verify
|
||||
|
||||
typedef struct Foo { int x; } Bar;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
typedef const struct __CFString * CFStringRef;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
//
|
||||
// This test case simply should not crash. It evaluates the logic of not
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// The following code is reduced using delta-debugging from
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify -fobjc-gc-only %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify -fobjc-gc-only %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -fobjc-gc-only -verify %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
//>>SLICER
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
#if __has_feature(attribute_ns_returns_retained)
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -verify -analyzer-store=basic -checker-cfref %s &&
|
||||
// RUN: clang-cc -analyze -verify -analyzer-store=basic-old-cast -checker-cfref %s &&
|
||||
// RUN: clang-cc -analyze -verify -analyzer-store=region -checker-cfref %s
|
||||
|
||||
// Delta-Debugging reduced preamble.
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
struct FPRec {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic-old-cast -verify %s &&
|
||||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
||||
|
||||
typedef unsigned int NSUInteger;
|
||||
|
|
Loading…
Reference in New Issue