Index: include/clang/StaticAnalyzer/Checkers/SValExplainer.h =================================================================== --- include/clang/StaticAnalyzer/Checkers/SValExplainer.h +++ include/clang/StaticAnalyzer/Checkers/SValExplainer.h @@ -125,8 +125,14 @@ return OS.str(); } - // TODO: IntSymExpr doesn't appear in practice. - // Add the relevant code once it does. + std::string VisitIntSymExpr(const IntSymExpr *S) { + std::string Str; + llvm::raw_string_ostream OS(Str); + OS << S->getLHS() + << std::string(BinaryOperator::getOpcodeStr(S->getOpcode())) << " " + << "(" << Visit(S->getRHS()) << ") "; + return OS.str(); + } std::string VisitSymSymExpr(const SymSymExpr *S) { return "(" + Visit(S->getLHS()) + ") " + @@ -134,8 +140,10 @@ " (" + Visit(S->getRHS()) + ")"; } - // TODO: SymbolCast doesn't appear in practice. - // Add the relevant code once it does. + std::string VisitSymbolCast(const SymbolCast *S) { + return "cast of type '" + S->getType().getAsString() + "' of " + + Visit(S->getOperand()); + } std::string VisitSymbolicRegion(const SymbolicRegion *R) { // Explain 'this' object here. Index: include/clang/StaticAnalyzer/Core/Analyses.def =================================================================== --- include/clang/StaticAnalyzer/Core/Analyses.def +++ include/clang/StaticAnalyzer/Core/Analyses.def @@ -22,7 +22,7 @@ #endif ANALYSIS_CONSTRAINTS(RangeConstraints, "range", "Use constraint tracking of concrete value ranges", CreateRangeConstraintManager) -ANALYSIS_CONSTRAINTS(Z3Constraints, "z3", "Use Z3 contraint solver", CreateZ3ConstraintManager) +ANALYSIS_CONSTRAINTS(Z3Constraints, "z3", "Use Z3 contraint solver", CreateZ3ConstraintManagerStub) #ifndef ANALYSIS_DIAGNOSTICS #define ANALYSIS_DIAGNOSTICS(NAME, CMDFLAG, DESC, CREATEFN) Index: include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h =================================================================== --- include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h +++ include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h @@ -185,7 +185,7 @@ SubEngine *subengine); std::unique_ptr -CreateZ3ConstraintManager(ProgramStateManager &statemgr, SubEngine *subengine); +CreateZ3ConstraintManagerStub(ProgramStateManager &statemgr, SubEngine *subengine); } // end GR namespace Index: lib/StaticAnalyzer/Core/CMakeLists.txt =================================================================== --- lib/StaticAnalyzer/Core/CMakeLists.txt +++ lib/StaticAnalyzer/Core/CMakeLists.txt @@ -1,12 +1,5 @@ set(LLVM_LINK_COMPONENTS support) -# Link Z3 if the user wants to build it. -if(CLANG_HAVE_Z3) - set(Z3_LINK_FILES ${Z3_LIBRARIES}) -else() - set(Z3_LINK_FILES"") -endif() - add_clang_library(clangStaticAnalyzerCore APSIntType.cpp AnalysisManager.cpp @@ -50,7 +43,7 @@ Store.cpp SubEngine.cpp SymbolManager.cpp - Z3ConstraintManager.cpp + Z3ConstraintManagerStub.cpp LINK_LIBS clangAST @@ -58,5 +51,4 @@ clangBasic clangLex clangRewrite - ${Z3_LINK_FILES} ) Index: lib/StaticAnalyzer/Core/SValBuilder.cpp =================================================================== --- lib/StaticAnalyzer/Core/SValBuilder.cpp +++ lib/StaticAnalyzer/Core/SValBuilder.cpp @@ -353,14 +353,11 @@ BinaryOperator::Opcode Op, NonLoc LHS, NonLoc RHS, QualType ResultTy) { - if (!State->isTainted(RHS) && !State->isTainted(LHS)) - return UnknownVal(); - const SymExpr *symLHS = LHS.getAsSymExpr(); const SymExpr *symRHS = RHS.getAsSymExpr(); // TODO: When the Max Complexity is reached, we should conjure a symbol // instead of generating an Unknown value and propagate the taint info to it. - const unsigned MaxComp = 10000; // 100000 28X + const unsigned MaxComp = 1000; // 10000 28X if (symLHS && symRHS && (symLHS->computeComplexity() + symRHS->computeComplexity()) < MaxComp) Index: lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp =================================================================== --- lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -662,12 +662,12 @@ // If one of the operands is a symbol and the other is a constant, // build an expression for use by the constraint manager. if (SymbolRef rSym = rhs.getAsLocSymbol()) { - // We can only build expressions with symbols on the left, - // so we need a reversible operator. + const llvm::APSInt &lVal = lhs.castAs().getValue(); + + // Prefer expressions with symbols on the left if (!BinaryOperator::isComparisonOp(op)) - return UnknownVal(); + return makeNonLoc(lVal, op, rSym, resultTy); - const llvm::APSInt &lVal = lhs.castAs().getValue(); op = BinaryOperator::reverseComparisonOp(op); return makeNonLoc(rSym, op, lVal, resultTy); } @@ -981,6 +981,9 @@ if (SymbolRef Sym = V.getAsSymbol()) return state->getConstraintManager().getSymVal(state, Sym); - // FIXME: Add support for SymExprs. + if (Optional NV = V.getAs()) + if (SymbolRef Sym = NV->getAsSymExpr()) + return state->getConstraintManager().getSymVal(state, Sym); + return nullptr; } Index: lib/StaticAnalyzer/Core/Z3ConstraintManagerStub.cpp =================================================================== --- /dev/null +++ lib/StaticAnalyzer/Core/Z3ConstraintManagerStub.cpp @@ -0,0 +1,32 @@ +//== Z3ConstraintManagerStub.cpp --------------------------------*- C++ -*--==// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "clang/StaticAnalyzer/Core/PathSensitive/SimpleConstraintManager.h" + +#include "llvm/Support/DynamicLibrary.h" +#include "llvm/Support/ErrorHandling.h" + +using namespace clang; +using namespace ento; +using llvm::sys::DynamicLibrary; + +std::unique_ptr +ento::CreateZ3ConstraintManagerStub(ProgramStateManager &StMgr, SubEngine *Eng) { + static ConstraintManagerCreator CMCreator = nullptr; + + // Lookup and cache the result + if (!CMCreator) + CMCreator = (ConstraintManagerCreator) DynamicLibrary::SearchForAddressOfSymbol("CreateZ3ConstraintManager"); + + if (CMCreator) + return CMCreator(StMgr, Eng); + + llvm::report_fatal_error("The Z3 constraint manager plugin was not loaded!"); + return nullptr; +} Index: test/Analysis/CFContainers-invalid.c =================================================================== --- test/Analysis/CFContainers-invalid.c +++ test/Analysis/CFContainers-invalid.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues -triple x86_64-apple-darwin -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues -triple x86_64-apple-darwin -verify %s // expected-no-diagnostics typedef const struct __CFAllocator * CFAllocatorRef; Index: test/Analysis/CFContainers.mm =================================================================== --- test/Analysis/CFContainers.mm +++ test/Analysis/CFContainers.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues,osx.coreFoundation.containers.OutOfBounds -analyzer-store=region -triple x86_64-apple-darwin -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.coreFoundation.containers.PointerSizedValues,osx.coreFoundation.containers.OutOfBounds -analyzer-store=region -triple x86_64-apple-darwin -verify %s typedef const struct __CFAllocator * CFAllocatorRef; typedef const struct __CFString * CFStringRef; Index: test/Analysis/CFDateGC.m =================================================================== --- test/Analysis/CFDateGC.m +++ test/Analysis/CFDateGC.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify -fobjc-gc %s -Wno-implicit-function-declaration +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify -fobjc-gc %s -Wno-implicit-function-declaration //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Index: test/Analysis/CFNumber.c =================================================================== --- test/Analysis/CFNumber.c +++ test/Analysis/CFNumber.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.coreFoundation.CFNumber,osx.cocoa.RetainCount -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.coreFoundation.CFNumber,osx.cocoa.RetainCount -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s typedef signed long CFIndex; typedef const struct __CFAllocator * CFAllocatorRef; Index: test/Analysis/CFRetainRelease_NSAssertionHandler.m =================================================================== --- test/Analysis/CFRetainRelease_NSAssertionHandler.m +++ test/Analysis/CFRetainRelease_NSAssertionHandler.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -verify %s -analyzer-store=region +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -verify %s -analyzer-store=region // expected-no-diagnostics typedef struct objc_selector *SEL; Index: test/Analysis/CGColorSpace.c =================================================================== --- test/Analysis/CGColorSpace.c +++ test/Analysis/CGColorSpace.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify %s typedef struct CGColorSpace *CGColorSpaceRef; extern CGColorSpaceRef CGColorSpaceCreateDeviceRGB(void); Index: test/Analysis/CheckNSError.m =================================================================== --- test/Analysis/CheckNSError.m +++ test/Analysis/CheckNSError.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.NSError,osx.coreFoundation.CFError -analyzer-store=region -verify -Wno-objc-root-class %s typedef signed char BOOL; Index: test/Analysis/DeallocMissingRelease.m =================================================================== --- test/Analysis/DeallocMissingRelease.m +++ test/Analysis/DeallocMissingRelease.m @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -triple x86_64-apple-ios4.0 -DMACOS=0 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -triple x86_64-apple-macosx10.6.0 -DMACOS=1 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -triple x86_64-apple-darwin10 -fobjc-arc -fobjc-runtime-has-weak -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -triple x86_64-apple-ios4.0 -DMACOS=0 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -triple x86_64-apple-macosx10.6.0 -DMACOS=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -triple x86_64-apple-darwin10 -fobjc-arc -fobjc-runtime-has-weak -verify %s #include "Inputs/system-header-simulator-for-objc-dealloc.h" Index: test/Analysis/DeallocUseAfterFreeErrors.m =================================================================== --- test/Analysis/DeallocUseAfterFreeErrors.m +++ test/Analysis/DeallocUseAfterFreeErrors.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.SuperDealloc,debug.ExprInspection -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.SuperDealloc,debug.ExprInspection -analyzer-output=text -verify %s void clang_analyzer_warnIfReached(); Index: test/Analysis/DynamicTypePropagation.m =================================================================== --- test/Analysis/DynamicTypePropagation.m +++ test/Analysis/DynamicTypePropagation.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics -verify %s #if !__has_feature(objc_generics) # error Compiler does not support Objective-C generics? Index: test/Analysis/Malloc+MismatchedDeallocator+NewDelete.cpp =================================================================== --- test/Analysis/Malloc+MismatchedDeallocator+NewDelete.cpp +++ test/Analysis/Malloc+MismatchedDeallocator+NewDelete.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,unix.MismatchedDeallocator,cplusplus.NewDelete -std=c++11 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,unix.MismatchedDeallocator,cplusplus.NewDelete,cplusplus.NewDeleteLeaks -DLEAKS -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,unix.MismatchedDeallocator,cplusplus.NewDelete -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,unix.MismatchedDeallocator,cplusplus.NewDelete,cplusplus.NewDeleteLeaks -DLEAKS -std=c++11 -verify %s #include "Inputs/system-header-simulator-for-malloc.h" Index: test/Analysis/Malloc+MismatchedDeallocator_intersections.cpp =================================================================== --- test/Analysis/Malloc+MismatchedDeallocator_intersections.cpp +++ test/Analysis/Malloc+MismatchedDeallocator_intersections.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,unix.MismatchedDeallocator -analyzer-store region -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,unix.MismatchedDeallocator -analyzer-store region -std=c++11 -verify %s // expected-no-diagnostics typedef __typeof(sizeof(int)) size_t; Index: test/Analysis/Malloc+NewDelete_intersections.cpp =================================================================== --- test/Analysis/Malloc+NewDelete_intersections.cpp +++ test/Analysis/Malloc+NewDelete_intersections.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete -std=c++11 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,cplusplus.NewDeleteLeaks -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,cplusplus.NewDeleteLeaks -std=c++11 -verify %s typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); Index: test/Analysis/MemRegion.cpp =================================================================== --- test/Analysis/MemRegion.cpp +++ test/Analysis/MemRegion.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.mpi.MPI-Checker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=optin.mpi.MPI-Checker -verify %s #include "MPIMock.h" Index: test/Analysis/MismatchedDeallocator-checker-test.mm =================================================================== --- test/Analysis/MismatchedDeallocator-checker-test.mm +++ test/Analysis/MismatchedDeallocator-checker-test.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.MismatchedDeallocator -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.MismatchedDeallocator -fblocks -verify %s #include "Inputs/system-header-simulator-objc.h" #include "Inputs/system-header-simulator-cxx.h" Index: test/Analysis/MismatchedDeallocator-path-notes.cpp =================================================================== --- test/Analysis/MismatchedDeallocator-path-notes.cpp +++ test/Analysis/MismatchedDeallocator-path-notes.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=text -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.MismatchedDeallocator -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s void changePointee(int *p); Index: test/Analysis/MissingDealloc.m =================================================================== --- test/Analysis/MissingDealloc.m +++ test/Analysis/MissingDealloc.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -verify -triple x86_64-apple-darwin10 -fobjc-arc %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.Dealloc -fblocks -verify -triple x86_64-apple-darwin10 -fobjc-arc %s #define NON_ARC !__has_feature(objc_arc) Index: test/Analysis/NSContainers.m =================================================================== --- test/Analysis/NSContainers.m +++ test/Analysis/NSContainers.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-objc-literal-conversion -analyze -analyzer-checker=core,osx.cocoa.NonNilReturnValue,osx.cocoa.NilArg,osx.cocoa.Loops,debug.ExprInspection -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -Wno-objc-literal-conversion -analyze -analyzer-checker=core,osx.cocoa.NonNilReturnValue,osx.cocoa.NilArg,osx.cocoa.Loops,debug.ExprInspection -verify -Wno-objc-root-class %s void clang_analyzer_eval(int); Index: test/Analysis/NSPanel.m =================================================================== --- test/Analysis/NSPanel.m +++ test/Analysis/NSPanel.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s // expected-no-diagnostics // BEGIN delta-debugging reduced header stuff Index: test/Analysis/NSString.m =================================================================== --- test/Analysis/NSString.m +++ test/Analysis/NSString.m @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -analyzer-config mode=shallow -verify -Wno-objc-root-class %s -// RUN: %clang_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s -// RUN: %clang_cc1 -DOSATOMIC_USE_INLINED -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -analyzer-config mode=shallow -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -DTEST_64 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -DOSATOMIC_USE_INLINED -triple i386-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Index: test/Analysis/NSWindow.m =================================================================== --- test/Analysis/NSWindow.m +++ test/Analysis/NSWindow.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core,deadcode.DeadStores -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core,deadcode.DeadStores -analyzer-store=region -verify %s // These declarations were reduced using Delta-Debugging from Foundation.h // on Mac OS X. The test cases are below. Index: test/Analysis/NewDelete+MismatchedDeallocator_intersections.cpp =================================================================== --- test/Analysis/NewDelete+MismatchedDeallocator_intersections.cpp +++ test/Analysis/NewDelete+MismatchedDeallocator_intersections.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.MismatchedDeallocator -std=c++11 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,unix.MismatchedDeallocator -DLEAKS -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.MismatchedDeallocator -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,unix.MismatchedDeallocator -DLEAKS -std=c++11 -verify %s // expected-no-diagnostics typedef __typeof(sizeof(int)) size_t; Index: test/Analysis/NewDelete-checker-test.cpp =================================================================== --- test/Analysis/NewDelete-checker-test.cpp +++ test/Analysis/NewDelete-checker-test.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete -std=c++11 -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDeleteLeaks -DLEAKS -std=c++11 -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete -std=c++11 -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDeleteLeaks -DLEAKS -std=c++11 -fblocks -verify %s #include "Inputs/system-header-simulator-cxx.h" typedef __typeof__(sizeof(int)) size_t; Index: test/Analysis/NewDelete-custom.cpp =================================================================== --- test/Analysis/NewDelete-custom.cpp +++ test/Analysis/NewDelete-custom.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.Malloc -std=c++11 -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,unix.Malloc -std=c++11 -DLEAKS -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,unix.Malloc -std=c++11 -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,unix.Malloc -std=c++11 -DLEAKS -fblocks -verify %s #include "Inputs/system-header-simulator-cxx.h" #ifndef LEAKS Index: test/Analysis/NewDelete-intersections.mm =================================================================== --- test/Analysis/NewDelete-intersections.mm +++ test/Analysis/NewDelete-intersections.mm @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete -std=c++11 -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks -std=c++11 -DLEAKS -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete -std=c++11 -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks -std=c++11 -DLEAKS -fblocks -verify %s #include "Inputs/system-header-simulator-cxx.h" #include "Inputs/system-header-simulator-objc.h" Index: test/Analysis/NewDelete-path-notes.cpp =================================================================== --- test/Analysis/NewDelete-path-notes.cpp +++ test/Analysis/NewDelete-path-notes.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=text -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s void test() { Index: test/Analysis/NewDelete-variadic.cpp =================================================================== --- test/Analysis/NewDelete-variadic.cpp +++ test/Analysis/NewDelete-variadic.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,unix.Malloc -std=c++11 -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDelete,cplusplus.NewDeleteLeaks,unix.Malloc -std=c++11 -fblocks -verify %s // expected-no-diagnostics namespace std { Index: test/Analysis/NewDeleteLeaks-PR18394.cpp =================================================================== --- test/Analysis/NewDeleteLeaks-PR18394.cpp +++ test/Analysis/NewDeleteLeaks-PR18394.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyze -analyzer-checker=core,cplusplus.NewDeleteLeaks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyze -analyzer-checker=core,cplusplus.NewDeleteLeaks -verify %s // expected-no-diagnostics class A { Index: test/Analysis/NewDeleteLeaks-PR19102.cpp =================================================================== --- test/Analysis/NewDeleteLeaks-PR19102.cpp +++ test/Analysis/NewDeleteLeaks-PR19102.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,cplusplus.NewDeleteLeaks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,cplusplus.NewDeleteLeaks -verify %s class A0 {}; Index: test/Analysis/NoReturn.m =================================================================== --- test/Analysis/NoReturn.m +++ test/Analysis/NoReturn.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s #include Index: test/Analysis/OSAtomic_mac.cpp =================================================================== --- test/Analysis/OSAtomic_mac.cpp +++ test/Analysis/OSAtomic_mac.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,osx -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,osx -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s // expected-no-diagnostics // Test handling of OSAtomicCompareAndSwap when C++ inserts "no-op" casts and we Index: test/Analysis/ObjCProperties.m =================================================================== --- test/Analysis/ObjCProperties.m +++ test/Analysis/ObjCProperties.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s -verify // expected-no-diagnostics // The point of this test cases is to exercise properties in the static Index: test/Analysis/ObjCPropertiesSyntaxChecks.m =================================================================== --- test/Analysis/ObjCPropertiesSyntaxChecks.m +++ test/Analysis/ObjCPropertiesSyntaxChecks.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -w -fblocks -analyze -analyzer-checker=osx.ObjCProperty %s -verify +// RUN: %clang_cc1 %z3_cc1 -w -fblocks -analyze -analyzer-checker=osx.ObjCProperty %s -verify #include "Inputs/system-header-simulator-objc.h" Index: test/Analysis/ObjCRetSigs.m =================================================================== --- test/Analysis/ObjCRetSigs.m +++ test/Analysis/ObjCRetSigs.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-checker=osx.cocoa.IncompatibleMethodTypes -verify -Wno-objc-root-class %s int printf(const char *, ...); Index: test/Analysis/PR12905.c =================================================================== --- test/Analysis/PR12905.c +++ test/Analysis/PR12905.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core %s // PR12905 void C(void); Index: test/Analysis/PR24184.cpp =================================================================== --- test/Analysis/PR24184.cpp +++ test/Analysis/PR24184.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -w -analyze -analyzer-eagerly-assume -fcxx-exceptions -analyzer-checker=core -analyzer-checker=alpha.core.PointerArithm,alpha.core.CastToStruct -analyzer-max-loop 64 -verify %s -// RUN: %clang_cc1 -w -analyze -analyzer-checker=core -analyzer-checker=cplusplus -fcxx-exceptions -analyzer-checker alpha.core.PointerArithm,alpha.core.CastToStruct -analyzer-max-loop 63 -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -analyze -analyzer-eagerly-assume -fcxx-exceptions -analyzer-checker=core -analyzer-checker=alpha.core.PointerArithm,alpha.core.CastToStruct -analyzer-max-loop 64 -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -analyze -analyzer-checker=core -analyzer-checker=cplusplus -fcxx-exceptions -analyzer-checker alpha.core.PointerArithm,alpha.core.CastToStruct -analyzer-max-loop 63 -verify %s // These tests used to hit an assertion in the bug report. Test case from http://llvm.org/PR24184. typedef struct { Index: test/Analysis/PR2599.m =================================================================== --- test/Analysis/PR2599.m +++ test/Analysis/PR2599.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -fobjc-gc -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple %itanium_abi_triple -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -fobjc-gc -verify %s typedef const void * CFTypeRef; typedef const struct __CFString * CFStringRef; Index: test/Analysis/PR2978.m =================================================================== --- test/Analysis/PR2978.m +++ test/Analysis/PR2978.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.Dealloc %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.Dealloc %s -verify // Tests for the checker which checks missing/extra ivar 'release' calls // in dealloc. Index: test/Analysis/PR3991.m =================================================================== --- test/Analysis/PR3991.m +++ test/Analysis/PR3991.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -triple x86_64-apple-darwin9 -Wno-incomplete-implementation %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -triple x86_64-apple-darwin9 -Wno-incomplete-implementation %s // expected-no-diagnostics //===----------------------------------------------------------------------===// Index: test/Analysis/PR7218.c =================================================================== --- test/Analysis/PR7218.c +++ test/Analysis/PR7218.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store region -verify %s char PR7218(char a) { char buf[2]; buf[0] = a; Index: test/Analysis/PR9741.cpp =================================================================== --- test/Analysis/PR9741.cpp +++ test/Analysis/PR9741.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -Wuninitialized -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -Wuninitialized -verify %s // expected-no-diagnostics void f() { Index: test/Analysis/additive-folding-range-constraints.c =================================================================== --- test/Analysis/additive-folding-range-constraints.c +++ test/Analysis/additive-folding-range-constraints.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/additive-folding.cpp =================================================================== --- test/Analysis/additive-folding.cpp +++ test/Analysis/additive-folding.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -Wno-tautological-compare %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -Wno-tautological-compare %s void clang_analyzer_eval(bool); Index: test/Analysis/analyzeOneFunction.m =================================================================== --- test/Analysis/analyzeOneFunction.m +++ test/Analysis/analyzeOneFunction.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyze-function="-[Test1 myMethodWithY:withX:]" -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyze-function="-[Test1 myMethodWithY:withX:]" -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify %s typedef signed char BOOL; typedef unsigned int NSUInteger; Index: test/Analysis/analyzer-checker-config.c =================================================================== --- test/Analysis/analyzer-checker-config.c +++ test/Analysis/analyzer-checker-config.c @@ -1,10 +1,10 @@ -// RUN: not %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unix.mallo:Optimistic=true 2>&1 | FileCheck %s -// RUN: not %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config uni:Optimistic=true 2>&1 | FileCheck %s -// RUN: not %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config uni.:Optimistic=true 2>&1 | FileCheck %s -// RUN: not %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config ..:Optimistic=true 2>&1 | FileCheck %s -// RUN: not %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unix.:Optimistic=true 2>&1 | FileCheck %s -// RUN: not %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unrelated:Optimistic=true 2>&1 | FileCheck %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unix.Malloc:Optimistic=true +// RUN: not %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unix.mallo:Optimistic=true 2>&1 | FileCheck %s +// RUN: not %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config uni:Optimistic=true 2>&1 | FileCheck %s +// RUN: not %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config uni.:Optimistic=true 2>&1 | FileCheck %s +// RUN: not %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config ..:Optimistic=true 2>&1 | FileCheck %s +// RUN: not %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unix.:Optimistic=true 2>&1 | FileCheck %s +// RUN: not %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unrelated:Optimistic=true 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-config unix.Malloc:Optimistic=true // Just to test clang is working. # foo Index: test/Analysis/analyzer-config.c =================================================================== --- test/Analysis/analyzer-config.c +++ test/Analysis/analyzer-config.c @@ -1,4 +1,4 @@ -// RUN: %clang -target x86_64-apple-darwin10 --analyze %s -o /dev/null -Xclang -analyzer-checker=debug.ConfigDumper -Xclang -analyzer-max-loop -Xclang 34 > %t 2>&1 +// RUN: %clang %z3 -target x86_64-apple-darwin10 --analyze %s -o /dev/null -Xclang -analyzer-checker=debug.ConfigDumper -Xclang -analyzer-max-loop -Xclang 34 > %t 2>&1 // RUN: FileCheck --input-file=%t %s void bar() {} Index: test/Analysis/analyzer-config.cpp =================================================================== --- test/Analysis/analyzer-config.cpp +++ test/Analysis/analyzer-config.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -target x86_64-apple-darwin10 --analyze %s -o /dev/null -Xclang -analyzer-checker=debug.ConfigDumper -Xclang -analyzer-max-loop -Xclang 34 > %t 2>&1 +// RUN: %clang %z3 -target x86_64-apple-darwin10 --analyze %s -o /dev/null -Xclang -analyzer-checker=debug.ConfigDumper -Xclang -analyzer-max-loop -Xclang 34 > %t 2>&1 // RUN: FileCheck --input-file=%t %s void bar() {} Index: test/Analysis/analyzer-display-progress.cpp =================================================================== --- test/Analysis/analyzer-display-progress.cpp +++ test/Analysis/analyzer-display-progress.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-display-progress %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-display-progress %s 2>&1 | FileCheck %s void f() {}; void g() {}; Index: test/Analysis/analyzer-display-progress.m =================================================================== --- test/Analysis/analyzer-display-progress.m +++ test/Analysis/analyzer-display-progress.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-display-progress %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-display-progress %s 2>&1 | FileCheck %s #include "Inputs/system-header-simulator-objc.h" Index: test/Analysis/analyzer-enabled-checkers.c =================================================================== --- test/Analysis/analyzer-enabled-checkers.c +++ test/Analysis/analyzer-enabled-checkers.c @@ -1,4 +1,4 @@ -// RUN: %clang -target x86_64-apple-darwin10 --analyze %s -o /dev/null -Xclang -analyzer-checker=core -Xclang -analyzer-list-enabled-checkers > %t 2>&1 +// RUN: %clang %z3 -target x86_64-apple-darwin10 --analyze %s -o /dev/null -Xclang -analyzer-checker=core -Xclang -analyzer-list-enabled-checkers > %t 2>&1 // RUN: FileCheck --input-file=%t %s // CHECK: OVERVIEW: Clang Static Analyzer Enabled Checkers List Index: test/Analysis/analyzer-stats.c =================================================================== --- test/Analysis/analyzer-stats.c +++ test/Analysis/analyzer-stats.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,debug.Stats -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,debug.Stats -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s int foo(); Index: test/Analysis/array-struct-region.c =================================================================== --- test/Analysis/array-struct-region.c +++ test/Analysis/array-struct-region.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/array-struct-region.cpp =================================================================== --- test/Analysis/array-struct-region.cpp +++ test/Analysis/array-struct-region.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify -x c %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify -x c++ -analyzer-config c++-inlining=constructors %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -DINLINE -verify -x c %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -DINLINE -verify -x c++ -analyzer-config c++-inlining=constructors %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify -x c %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify -x c++ -analyzer-config c++-inlining=constructors %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -DINLINE -verify -x c %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -DINLINE -verify -x c++ -analyzer-config c++-inlining=constructors %s void clang_analyzer_eval(int); Index: test/Analysis/array-struct.c =================================================================== --- test/Analysis/array-struct.c +++ test/Analysis/array-struct.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core.CastToStruct -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core.CastToStruct -analyzer-store=region -verify %s struct s { int data; Index: test/Analysis/atomics.c =================================================================== --- test/Analysis/atomics.c +++ test/Analysis/atomics.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s // Tests for c11 atomics. Many of these tests currently yield unknown // because we don't fully model the atomics and instead imprecisely Index: test/Analysis/auto-obj-dtors-cfg-output.cpp =================================================================== --- test/Analysis/auto-obj-dtors-cfg-output.cpp +++ test/Analysis/auto-obj-dtors-cfg-output.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG %s > %t 2>&1 +// RUN: %clang_cc1 %z3_cc1 -fcxx-exceptions -fexceptions -analyze -analyzer-checker=debug.DumpCFG %s > %t 2>&1 // RUN: FileCheck --input-file=%t %s class A { Index: test/Analysis/base-init.cpp =================================================================== --- test/Analysis/base-init.cpp +++ test/Analysis/base-init.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/bitwise-ops.c =================================================================== --- test/Analysis/bitwise-ops.c +++ test/Analysis/bitwise-ops.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -triple x86_64-apple-darwin13 -Wno-shift-count-overflow -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -triple x86_64-apple-darwin13 -Wno-shift-count-overflow -verify %s void clang_analyzer_eval(int); #define CHECK(expr) if (!(expr)) return; clang_analyzer_eval(expr) @@ -7,10 +7,9 @@ // Sanity check CHECK(x); // expected-warning{{TRUE}} CHECK(x & 1); // expected-warning{{TRUE}} - - // False positives due to SValBuilder giving up on certain kinds of exprs. - CHECK(1 - x); // expected-warning{{UNKNOWN}} - CHECK(x & y); // expected-warning{{UNKNOWN}} + + CHECK(1 - x); // expected-warning{{TRUE}} + CHECK(x & y); // expected-warning{{TRUE}} } int testConstantShifts_PR18073(int which) { @@ -29,4 +28,4 @@ default: return 0; } -} \ No newline at end of file +} Index: test/Analysis/block-in-critical-section.cpp =================================================================== --- test/Analysis/block-in-critical-section.cpp +++ test/Analysis/block-in-critical-section.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.unix.BlockInCriticalSection -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.unix.BlockInCriticalSection -std=c++11 -verify %s void sleep(int x) {} Index: test/Analysis/blocks-no-inline.c =================================================================== --- test/Analysis/blocks-no-inline.c +++ test/Analysis/blocks-no-inline.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=none -fblocks -verify %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=none -fblocks -verify -x c++ %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=none -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=none -fblocks -verify -x c++ %s void clang_analyzer_eval(int); Index: test/Analysis/blocks.m =================================================================== --- test/Analysis/blocks.m +++ test/Analysis/blocks.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -analyzer-opt-analyze-nested-blocks -verify %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -analyzer-opt-analyze-nested-blocks -verify -x objective-c++ %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -analyzer-opt-analyze-nested-blocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -analyzer-opt-analyze-nested-blocks -verify -x objective-c++ %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Mac OS X headers: Index: test/Analysis/blocks.mm =================================================================== --- test/Analysis/blocks.mm +++ test/Analysis/blocks.mm @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -fblocks -analyzer-opt-analyze-nested-blocks -verify -x objective-c++ %s -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core,debug.DumpCFG -fblocks -analyzer-opt-analyze-nested-blocks %s > %t 2>&1 +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -fblocks -analyzer-opt-analyze-nested-blocks -verify -x objective-c++ %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core,debug.DumpCFG -fblocks -analyzer-opt-analyze-nested-blocks %s > %t 2>&1 // RUN: FileCheck --input-file=%t %s // expected-no-diagnostics Index: test/Analysis/bool-assignment.c =================================================================== --- test/Analysis/bool-assignment.c +++ test/Analysis/bool-assignment.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core.BoolAssignment -analyzer-store=region -verify -std=c99 -Dbool=_Bool %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core.BoolAssignment -analyzer-store=region -verify -x c++ %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core.BoolAssignment -analyzer-store=region -verify -std=c99 -Dbool=_Bool %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core.BoolAssignment -analyzer-store=region -verify -x c++ %s // Test C++'s bool and C's _Bool. // FIXME: We stopped warning on these when SValBuilder got smarter about Index: test/Analysis/bstring.c =================================================================== --- test/Analysis/bstring.c +++ test/Analysis/bstring.c @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s -// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s -// RUN: %clang_cc1 -analyze -DVARIANT -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s -// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -DVARIANT -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s //===----------------------------------------------------------------------=== // Declarations Index: test/Analysis/bstring.cpp =================================================================== --- test/Analysis/bstring.cpp +++ test/Analysis/bstring.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s #include "Inputs/system-header-simulator-cxx.h" #include "Inputs/system-header-simulator-for-malloc.h" Index: test/Analysis/bug_hash_test.cpp =================================================================== --- test/Analysis/bug_hash_test.cpp +++ test/Analysis/bug_hash_test.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=core,debug.DumpBugHash -analyzer-output=plist %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -analyze -analyzer-checker=core,debug.DumpBugHash -analyzer-output=plist %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s int function(int p) { Index: test/Analysis/bug_hash_test.m =================================================================== --- test/Analysis/bug_hash_test.m +++ test/Analysis/bug_hash_test.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,debug.DumpBugHash -analyzer-output=plist %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-checker=core,debug.DumpBugHash -analyzer-output=plist %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s @protocol NSObject Index: test/Analysis/builtin-functions.cpp =================================================================== --- test/Analysis/builtin-functions.cpp +++ test/Analysis/builtin-functions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection %s -std=c++11 -verify +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection %s -std=c++11 -verify void clang_analyzer_eval(bool); Index: test/Analysis/builtin_signbit.cpp =================================================================== --- test/Analysis/builtin_signbit.cpp +++ test/Analysis/builtin_signbit.cpp @@ -1,6 +1,6 @@ -// RUN: %clang -target powerpc-linux-gnu -emit-llvm -S -O0 %s -o - | FileCheck %s --check-prefix=CHECK-BE --check-prefix=CHECK -// RUN: %clang -target powerpc64-linux-gnu -emit-llvm -S -O0 %s -o - | FileCheck %s --check-prefix=CHECK-BE --check-prefix=CHECK -// RUN: %clang -target powerpc64le-linux-gnu -emit-llvm -S -O0 %s -o - | FileCheck %s --check-prefix=CHECK-LE --check-prefix=CHECK +// RUN: %clang %z3 -target powerpc-linux-gnu -emit-llvm -S -O0 %s -o - | FileCheck %s --check-prefix=CHECK-BE --check-prefix=CHECK +// RUN: %clang %z3 -target powerpc64-linux-gnu -emit-llvm -S -O0 %s -o - | FileCheck %s --check-prefix=CHECK-BE --check-prefix=CHECK +// RUN: %clang %z3 -target powerpc64le-linux-gnu -emit-llvm -S -O0 %s -o - | FileCheck %s --check-prefix=CHECK-LE --check-prefix=CHECK bool b; double d = -1.0; Index: test/Analysis/call-invalidation.cpp =================================================================== --- test/Analysis/call-invalidation.cpp +++ test/Analysis/call-invalidation.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/cast-to-struct.cpp =================================================================== --- test/Analysis/cast-to-struct.cpp +++ test/Analysis/cast-to-struct.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.CastToStruct,core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.core.CastToStruct,core -verify %s struct AB { int A; Index: test/Analysis/castexpr-callback.c =================================================================== --- test/Analysis/castexpr-callback.c +++ test/Analysis/castexpr-callback.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.AnalysisOrder -analyzer-config debug.AnalysisOrder:PreStmtCastExpr=true,debug.AnalysisOrder:PostStmtCastExpr=true %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.AnalysisOrder -analyzer-config debug.AnalysisOrder:PreStmtCastExpr=true,debug.AnalysisOrder:PostStmtCastExpr=true %s 2>&1 | FileCheck %s void test(char c) { int i = (int)c; Index: test/Analysis/casts.c =================================================================== --- test/Analysis/casts.c +++ test/Analysis/casts.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s extern void clang_analyzer_eval(_Bool); Index: test/Analysis/casts.cpp =================================================================== --- test/Analysis/casts.cpp +++ test/Analysis/casts.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s bool PR14634(int x) { double y = (double)x; Index: test/Analysis/casts.m =================================================================== --- test/Analysis/casts.m +++ test/Analysis/casts.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics // Test function pointer casts. Index: test/Analysis/cfg.cpp =================================================================== --- test/Analysis/cfg.cpp +++ test/Analysis/cfg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -analyzer-config cfg-temporary-dtors=true -std=c++11 %s > %t 2>&1 +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -analyzer-config cfg-temporary-dtors=true -std=c++11 %s > %t 2>&1 // RUN: FileCheck --input-file=%t %s // CHECK-LABEL: void checkWrap(int i) Index: test/Analysis/cfref_PR2519.c =================================================================== --- test/Analysis/cfref_PR2519.c +++ test/Analysis/cfref_PR2519.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics typedef unsigned char Boolean; Index: test/Analysis/cfref_rdar6080742.c =================================================================== --- test/Analysis/cfref_rdar6080742.c +++ test/Analysis/cfref_rdar6080742.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics // This test case was reported in . Index: test/Analysis/check-deserialization.cpp =================================================================== --- test/Analysis/check-deserialization.cpp +++ test/Analysis/check-deserialization.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -emit-pch -o %t %s -// RUN: %clang_cc1 -error-on-deserialized-decl S1_method -include-pch %t -analyze -analyzer-checker=core %s -// RUN: %clang_cc1 -include-pch %t -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -emit-pch -o %t %s +// RUN: %clang_cc1 %z3_cc1 -error-on-deserialized-decl S1_method -include-pch %t -analyze -analyzer-checker=core %s +// RUN: %clang_cc1 %z3_cc1 -include-pch %t -analyze -analyzer-checker=core -verify %s #ifndef HEADER #define HEADER Index: test/Analysis/checker-plugins.c =================================================================== --- test/Analysis/checker-plugins.c +++ test/Analysis/checker-plugins.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -load %llvmshlibdir/SampleAnalyzerPlugin%pluginext -analyze -analyzer-checker='example.MainCallChecker' -verify %s +// RUN: %clang_cc1 %z3_cc1 -load %llvmshlibdir/SampleAnalyzerPlugin%pluginext -analyze -analyzer-checker='example.MainCallChecker' -verify %s // REQUIRES: plugins, examples // Test that the MainCallChecker example analyzer plugin loads and runs. Index: test/Analysis/chroot.c =================================================================== --- test/Analysis/chroot.c +++ test/Analysis/chroot.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.unix.Chroot -analyzer-store region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.unix.Chroot -analyzer-store region -verify %s extern int chroot(const char* path); extern int chdir(const char* path); Index: test/Analysis/comparison-implicit-casts.cpp =================================================================== --- test/Analysis/comparison-implicit-casts.cpp +++ test/Analysis/comparison-implicit-casts.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.cstring,debug.ExprInspection -triple i386-apple-darwin9 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.cstring,debug.ExprInspection -triple x86_64-apple-darwin9 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.cstring,debug.ExprInspection -triple i386-apple-darwin9 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.cstring,debug.ExprInspection -triple x86_64-apple-darwin9 -verify %s // This file runs in C++ mode so that the comparison type is 'bool', not 'int'. void clang_analyzer_eval(int); Index: test/Analysis/complex-init-list.cpp =================================================================== --- test/Analysis/complex-init-list.cpp +++ test/Analysis/complex-init-list.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s // expected-no-diagnostics // Do not crash on initialization to complex numbers. Index: test/Analysis/complex.c =================================================================== --- test/Analysis/complex.c +++ test/Analysis/complex.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify -Wno-unreachable-code -ffreestanding %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify -Wno-unreachable-code -ffreestanding %s #include Index: test/Analysis/concrete-address.c =================================================================== --- test/Analysis/concrete-address.c +++ test/Analysis/concrete-address.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics void foo() { Index: test/Analysis/conditional-operator.cpp =================================================================== --- test/Analysis/conditional-operator.cpp +++ test/Analysis/conditional-operator.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection %s -analyzer-output=text -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection %s -analyzer-output=text -verify void clang_analyzer_eval(bool); Index: test/Analysis/conditional-path-notes.c =================================================================== --- test/Analysis/conditional-path-notes.c +++ test/Analysis/conditional-path-notes.c @@ -1,5 +1,5 @@ -// RUN: %clang --analyze %s -Xanalyzer -analyzer-output=text -Xclang -verify -// RUN: %clang --analyze %s -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t +// RUN: %clang %z3 --analyze %s -Xanalyzer -analyzer-output=text -Xclang -verify +// RUN: %clang %z3 --analyze %s -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t // RUN: FileCheck --input-file=%t %s void testCondOp(int *p) { @@ -77,7 +77,8 @@ void testNonDiagnosableBranchArithmetic(int a, int b) { if (a - b) { - // expected-note@-1 {{Taking true branch}} + // expected-note@-1 {{Assuming the condition is true}} + // expected-note@-2 {{Taking true branch}} *(volatile int *)0 = 1; // expected-warning{{Dereference of null pointer}} // expected-note@-1 {{Dereference of null pointer}} } @@ -1573,12 +1574,75 @@ // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line79 +// CHECK-NEXT: col7 +// CHECK-NEXT: file0 +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: line79 +// CHECK-NEXT: col7 +// CHECK-NEXT: file0 +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: kindevent +// CHECK-NEXT: location +// CHECK-NEXT: +// CHECK-NEXT: line79 +// CHECK-NEXT: col7 +// CHECK-NEXT: file0 +// CHECK-NEXT: +// CHECK-NEXT: ranges +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: line79 +// CHECK-NEXT: col7 +// CHECK-NEXT: file0 +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: line79 +// CHECK-NEXT: col11 +// CHECK-NEXT: file0 +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: depth0 +// CHECK-NEXT: extended_message +// CHECK-NEXT: Assuming the condition is true +// CHECK-NEXT: message +// CHECK-NEXT: Assuming the condition is true +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: kindcontrol +// CHECK-NEXT: edges +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: start +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: line79 +// CHECK-NEXT: col7 +// CHECK-NEXT: file0 +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: line79 +// CHECK-NEXT: col7 +// CHECK-NEXT: file0 +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: end +// CHECK-NEXT: +// CHECK-NEXT: +// CHECK-NEXT: line82 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: @@ -1594,12 +1658,12 @@ // CHECK-NEXT: start // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: @@ -1607,12 +1671,12 @@ // CHECK-NEXT: end // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: @@ -1624,7 +1688,7 @@ // CHECK-NEXT: kindevent // CHECK-NEXT: location // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: @@ -1632,12 +1696,12 @@ // CHECK-NEXT: // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col5 // CHECK-NEXT: file0 // CHECK-NEXT: // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col26 // CHECK-NEXT: file0 // CHECK-NEXT: @@ -1658,10 +1722,10 @@ // CHECK-NEXT: issue_hash_content_of_line_in_contextf56671e5f67c73abef619b56f7c29fa4 // CHECK-NEXT: issue_context_kindfunction // CHECK-NEXT: issue_contexttestNonDiagnosableBranchArithmetic -// CHECK-NEXT: issue_hash_function_offset3 +// CHECK-NEXT: issue_hash_function_offset4 // CHECK-NEXT: location // CHECK-NEXT: -// CHECK-NEXT: line81 +// CHECK-NEXT: line82 // CHECK-NEXT: col24 // CHECK-NEXT: file0 // CHECK-NEXT: Index: test/Analysis/const-method-call.cpp =================================================================== --- test/Analysis/const-method-call.cpp +++ test/Analysis/const-method-call.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/constant-folding.c =================================================================== --- test/Analysis/constant-folding.c +++ test/Analysis/constant-folding.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/conversion.c =================================================================== --- test/Analysis/conversion.c +++ test/Analysis/conversion.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-conversion -analyze -analyzer-checker=core,alpha.core.Conversion -verify %s +// RUN: %clang_cc1 %z3_cc1 -Wno-conversion -analyze -analyzer-checker=core,alpha.core.Conversion -verify %s unsigned char U8; signed char S8; Index: test/Analysis/copypaste/asm.cpp =================================================================== --- test/Analysis/copypaste/asm.cpp +++ test/Analysis/copypaste/asm.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/attributes.cpp =================================================================== --- test/Analysis/copypaste/attributes.cpp +++ test/Analysis/copypaste/attributes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/blocks.cpp =================================================================== --- test/Analysis/copypaste/blocks.cpp +++ test/Analysis/copypaste/blocks.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -fblocks -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fblocks -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // This tests if we search for clones in blocks. Index: test/Analysis/copypaste/call.cpp =================================================================== --- test/Analysis/copypaste/call.cpp +++ test/Analysis/copypaste/call.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/catch.cpp =================================================================== --- test/Analysis/copypaste/catch.cpp +++ test/Analysis/copypaste/catch.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/delete.cpp =================================================================== --- test/Analysis/copypaste/delete.cpp +++ test/Analysis/copypaste/delete.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/dependent-exist.cpp =================================================================== --- test/Analysis/copypaste/dependent-exist.cpp +++ test/Analysis/copypaste/dependent-exist.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -fms-extensions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fms-extensions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/expr-types.cpp =================================================================== --- test/Analysis/copypaste/expr-types.cpp +++ test/Analysis/copypaste/expr-types.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/fold.cpp =================================================================== --- test/Analysis/copypaste/fold.cpp +++ test/Analysis/copypaste/fold.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/function-try-block.cpp =================================================================== --- test/Analysis/copypaste/function-try-block.cpp +++ test/Analysis/copypaste/function-try-block.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fcxx-exceptions -std=c++1z -analyzer-checker=alpha.clone.CloneChecker -verify %s // Tests if function try blocks are correctly handled. Index: test/Analysis/copypaste/functions.cpp =================================================================== --- test/Analysis/copypaste/functions.cpp +++ test/Analysis/copypaste/functions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // This tests if we search for clones in functions. Index: test/Analysis/copypaste/generic.c =================================================================== --- test/Analysis/copypaste/generic.c +++ test/Analysis/copypaste/generic.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/labels.cpp =================================================================== --- test/Analysis/copypaste/labels.cpp +++ test/Analysis/copypaste/labels.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=gnu++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=gnu++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/lambda.cpp =================================================================== --- test/Analysis/copypaste/lambda.cpp +++ test/Analysis/copypaste/lambda.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // expected-no-diagnostics Index: test/Analysis/copypaste/macro-complexity.cpp =================================================================== --- test/Analysis/copypaste/macro-complexity.cpp +++ test/Analysis/copypaste/macro-complexity.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s // Tests that the complexity value of a macro expansion is about the same as // the complexity value of a normal function call and the the macro body doesn't Index: test/Analysis/copypaste/macros.cpp =================================================================== --- test/Analysis/copypaste/macros.cpp +++ test/Analysis/copypaste/macros.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // Tests that macros and non-macro clones aren't mixed into the same hash // group. This is currently necessary as all clones in a hash group need Index: test/Analysis/copypaste/objc-methods.m =================================================================== --- test/Analysis/copypaste/objc-methods.m +++ test/Analysis/copypaste/objc-methods.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -Wno-objc-root-class -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -Wno-objc-root-class -analyzer-checker=alpha.clone.CloneChecker -verify %s // This tests if we search for clones in Objective-C methods. Index: test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp =================================================================== --- test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp +++ test/Analysis/copypaste/plist-diagnostics-notes-as-events.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-output=plist -analyzer-config notes-as-events=true -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-output=plist -analyzer-config notes-as-events=true -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // RUN: FileCheck --input-file=%t.plist %s void log(); Index: test/Analysis/copypaste/plist-diagnostics.cpp =================================================================== --- test/Analysis/copypaste/plist-diagnostics.cpp +++ test/Analysis/copypaste/plist-diagnostics.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-output=plist -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-output=plist -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // RUN: FileCheck --input-file=%t.plist %s void log(); Index: test/Analysis/copypaste/sub-sequences.cpp =================================================================== --- test/Analysis/copypaste/sub-sequences.cpp +++ test/Analysis/copypaste/sub-sequences.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s // This tests if sub-sequences can match with normal sequences. Index: test/Analysis/copypaste/suspicious-clones.cpp =================================================================== --- test/Analysis/copypaste/suspicious-clones.cpp +++ test/Analysis/copypaste/suspicious-clones.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:ReportSuspiciousClones=true -analyzer-config alpha.clone.CloneChecker:ReportNormalClones=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:ReportSuspiciousClones=true -analyzer-config alpha.clone.CloneChecker:ReportNormalClones=false -verify %s // Tests finding a suspicious clone that references local variables. Index: test/Analysis/copypaste/text-diagnostics.cpp =================================================================== --- test/Analysis/copypaste/text-diagnostics.cpp +++ test/Analysis/copypaste/text-diagnostics.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-output=text -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-output=text -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -verify %s void log(); Index: test/Analysis/coverage.c =================================================================== --- test/Analysis/coverage.c +++ test/Analysis/coverage.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -analyzer-max-loop 4 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -analyzer-max-loop 4 -verify %s #include "Inputs/system-header-simulator.h" typedef __typeof(sizeof(int)) size_t; Index: test/Analysis/crash-trace.c =================================================================== --- test/Analysis/crash-trace.c +++ test/Analysis/crash-trace.c @@ -1,4 +1,4 @@ -// RUN: not --crash %clang_cc1 -analyze -analyzer-checker=debug.ExprInspection %s 2>&1 | FileCheck %s +// RUN: not --crash %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.ExprInspection %s 2>&1 | FileCheck %s // REQUIRES: crash-recovery // FIXME: CHECKs might be incompatible to win32. Index: test/Analysis/cstring-syntax-cxx.cpp =================================================================== --- test/Analysis/cstring-syntax-cxx.cpp +++ test/Analysis/cstring-syntax-cxx.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -verify %s // expected-no-diagnostics // Ensure we don't crash on C++ declarations with special names. Index: test/Analysis/cstring-syntax.c =================================================================== --- test/Analysis/cstring-syntax.c +++ test/Analysis/cstring-syntax.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -Wno-strncat-size -Wno-strlcpy-strlcat-size -Wno-sizeof-array-argument -Wno-sizeof-pointer-memaccess -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.cstring.BadSizeArg -analyzer-store=region -Wno-strncat-size -Wno-strlcpy-strlcat-size -Wno-sizeof-array-argument -Wno-sizeof-pointer-memaccess -verify %s typedef __SIZE_TYPE__ size_t; char *strncat(char *, const char *, size_t); Index: test/Analysis/ctor.mm =================================================================== --- test/Analysis/ctor.mm +++ test/Analysis/ctor.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fobjc-arc -analyzer-config c++-inlining=constructors -Wno-null-dereference -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fobjc-arc -analyzer-config c++-inlining=constructors -Wno-null-dereference -std=c++11 -verify %s #include "Inputs/system-header-simulator-cxx.h" Index: test/Analysis/cxx-crashes.cpp =================================================================== --- test/Analysis/cxx-crashes.cpp +++ test/Analysis/cxx-crashes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s // REQUIRES: LP64 void clang_analyzer_eval(bool); Index: test/Analysis/cxx-for-range-cfg.cpp =================================================================== --- test/Analysis/cxx-for-range-cfg.cpp +++ test/Analysis/cxx-for-range-cfg.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wall -fsyntax-only %s -std=c++11 -verify +// RUN: %clang_cc1 %z3_cc1 -Wall -fsyntax-only %s -std=c++11 -verify // The rdar11671507_vector[]> would previously crash CFG construction // because of the temporary array of vectors. Index: test/Analysis/cxx-for-range.cpp =================================================================== --- test/Analysis/cxx-for-range.cpp +++ test/Analysis/cxx-for-range.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=core -analyzer-config path-diagnostics-alternate=true -analyzer-output=plist-multi-file -o %t.plist -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=core -analyzer-config path-diagnostics-alternate=true -analyzer-output=plist-multi-file -o %t.plist -verify %s // RUN: FileCheck --input-file=%t.plist %s extern void work(); Index: test/Analysis/cxx-method-names.cpp =================================================================== --- test/Analysis/cxx-method-names.cpp +++ test/Analysis/cxx-method-names.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix,osx,alpha.unix,alpha.security.taint -analyzer-store region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix,osx,alpha.unix,alpha.security.taint -analyzer-store region -verify %s // expected-no-diagnostics class Evil { Index: test/Analysis/cxx11-crashes.cpp =================================================================== --- test/Analysis/cxx11-crashes.cpp +++ test/Analysis/cxx11-crashes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -std=c++11 -verify %s // radar://11485149, PR12871 class PlotPoint { Index: test/Analysis/dead-stores.c =================================================================== --- test/Analysis/dead-stores.c +++ test/Analysis/dead-stores.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s -// RUN: %clang_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores -analyzer-store=region -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 %z3_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 %z3_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores -analyzer-store=region -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s void f1() { int k, y; // expected-warning{{unused variable 'k'}} expected-warning{{unused variable 'y'}} Index: test/Analysis/dead-stores.cpp =================================================================== --- test/Analysis/dead-stores.cpp +++ test/Analysis/dead-stores.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fblocks -std=c++11 -analyze -analyzer-checker=deadcode.DeadStores -verify -Wno-unreachable-code %s -// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fblocks -std=c++11 -analyze -analyzer-store=region -analyzer-checker=deadcode.DeadStores -verify -Wno-unreachable-code %s +// RUN: %clang_cc1 %z3_cc1 -fcxx-exceptions -fexceptions -fblocks -std=c++11 -analyze -analyzer-checker=deadcode.DeadStores -verify -Wno-unreachable-code %s +// RUN: %clang_cc1 %z3_cc1 -fcxx-exceptions -fexceptions -fblocks -std=c++11 -analyze -analyzer-store=region -analyzer-checker=deadcode.DeadStores -verify -Wno-unreachable-code %s //===----------------------------------------------------------------------===// // Basic dead store checking (but in C++ mode). Index: test/Analysis/dead-stores.m =================================================================== --- test/Analysis/dead-stores.m +++ test/Analysis/dead-stores.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-checker=deadcode.DeadStores,osx.cocoa.RetainCount -fblocks -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-checker=deadcode.DeadStores,osx.cocoa.RetainCount -fblocks -verify -Wno-objc-root-class %s // expected-no-diagnostics typedef signed char BOOL; Index: test/Analysis/debug-CallGraph.c =================================================================== --- test/Analysis/debug-CallGraph.c +++ test/Analysis/debug-CallGraph.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCallGraph %s -fblocks 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpCallGraph %s -fblocks 2>&1 | FileCheck %s static void mmm(int y) { if (y != 0) Index: test/Analysis/default-analyze.m =================================================================== --- test/Analysis/default-analyze.m +++ test/Analysis/default-analyze.m @@ -1,4 +1,4 @@ -// RUN: %clang --analyze %s -o %t +// RUN: %clang %z3 --analyze %s -o %t // Tests that some specific checkers are enabled by default. Index: test/Analysis/default-diagnostic-visitors.c =================================================================== --- test/Analysis/default-diagnostic-visitors.c +++ test/Analysis/default-diagnostic-visitors.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-output=text -verify %s // This file is for testing enhanced diagnostics produced by the default BugReporterVisitors. Index: test/Analysis/delayed-template-parsing-crash.cpp =================================================================== --- test/Analysis/delayed-template-parsing-crash.cpp +++ test/Analysis/delayed-template-parsing-crash.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -std=c++11 -fdelayed-template-parsing -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -std=c++11 -fdelayed-template-parsing -verify %s // expected-no-diagnostics template struct remove_reference {typedef T type;}; Index: test/Analysis/delegates.m =================================================================== --- test/Analysis/delegates.m +++ test/Analysis/delegates.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -Wno-objc-root-class -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -Wno-objc-root-class -verify %s // expected-no-diagnostics Index: test/Analysis/derived-to-base.cpp =================================================================== --- test/Analysis/derived-to-base.cpp +++ test/Analysis/derived-to-base.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -DCONSTRUCTORS=1 -analyzer-config c++-inlining=constructors -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -DCONSTRUCTORS=1 -analyzer-config c++-inlining=constructors -verify %s void clang_analyzer_eval(bool); void clang_analyzer_checkInlined(bool); Index: test/Analysis/designated-initializer.c =================================================================== --- test/Analysis/designated-initializer.c +++ test/Analysis/designated-initializer.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 \ +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 \ // RUN: | FileCheck %s struct Q { int a, b, c; }; Index: test/Analysis/diagnostics/deref-track-symbolic-region.c =================================================================== --- test/Analysis/diagnostics/deref-track-symbolic-region.c +++ test/Analysis/diagnostics/deref-track-symbolic-region.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s struct S { Index: test/Analysis/diagnostics/deref-track-symbolic-region.cpp =================================================================== --- test/Analysis/diagnostics/deref-track-symbolic-region.cpp +++ test/Analysis/diagnostics/deref-track-symbolic-region.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s struct S { int *x; Index: test/Analysis/diagnostics/diag-cross-file-boundaries.c =================================================================== --- test/Analysis/diagnostics/diag-cross-file-boundaries.c +++ test/Analysis/diagnostics/diag-cross-file-boundaries.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=html -o PR12421.html %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=html -o PR12421.html %s 2>&1 | FileCheck %s // Test for PR12421 #include "diag-cross-file-boundaries.h" Index: test/Analysis/diagnostics/explicit-suppression.cpp =================================================================== --- test/Analysis/diagnostics/explicit-suppression.cpp +++ test/Analysis/diagnostics/explicit-suppression.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config suppress-c++-stdlib=false -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config suppress-c++-stdlib=true -DSUPPRESSED=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config suppress-c++-stdlib=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config suppress-c++-stdlib=true -DSUPPRESSED=1 -verify %s #ifdef SUPPRESSED // expected-no-diagnostics Index: test/Analysis/diagnostics/false-positive-suppression.c =================================================================== --- test/Analysis/diagnostics/false-positive-suppression.c +++ test/Analysis/diagnostics/false-positive-suppression.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -I %S/Inputs -analyze -analyzer-checker=core,unix -verify %s +// RUN: %clang_cc1 %z3_cc1 -I %S/Inputs -analyze -analyzer-checker=core,unix -verify %s // expected-no-diagnostics #include "include/sys/queue.h" Index: test/Analysis/diagnostics/implicit-cxx-std-suppression.cpp =================================================================== --- test/Analysis/diagnostics/implicit-cxx-std-suppression.cpp +++ test/Analysis/diagnostics/implicit-cxx-std-suppression.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=false -std=c++11 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=true -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=false -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=true -std=c++11 -verify %s // expected-no-diagnostics Index: test/Analysis/diagnostics/macros.cpp =================================================================== --- test/Analysis/diagnostics/macros.cpp +++ test/Analysis/diagnostics/macros.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=core,osx -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=core,osx -analyzer-output=text -verify %s #include "../Inputs/system-header-simulator.h" #include "../Inputs/system-header-simulator-cxx.h" Index: test/Analysis/diagnostics/macros.m =================================================================== --- test/Analysis/diagnostics/macros.m +++ test/Analysis/diagnostics/macros.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx -fblocks -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx -fblocks -analyzer-output=text -verify %s #include "../Inputs/system-header-simulator-objc.h" Index: test/Analysis/diagnostics/no-prune-paths.c =================================================================== --- test/Analysis/diagnostics/no-prune-paths.c +++ test/Analysis/diagnostics/no-prune-paths.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config prune-paths=false -DNPRUNE=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config prune-paths=false -DNPRUNE=1 -verify %s // "prune-paths" is a debug option only; this is just a simple test to see that // it's being honored. Index: test/Analysis/diagnostics/plist-diagnostics-include-check.cpp =================================================================== --- test/Analysis/diagnostics/plist-diagnostics-include-check.cpp +++ test/Analysis/diagnostics/plist-diagnostics-include-check.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.ExprInspection -analyzer-output=plist-multi-file %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.ExprInspection -analyzer-output=plist-multi-file %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s #include "Inputs/include/plist-diagnostics-include-check-macro.h" Index: test/Analysis/diagnostics/report-issues-within-main-file.cpp =================================================================== --- test/Analysis/diagnostics/report-issues-within-main-file.cpp +++ test/Analysis/diagnostics/report-issues-within-main-file.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -analyzer-output=plist-multi-file -analyzer-config report-in-main-source-file=true -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix -analyzer-output=plist-multi-file -analyzer-config report-in-main-source-file=true -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s #include "Inputs/include/report-issues-within-main-file.h" Index: test/Analysis/diagnostics/shortest-path-suppression.c =================================================================== --- test/Analysis/diagnostics/shortest-path-suppression.c +++ test/Analysis/diagnostics/shortest-path-suppression.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-null-return-paths=true -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-null-return-paths=true -analyzer-output=text -verify %s // expected-no-diagnostics int *returnNull() { return 0; } Index: test/Analysis/diagnostics/text-diagnostics.c =================================================================== --- test/Analysis/diagnostics/text-diagnostics.c +++ test/Analysis/diagnostics/text-diagnostics.c @@ -1,4 +1,4 @@ -// RUN: %clang --analyze -Xanalyzer -analyzer-output=text -fno-caret-diagnostics %s 2>&1 | FileCheck %s +// RUN: %clang %z3 --analyze -Xanalyzer -analyzer-output=text -fno-caret-diagnostics %s 2>&1 | FileCheck %s void testA() { int *p = 0; Index: test/Analysis/diagnostics/undef-value-caller.c =================================================================== --- test/Analysis/diagnostics/undef-value-caller.c +++ test/Analysis/diagnostics/undef-value-caller.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s // RUN: FileCheck --input-file %t %s #include "undef-value-callee.h" Index: test/Analysis/diagnostics/undef-value-param.c =================================================================== --- test/Analysis/diagnostics/undef-value-param.c +++ test/Analysis/diagnostics/undef-value-param.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s void foo_irrelevant(int c) { Index: test/Analysis/diagnostics/undef-value-param.m =================================================================== --- test/Analysis/diagnostics/undef-value-param.m +++ test/Analysis/diagnostics/undef-value-param.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx -analyzer-output=text -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s typedef signed char BOOL; Index: test/Analysis/disable-all-checks.c =================================================================== --- test/Analysis/disable-all-checks.c +++ test/Analysis/disable-all-checks.c @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-disable-all-checks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-disable-all-checks -analyzer-checker=core -analyzer-store=region -verify %s -// RUN: %clang --analyze -Xanalyzer -analyzer-disable-all-checks -Xclang -verify %s -// RUN: not %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-disable-checker -verify %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-disable-all-checks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-disable-all-checks -analyzer-checker=core -analyzer-store=region -verify %s +// RUN: %clang %z3 --analyze -Xanalyzer -analyzer-disable-all-checks -Xclang -verify %s +// RUN: not %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-disable-checker -verify %s 2>&1 | FileCheck %s // expected-no-diagnostics // CHECK: use -analyzer-disable-all-checks to disable all static analyzer checkers Index: test/Analysis/dispatch-once.m =================================================================== --- test/Analysis/dispatch-once.m +++ test/Analysis/dispatch-once.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -w -fblocks -analyze -analyzer-checker=core,osx.API,unix.Malloc -verify %s -// RUN: %clang_cc1 -w -fblocks -fobjc-arc -analyze -analyzer-checker=core,osx.API,unix.Malloc -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -fblocks -analyze -analyzer-checker=core,osx.API,unix.Malloc -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -fblocks -fobjc-arc -analyze -analyzer-checker=core,osx.API,unix.Malloc -verify %s #include "Inputs/system-header-simulator-objc.h" Index: test/Analysis/div-zero.cpp =================================================================== --- test/Analysis/div-zero.cpp +++ test/Analysis/div-zero.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core.DivideZero -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core.DivideZero -verify %s int fooPR10616 (int qX ) { int a, c, d; Index: test/Analysis/division-by-zero.c =================================================================== --- test/Analysis/division-by-zero.c +++ test/Analysis/division-by-zero.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.Malloc %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.Malloc %s // Do not crash due to division by zero int f(unsigned int a) { Index: test/Analysis/domtest.c =================================================================== --- test/Analysis/domtest.c +++ test/Analysis/domtest.c @@ -1,5 +1,5 @@ // RUN: rm -f %t -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpDominators %s > %t 2>&1 +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpDominators %s > %t 2>&1 // RUN: FileCheck --input-file=%t %s // Test the DominatorsTree implementation with various control flows Index: test/Analysis/dtor-cxx11.cpp =================================================================== --- test/Analysis/dtor-cxx11.cpp +++ test/Analysis/dtor-cxx11.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true -Wno-null-dereference -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true -Wno-null-dereference -verify %s // expected-no-diagnostics #include "Inputs/system-header-simulator-cxx.h" Index: test/Analysis/dtor.cpp =================================================================== --- test/Analysis/dtor.cpp +++ test/Analysis/dtor.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection,cplusplus -analyzer-config c++-inlining=destructors,cfg-temporary-dtors=true -Wno-null-dereference -Wno-inaccessible-base -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection,cplusplus -analyzer-config c++-inlining=destructors,cfg-temporary-dtors=true -Wno-null-dereference -Wno-inaccessible-base -verify %s void clang_analyzer_eval(bool); void clang_analyzer_checkInlined(bool); Index: test/Analysis/dtors-in-dtor-cfg-output.cpp =================================================================== --- test/Analysis/dtors-in-dtor-cfg-output.cpp +++ test/Analysis/dtors-in-dtor-cfg-output.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 | FileCheck %s class A { public: Index: test/Analysis/dynamic-cast.cpp =================================================================== --- test/Analysis/dynamic-cast.cpp +++ test/Analysis/dynamic-cast.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=none -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=none -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/dynamic_type_check.m =================================================================== --- test/Analysis/dynamic_type_check.m +++ test/Analysis/dynamic_type_check.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core.DynamicTypeChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core.DynamicTypeChecker -verify %s #define nil 0 Index: test/Analysis/edges-new.mm =================================================================== --- test/Analysis/edges-new.mm +++ test/Analysis/edges-new.mm @@ -1,4 +1,4 @@ -// RUN: %clang -target x86_64-apple-darwin10 --analyze -Xclang -analyzer-config -Xclang path-diagnostics-alternate=true -Xclang -analyzer-output=plist -o %t %s +// RUN: %clang %z3 -target x86_64-apple-darwin10 --analyze -Xclang -analyzer-config -Xclang path-diagnostics-alternate=true -Xclang -analyzer-output=plist -o %t %s // RUN: FileCheck --input-file %t %s //===----------------------------------------------------------------------===// Index: test/Analysis/elementtype.c =================================================================== --- test/Analysis/elementtype.c +++ test/Analysis/elementtype.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region %s typedef struct added_obj_st { int type; Index: test/Analysis/engine/replay-without-inlining.c =================================================================== --- test/Analysis/engine/replay-without-inlining.c +++ test/Analysis/engine/replay-without-inlining.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -verify %s // expected-no-diagnostics typedef struct { Index: test/Analysis/enum.cpp =================================================================== --- test/Analysis/enum.cpp +++ test/Analysis/enum.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=debug.ExprInspection %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=debug.ExprInspection %s void clang_analyzer_eval(bool); Index: test/Analysis/exceptions.mm =================================================================== --- test/Analysis/exceptions.mm +++ test/Analysis/exceptions.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -fexceptions -fobjc-exceptions -fcxx-exceptions -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fexceptions -fobjc-exceptions -fcxx-exceptions -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s void clang_analyzer_checkInlined(bool); Index: test/Analysis/exercise-ps.c =================================================================== --- test/Analysis/exercise-ps.c +++ test/Analysis/exercise-ps.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // // Just exercise the analyzer on code that has at one point caused issues // (i.e., no assertions or crashes). Index: test/Analysis/explain-svals.cpp =================================================================== --- test/Analysis/explain-svals.cpp +++ test/Analysis/explain-svals.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core.builtin,debug.ExprInspection,unix.cstring -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core.builtin,debug.ExprInspection,unix.cstring -verify %s typedef unsigned long size_t; @@ -69,7 +69,7 @@ static int stat; clang_analyzer_explain(x + 1); // expected-warning-re{{{{^\(argument 'x'\) \+ 1$}}}} clang_analyzer_explain(1 + y); // expected-warning-re{{{{^\(argument 'y'\) \+ 1$}}}} - clang_analyzer_explain(x + y); // expected-warning-re{{{{^unknown value$}}}} + clang_analyzer_explain(x + y); // expected-warning-re{{{{^\(argument 'x'\) \+ \(argument 'y'\)$}}}} clang_analyzer_explain(z); // expected-warning-re{{{{^undefined value$}}}} clang_analyzer_explain(&z); // expected-warning-re{{{{^pointer to local variable 'z'$}}}} clang_analyzer_explain(stat); // expected-warning-re{{{{^signed 32-bit integer '0'$}}}} Index: test/Analysis/explain-svals.m =================================================================== --- test/Analysis/explain-svals.m +++ test/Analysis/explain-svals.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -w -triple i386-apple-darwin10 -fblocks -analyze -analyzer-checker=core.builtin,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -triple i386-apple-darwin10 -fblocks -analyze -analyzer-checker=core.builtin,debug.ExprInspection -verify %s #include "Inputs/system-header-simulator-objc.h" Index: test/Analysis/expr-inspection.c =================================================================== --- test/Analysis/expr-inspection.c +++ test/Analysis/expr-inspection.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.ExprInspection -verify %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.ExprInspection -verify %s 2>&1 | FileCheck %s // Self-tests for the debug.ExprInspection checker. Index: test/Analysis/fields.c =================================================================== --- test/Analysis/fields.c +++ test/Analysis/fields.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection %s -analyzer-store=region -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection %s -analyzer-store=region -verify void clang_analyzer_eval(int); Index: test/Analysis/free.c =================================================================== --- test/Analysis/free.c +++ test/Analysis/free.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-checker=core,unix.Malloc -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-checker=core,unix.Malloc -fblocks -verify -analyzer-config unix.Malloc:Optimistic=true %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-store=region -analyzer-checker=core,unix.Malloc -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-store=region -analyzer-checker=core,unix.Malloc -fblocks -verify -analyzer-config unix.Malloc:Optimistic=true %s typedef __typeof(sizeof(int)) size_t; void free(void *); void *alloca(size_t); Index: test/Analysis/func.c =================================================================== --- test/Analysis/func.c +++ test/Analysis/func.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify %s void clang_analyzer_eval(int); void clang_analyzer_warnIfReached(); Index: test/Analysis/generics.m =================================================================== --- test/Analysis/generics.m +++ test/Analysis/generics.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -analyzer-output=plist -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -analyzer-output=plist -o %t.plist // RUN: FileCheck --input-file %t.plist %s #if !__has_feature(objc_generics) Index: test/Analysis/global-region-invalidation.c =================================================================== --- test/Analysis/global-region-invalidation.c +++ test/Analysis/global-region-invalidation.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -disable-free -analyzer-eagerly-assume -analyzer-checker=core,deadcode,alpha.security.taint,debug.TaintTest,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -disable-free -analyzer-eagerly-assume -analyzer-checker=core,deadcode,alpha.security.taint,debug.TaintTest,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/global_region_invalidation.mm =================================================================== --- test/Analysis/global_region_invalidation.mm +++ test/Analysis/global_region_invalidation.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/gtest.cpp =================================================================== --- test/Analysis/gtest.cpp +++ test/Analysis/gtest.cpp @@ -1,6 +1,6 @@ -//RUN: %clang_cc1 -cc1 -std=c++11 -analyze -analyzer-checker=core,apiModeling.google.GTest,debug.ExprInspection -analyzer-eagerly-assume %s -verify -//RUN: %clang_cc1 -cc1 -std=c++11 -analyze -analyzer-checker=core,apiModeling.google.GTest,debug.ExprInspection -analyzer-eagerly-assume -DGTEST_VERSION_1_8_AND_LATER=1 %s -verify -//RUN: %clang_cc1 -cc1 -std=c++11 -analyze -analyzer-checker=core,apiModeling.google.GTest,debug.ExprInspection -analyzer-eagerly-assume -analyzer-config cfg-temporary-dtors=true %s -verify +//RUN: %clang_cc1 %z3_cc1 -cc1 -std=c++11 -analyze -analyzer-checker=core,apiModeling.google.GTest,debug.ExprInspection -analyzer-eagerly-assume %s -verify +//RUN: %clang_cc1 %z3_cc1 -cc1 -std=c++11 -analyze -analyzer-checker=core,apiModeling.google.GTest,debug.ExprInspection -analyzer-eagerly-assume -DGTEST_VERSION_1_8_AND_LATER=1 %s -verify +//RUN: %clang_cc1 %z3_cc1 -cc1 -std=c++11 -analyze -analyzer-checker=core,apiModeling.google.GTest,debug.ExprInspection -analyzer-eagerly-assume -analyzer-config cfg-temporary-dtors=true %s -verify void clang_analyzer_eval(int); void clang_analyzer_warnIfReached(); Index: test/Analysis/html-diags-multifile.c =================================================================== --- test/Analysis/html-diags-multifile.c +++ test/Analysis/html-diags-multifile.c @@ -1,5 +1,5 @@ // RUN: mkdir -p %t.dir -// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t.dir %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t.dir %s // RUN: ls %t.dir | not grep report // RUN: rm -fR %t.dir Index: test/Analysis/html-diags.c =================================================================== --- test/Analysis/html-diags.c +++ test/Analysis/html-diags.c @@ -1,11 +1,11 @@ // RUN: rm -fR %T/dir // RUN: mkdir %T/dir -// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %T/dir %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %T/dir %s // RUN: ls %T/dir | grep report // PR16547: Test relative paths // RUN: cd %T/dir -// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o testrelative %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o testrelative %s // RUN: ls %T/dir/testrelative | grep report // Currently this test mainly checks that the HTML diagnostics doesn't crash Index: test/Analysis/identical-expressions.cpp =================================================================== --- test/Analysis/identical-expressions.cpp +++ test/Analysis/identical-expressions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core.IdenticalExpr -w -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core.IdenticalExpr -w -verify %s /* Only one expected warning per function allowed at the very end. */ Index: test/Analysis/index-type.c =================================================================== --- test/Analysis/index-type.c +++ test/Analysis/index-type.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,alpha.security.ArrayBoundV2 -verify %s -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,alpha.security.ArrayBoundV2 -DM32 -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,alpha.security.ArrayBoundV2 -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,alpha.security.ArrayBoundV2 -DM32 -verify %s // expected-no-diagnostics #define UINT_MAX (~0u) Index: test/Analysis/initializer.cpp =================================================================== --- test/Analysis/initializer.cpp +++ test/Analysis/initializer.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=constructors -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=constructors -std=c++11 -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/initializers-cfg-output.cpp =================================================================== --- test/Analysis/initializers-cfg-output.cpp +++ test/Analysis/initializers-cfg-output.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -analyze -analyzer-checker=debug.DumpCFG %s 2>&1 | FileCheck %s class A { public: Index: test/Analysis/inline-not-supported.c =================================================================== --- test/Analysis/inline-not-supported.c +++ test/Analysis/inline-not-supported.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-checker=core -verify %s // For now, don't inline varargs. void foo(int *x, ...) { Index: test/Analysis/inline-plist.c =================================================================== --- test/Analysis/inline-plist.c +++ test/Analysis/inline-plist.c @@ -1,5 +1,5 @@ -// RUN: %clang --analyze %s -fblocks -Xanalyzer -analyzer-output=text -Xanalyzer -analyzer-config -Xanalyzer suppress-null-return-paths=false -Xclang -verify %s -// RUN: %clang --analyze %s -fblocks -Xanalyzer -analyzer-config -Xanalyzer suppress-null-return-paths=false -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t +// RUN: %clang %z3 --analyze %s -fblocks -Xanalyzer -analyzer-output=text -Xanalyzer -analyzer-config -Xanalyzer suppress-null-return-paths=false -Xclang -verify %s +// RUN: %clang %z3 --analyze %s -fblocks -Xanalyzer -analyzer-config -Xanalyzer suppress-null-return-paths=false -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t // RUN: FileCheck -input-file %t %s // Index: test/Analysis/inline-unique-reports.c =================================================================== --- test/Analysis/inline-unique-reports.c +++ test/Analysis/inline-unique-reports.c @@ -1,4 +1,4 @@ -// RUN: %clang --analyze %s -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t > /dev/null 2>&1 +// RUN: %clang %z3 --analyze %s -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t > /dev/null 2>&1 // RUN: FileCheck -input-file %t %s static inline bug(int *p) { Index: test/Analysis/inline.c =================================================================== --- test/Analysis/inline.c +++ test/Analysis/inline.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(int); void clang_analyzer_checkInlined(int); Index: test/Analysis/inline.cpp =================================================================== --- test/Analysis/inline.cpp +++ test/Analysis/inline.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config ipa=inlining -analyzer-config c++-allocator-inlining=true -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config ipa=inlining -analyzer-config c++-allocator-inlining=true -verify %s void clang_analyzer_eval(bool); void clang_analyzer_checkInlined(bool); Index: test/Analysis/inline2.c =================================================================== --- test/Analysis/inline2.c +++ test/Analysis/inline2.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s // expected-no-diagnostics // Test parameter 'a' is registered to LiveVariables analysis data although it Index: test/Analysis/inline3.c =================================================================== --- test/Analysis/inline3.c +++ test/Analysis/inline3.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s // expected-no-diagnostics // Test when entering f1(), we set the right AnalysisDeclContext to Environment. Index: test/Analysis/inline4.c =================================================================== --- test/Analysis/inline4.c +++ test/Analysis/inline4.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s // expected-no-diagnostics int g(int a) { Index: test/Analysis/inlining/DynDispatchBifurcate.m =================================================================== --- test/Analysis/inlining/DynDispatchBifurcate.m +++ test/Analysis/inlining/DynDispatchBifurcate.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx -analyzer-config ipa=dynamic-bifurcate -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx -analyzer-config ipa=dynamic-bifurcate -verify %s #include "InlineObjCInstanceMethod.h" Index: test/Analysis/inlining/InlineObjCClassMethod.m =================================================================== --- test/Analysis/inlining/InlineObjCClassMethod.m +++ test/Analysis/inlining/InlineObjCClassMethod.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s void clang_analyzer_checkInlined(int); void clang_analyzer_eval(int); Index: test/Analysis/inlining/InlineObjCInstanceMethod.m =================================================================== --- test/Analysis/inlining/InlineObjCInstanceMethod.m +++ test/Analysis/inlining/InlineObjCInstanceMethod.m @@ -1,4 +1,4 @@ -// RUN: %clang --analyze -Xanalyzer -analyzer-checker=osx.cocoa.IncompatibleMethodTypes,osx.coreFoundation.CFRetainRelease -Xclang -verify %s +// RUN: %clang %z3 --analyze -Xanalyzer -analyzer-checker=osx.cocoa.IncompatibleMethodTypes,osx.coreFoundation.CFRetainRelease -Xclang -verify %s #include "InlineObjCInstanceMethod.h" Index: test/Analysis/inlining/ObjCDynTypePopagation.m =================================================================== --- test/Analysis/inlining/ObjCDynTypePopagation.m +++ test/Analysis/inlining/ObjCDynTypePopagation.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s #include "InlineObjCInstanceMethod.h" Index: test/Analysis/inlining/ObjCImproperDynamictallyDetectableCast.m =================================================================== --- test/Analysis/inlining/ObjCImproperDynamictallyDetectableCast.m +++ test/Analysis/inlining/ObjCImproperDynamictallyDetectableCast.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s typedef signed char BOOL; @protocol NSObject - (BOOL)isEqual:(id)object; @end Index: test/Analysis/inlining/RetainCountExamples.m =================================================================== --- test/Analysis/inlining/RetainCountExamples.m +++ test/Analysis/inlining/RetainCountExamples.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-config ipa=dynamic-bifurcate -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-config ipa=dynamic-bifurcate -verify %s typedef signed char BOOL; typedef struct objc_class *Class; Index: test/Analysis/inlining/analysis-order.c =================================================================== --- test/Analysis/inlining/analysis-order.c +++ test/Analysis/inlining/analysis-order.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core.builtin.NoReturnFunctions -analyzer-display-progress %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core.builtin.NoReturnFunctions -analyzer-display-progress %s 2>&1 | FileCheck %s // Do not analyze test1() again because it was inlined void test1(); Index: test/Analysis/inlining/assume-super-init-does-not-return-nil.m =================================================================== --- test/Analysis/inlining/assume-super-init-does-not-return-nil.m +++ test/Analysis/inlining/assume-super-init-does-not-return-nil.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx -verify %s typedef signed char BOOL; Index: test/Analysis/inlining/containers.cpp =================================================================== --- test/Analysis/inlining/containers.cpp +++ test/Analysis/inlining/containers.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=destructors -analyzer-config c++-container-inlining=false -verify %s -// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=destructors -analyzer-config c++-container-inlining=true -DINLINE=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=destructors -analyzer-config c++-container-inlining=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=destructors -analyzer-config c++-container-inlining=true -DINLINE=1 -verify %s #ifndef HEADER Index: test/Analysis/inlining/dyn-dispatch-bifurcate.cpp =================================================================== --- test/Analysis/inlining/dyn-dispatch-bifurcate.cpp +++ test/Analysis/inlining/dyn-dispatch-bifurcate.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify -Wno-reinterpret-base-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify -Wno-reinterpret-base-class %s void clang_analyzer_eval(bool); Index: test/Analysis/inlining/eager-reclamation-path-notes.c =================================================================== --- test/Analysis/inlining/eager-reclamation-path-notes.c +++ test/Analysis/inlining/eager-reclamation-path-notes.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s void use(int *ptr, int val) { Index: test/Analysis/inlining/eager-reclamation-path-notes.cpp =================================================================== --- test/Analysis/inlining/eager-reclamation-path-notes.cpp +++ test/Analysis/inlining/eager-reclamation-path-notes.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -analyzer-config suppress-null-return-paths=false -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 -analyzer-config suppress-null-return-paths=false -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -analyzer-config suppress-null-return-paths=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 -analyzer-config suppress-null-return-paths=false -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s typedef struct { Index: test/Analysis/inlining/false-positive-suppression.c =================================================================== --- test/Analysis/inlining/false-positive-suppression.c +++ test/Analysis/inlining/false-positive-suppression.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -analyze -analyzer-eagerly-assume -analyzer-checker=core -analyzer-config suppress-null-return-paths=false -verify %s -// RUN: %clang_cc1 -analyze -analyzer-eagerly-assume -analyzer-checker=core -verify -DSUPPRESSED=1 %s -// RUN: %clang_cc1 -analyze -analyzer-eagerly-assume -analyzer-checker=core -analyzer-config avoid-suppressing-null-argument-paths=true -DSUPPRESSED=1 -DNULL_ARGS=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-eagerly-assume -analyzer-checker=core -analyzer-config suppress-null-return-paths=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-eagerly-assume -analyzer-checker=core -verify -DSUPPRESSED=1 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-eagerly-assume -analyzer-checker=core -analyzer-config avoid-suppressing-null-argument-paths=true -DSUPPRESSED=1 -DNULL_ARGS=1 -verify %s int opaquePropertyCheck(void *object); int coin(); Index: test/Analysis/inlining/false-positive-suppression.cpp =================================================================== --- test/Analysis/inlining/false-positive-suppression.cpp +++ test/Analysis/inlining/false-positive-suppression.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-null-return-paths=false -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -DSUPPRESSED=1 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-null-return-paths=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify -DSUPPRESSED=1 %s namespace rdar12676053 { // Delta-reduced from a preprocessed file. Index: test/Analysis/inlining/false-positive-suppression.m =================================================================== --- test/Analysis/inlining/false-positive-suppression.m +++ test/Analysis/inlining/false-positive-suppression.m @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-null-return-paths=false -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -DSUPPRESSED=1 %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -fobjc-arc -verify -DSUPPRESSED=1 %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config avoid-suppressing-null-argument-paths=true -DSUPPRESSED=1 -DNULL_ARGS=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-null-return-paths=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify -DSUPPRESSED=1 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -fobjc-arc -verify -DSUPPRESSED=1 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config avoid-suppressing-null-argument-paths=true -DSUPPRESSED=1 -DNULL_ARGS=1 -verify %s #define ARC __has_feature(objc_arc) Index: test/Analysis/inlining/inline-defensive-checks.c =================================================================== --- test/Analysis/inlining/inline-defensive-checks.c +++ test/Analysis/inlining/inline-defensive-checks.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-inlined-defensive-checks=true -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-inlined-defensive-checks=true -verify %s // Perform inline defensive checks. void idc(int *p) { Index: test/Analysis/inlining/inline-defensive-checks.cpp =================================================================== --- test/Analysis/inlining/inline-defensive-checks.cpp +++ test/Analysis/inlining/inline-defensive-checks.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s // expected-no-diagnostics extern void __assert_fail (__const char *__assertion, __const char *__file, Index: test/Analysis/inlining/inline-defensive-checks.m =================================================================== --- test/Analysis/inlining/inline-defensive-checks.m +++ test/Analysis/inlining/inline-defensive-checks.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-inlined-defensive-checks=true -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config suppress-inlined-defensive-checks=true -verify %s typedef signed char BOOL; typedef struct objc_class *Class; Index: test/Analysis/inlining/path-notes.c =================================================================== --- test/Analysis/inlining/path-notes.c +++ test/Analysis/inlining/path-notes.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config suppress-null-return-paths=false -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config suppress-null-return-paths=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s void zero(int **p) { Index: test/Analysis/inlining/path-notes.cpp =================================================================== --- test/Analysis/inlining/path-notes.cpp +++ test/Analysis/inlining/path-notes.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config c++-inlining=destructors -std=c++11 -verify -Wno-tautological-undefined-compare %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config c++-inlining=destructors -std=c++11 -analyzer-config path-diagnostics-alternate=false %s -o %t.plist -Wno-tautological-undefined-compare +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config c++-inlining=destructors -std=c++11 -verify -Wno-tautological-undefined-compare %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config c++-inlining=destructors -std=c++11 -analyzer-config path-diagnostics-alternate=false %s -o %t.plist -Wno-tautological-undefined-compare // RUN: FileCheck --input-file=%t.plist %s class Foo { Index: test/Analysis/inlining/path-notes.m =================================================================== --- test/Analysis/inlining/path-notes.m +++ test/Analysis/inlining/path-notes.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=text -analyzer-config suppress-null-return-paths=false -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -analyzer-config path-diagnostics-alternate=false -fblocks %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=text -analyzer-config suppress-null-return-paths=false -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -analyzer-config path-diagnostics-alternate=false -fblocks %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s typedef struct dispatch_queue_s *dispatch_queue_t; Index: test/Analysis/inlining/retain-count-self-init.m =================================================================== --- test/Analysis/inlining/retain-count-self-init.m +++ test/Analysis/inlining/retain-count-self-init.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.SelfInit -analyzer-config ipa=dynamic-bifurcate -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.SelfInit -analyzer-config ipa=dynamic-bifurcate -verify %s typedef signed char BOOL; typedef struct objc_class *Class; Index: test/Analysis/inlining/stl.cpp =================================================================== --- test/Analysis/inlining/stl.cpp +++ test/Analysis/inlining/stl.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=false -std=c++11 -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=true -std=c++11 -DINLINE=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=false -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,cplusplus.NewDelete,debug.ExprInspection -analyzer-config c++-container-inlining=true -analyzer-config c++-stdlib-inlining=true -std=c++11 -DINLINE=1 -verify %s #include "../Inputs/system-header-simulator-cxx.h" Index: test/Analysis/inlining/test-always-inline-size-option.c =================================================================== --- test/Analysis/inlining/test-always-inline-size-option.c +++ test/Analysis/inlining/test-always-inline-size-option.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-inline-max-stack-depth=3 -analyzer-config ipa-always-inline-size=3 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-inline-max-stack-depth=3 -analyzer-config ipa-always-inline-size=3 -verify %s void clang_analyzer_eval(int); int nested5() { Index: test/Analysis/inlining/test_objc_inlining_option.m =================================================================== --- test/Analysis/inlining/test_objc_inlining_option.m +++ test/Analysis/inlining/test_objc_inlining_option.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config ipa=dynamic-bifurcate -analyzer-config objc-inlining=false -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config ipa=dynamic-bifurcate -analyzer-config objc-inlining=false -verify %s // expected-no-diagnostics typedef signed char BOOL; Index: test/Analysis/iterator-past-end.cpp =================================================================== --- test/Analysis/iterator-past-end.cpp +++ test/Analysis/iterator-past-end.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=core,cplusplus,alpha.cplusplus.IteratorPastEnd -analyzer-eagerly-assume -analyzer-config c++-container-inlining=false %s -verify -// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=core,cplusplus,alpha.cplusplus.IteratorPastEnd -analyzer-eagerly-assume -analyzer-config c++-container-inlining=true -DINLINE=1 %s -verify +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -analyze -analyzer-checker=core,cplusplus,alpha.cplusplus.IteratorPastEnd -analyzer-eagerly-assume -analyzer-config c++-container-inlining=false %s -verify +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -analyze -analyzer-checker=core,cplusplus,alpha.cplusplus.IteratorPastEnd -analyzer-eagerly-assume -analyzer-config c++-container-inlining=true -DINLINE=1 %s -verify #include "Inputs/system-header-simulator-cxx.h" Index: test/Analysis/ivars.m =================================================================== --- test/Analysis/ivars.m +++ test/Analysis/ivars.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store=region -fblocks -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store=region -fblocks -verify -Wno-objc-root-class %s void clang_analyzer_eval(int); Index: test/Analysis/keychainAPI-diagnostic-visitor.m =================================================================== --- test/Analysis/keychainAPI-diagnostic-visitor.m +++ test/Analysis/keychainAPI-diagnostic-visitor.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=osx.SecKeychainAPI -analyzer-store=region -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=osx.SecKeychainAPI -analyzer-store=region -analyzer-output=text -verify %s // This file is for testing enhanced diagnostics produced by the default SecKeychainAPI checker. Index: test/Analysis/keychainAPI.m =================================================================== --- test/Analysis/keychainAPI.m +++ test/Analysis/keychainAPI.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.SecKeychainAPI -fblocks %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.SecKeychainAPI -fblocks %s -verify #include "Inputs/system-header-simulator-objc.h" Index: test/Analysis/kmalloc-linux.c =================================================================== --- test/Analysis/kmalloc-linux.c +++ test/Analysis/kmalloc-linux.c @@ -1,4 +1,4 @@ -// RUN: %clang -target x86_64-unknown-linux --analyze %s +// RUN: %clang %z3 -target x86_64-unknown-linux --analyze %s #include "Inputs/system-header-simulator.h" Index: test/Analysis/lambda-notes.cpp =================================================================== --- test/Analysis/lambda-notes.cpp +++ test/Analysis/lambda-notes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core -analyzer-config inline-lambdas=true -analyzer-output plist -verify %s -o %t +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core -analyzer-config inline-lambdas=true -analyzer-output plist -verify %s -o %t // RUN: FileCheck --input-file=%t %s Index: test/Analysis/lambdas-generalized-capture.cpp =================================================================== --- test/Analysis/lambdas-generalized-capture.cpp +++ test/Analysis/lambdas-generalized-capture.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++14 -fsyntax-only -analyze -analyzer-checker=core,deadcode,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++14 -fsyntax-only -analyze -analyzer-checker=core,deadcode,debug.ExprInspection -verify %s int clang_analyzer_eval(int); Index: test/Analysis/lambdas.cpp =================================================================== --- test/Analysis/lambdas.cpp +++ test/Analysis/lambdas.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core,deadcode,debug.ExprInspection -analyzer-config inline-lambdas=true -verify %s -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core,debug.DumpCFG -analyzer-config inline-lambdas=true %s > %t 2>&1 +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core,deadcode,debug.ExprInspection -analyzer-config inline-lambdas=true -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -fsyntax-only -analyze -analyzer-checker=core,debug.DumpCFG -analyzer-config inline-lambdas=true %s > %t 2>&1 // RUN: FileCheck --input-file=%t %s void clang_analyzer_warnIfReached(); Index: test/Analysis/lambdas.mm =================================================================== --- test/Analysis/lambdas.mm +++ test/Analysis/lambdas.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fblocks -Wno-objc-root-class -analyze -analyzer-checker=core,deadcode,debug.ExprInspection -analyzer-config inline-lambdas=true -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -fsyntax-only -fblocks -Wno-objc-root-class -analyze -analyzer-checker=core,deadcode,debug.ExprInspection -analyzer-config inline-lambdas=true -verify %s int clang_analyzer_eval(int); Index: test/Analysis/lifetime-extension.cpp =================================================================== --- test/Analysis/lifetime-extension.cpp +++ test/Analysis/lifetime-extension.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-unused -std=c++11 -analyze -analyzer-checker=debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -Wno-unused -std=c++11 -analyze -analyzer-checker=debug.ExprInspection -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/live-variables.cpp =================================================================== --- test/Analysis/live-variables.cpp +++ test/Analysis/live-variables.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s // expected-no-diagnostics class B { public: Index: test/Analysis/live-variables.m =================================================================== --- test/Analysis/live-variables.m +++ test/Analysis/live-variables.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -fobjc-arc -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -fobjc-arc -verify %s // expected-no-diagnostics @interface NSObject @end Index: test/Analysis/localization-aggressive.m =================================================================== --- test/Analysis/localization-aggressive.m +++ test/Analysis/localization-aggressive.m @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fblocks -x objective-c-header -emit-pch -o %t.pch %S/Inputs/localization-pch.h +// RUN: %clang_cc1 %z3_cc1 -fblocks -x objective-c-header -emit-pch -o %t.pch %S/Inputs/localization-pch.h -// RUN: %clang_cc1 -analyze -fblocks -analyzer-store=region -analyzer-checker=optin.osx.cocoa.localizability.NonLocalizedStringChecker -analyzer-checker=optin.osx.cocoa.localizability.EmptyLocalizationContextChecker -include-pch %t.pch -verify -analyzer-config AggressiveReport=true %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fblocks -analyzer-store=region -analyzer-checker=optin.osx.cocoa.localizability.NonLocalizedStringChecker -analyzer-checker=optin.osx.cocoa.localizability.EmptyLocalizationContextChecker -include-pch %t.pch -verify -analyzer-config AggressiveReport=true %s // These declarations were reduced using Delta-Debugging from Foundation.h // on Mac OS X. Index: test/Analysis/localization.m =================================================================== --- test/Analysis/localization.m +++ test/Analysis/localization.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -fblocks -analyzer-store=region -analyzer-output=text -analyzer-checker=optin.osx.cocoa.localizability.NonLocalizedStringChecker -analyzer-checker=alpha.osx.cocoa.localizability.PluralMisuseChecker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fblocks -analyzer-store=region -analyzer-output=text -analyzer-checker=optin.osx.cocoa.localizability.NonLocalizedStringChecker -analyzer-checker=alpha.osx.cocoa.localizability.PluralMisuseChecker -verify %s // The larger set of tests in located in localization.m. These are tests // specific for non-aggressive reporting. Index: test/Analysis/logical-ops.c =================================================================== --- test/Analysis/logical-ops.c +++ test/Analysis/logical-ops.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-pointer-bool-conversion -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -Wno-pointer-bool-conversion -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/loop-widening.c =================================================================== --- test/Analysis/loop-widening.c +++ test/Analysis/loop-widening.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-max-loop 4 -analyzer-config widen-loops=true -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-max-loop 4 -analyzer-config widen-loops=true -verify %s void clang_analyzer_eval(int); void clang_analyzer_warnIfReached(); Index: test/Analysis/lvalue.cpp =================================================================== --- test/Analysis/lvalue.cpp +++ test/Analysis/lvalue.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s // expected-no-diagnostics int f1() { Index: test/Analysis/malloc-annotations.c =================================================================== --- test/Analysis/malloc-annotations.c +++ test/Analysis/malloc-annotations.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc -analyzer-store=region -verify -analyzer-config unix.Malloc:Optimistic=true %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc -analyzer-store=region -verify -analyzer-config unix.Malloc:Optimistic=true %s typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); void free(void *); Index: test/Analysis/malloc-custom.c =================================================================== --- test/Analysis/malloc-custom.c +++ test/Analysis/malloc-custom.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -Wno-incompatible-library-redeclaration -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -Wno-incompatible-library-redeclaration -verify %s // Various tests to make the the analyzer is robust against custom // redeclarations of memory routines. Index: test/Analysis/malloc-interprocedural.c =================================================================== --- test/Analysis/malloc-interprocedural.c +++ test/Analysis/malloc-interprocedural.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.Malloc -analyzer-inline-max-stack-depth=5 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.Malloc -analyzer-inline-max-stack-depth=5 -verify %s #include "Inputs/system-header-simulator.h" Index: test/Analysis/malloc-overflow.c =================================================================== --- test/Analysis/malloc-overflow.c +++ test/Analysis/malloc-overflow.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.security.MallocOverflow -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.security.MallocOverflow -verify %s #define NULL ((void *) 0) typedef __typeof__(sizeof(int)) size_t; Index: test/Analysis/malloc-overflow.cpp =================================================================== --- test/Analysis/malloc-overflow.cpp +++ test/Analysis/malloc-overflow.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.security.MallocOverflow -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.security.MallocOverflow -verify %s // expected-no-diagnostics class A { Index: test/Analysis/malloc-overflow2.c =================================================================== --- test/Analysis/malloc-overflow2.c +++ test/Analysis/malloc-overflow2.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-unknown -analyze -analyzer-checker=alpha.security.MallocOverflow,unix -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-unknown -analyze -analyzer-checker=alpha.security.MallocOverflow,unix -verify %s typedef __typeof__(sizeof(int)) size_t; extern void *malloc(size_t); Index: test/Analysis/malloc-plist.c =================================================================== --- test/Analysis/malloc-plist.c +++ test/Analysis/malloc-plist.c @@ -1,5 +1,5 @@ // RUN: rm -f %t -// RUN: %clang_cc1 -analyze -fblocks -analyzer-checker=core,unix.Malloc -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fblocks -analyzer-checker=core,unix.Malloc -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s // RUN: FileCheck -input-file %t %s typedef __typeof(sizeof(int)) size_t; Index: test/Analysis/malloc-protoype.c =================================================================== --- test/Analysis/malloc-protoype.c +++ test/Analysis/malloc-protoype.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -w -analyze -analyzer-checker=core,unix.Malloc -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -analyze -analyzer-checker=core,unix.Malloc -verify %s // expected-no-diagnostics // Test that strange prototypes doesn't crash the analyzer Index: test/Analysis/malloc-sizeof.c =================================================================== --- test/Analysis/malloc-sizeof.c +++ test/Analysis/malloc-sizeof.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.MallocSizeof -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.MallocSizeof -verify %s #include Index: test/Analysis/malloc-sizeof.cpp =================================================================== --- test/Analysis/malloc-sizeof.cpp +++ test/Analysis/malloc-sizeof.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.MallocSizeof -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.MallocSizeof -verify %s #include Index: test/Analysis/malloc-three-arg.c =================================================================== --- test/Analysis/malloc-three-arg.c +++ test/Analysis/malloc-three-arg.c @@ -1,4 +1,4 @@ -// RUN: %clang -target x86_64-unknown-freebsd --analyze %s +// RUN: %clang %z3 -target x86_64-unknown-freebsd --analyze %s #include "Inputs/system-header-simulator.h" Index: test/Analysis/malloc.c =================================================================== --- test/Analysis/malloc.c +++ test/Analysis/malloc.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,debug.ExprInspection -analyzer-store=region -verify %s #include "Inputs/system-header-simulator.h" Index: test/Analysis/malloc.cpp =================================================================== --- test/Analysis/malloc.cpp +++ test/Analysis/malloc.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -w -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus.NewDelete -analyzer-store=region -verify %s -// RUN: %clang_cc1 -triple i386-unknown-linux-gnu -w -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus.NewDelete -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus.NewDelete -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-unknown-linux-gnu -w -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus.NewDelete -analyzer-store=region -verify %s #include "Inputs/system-header-simulator-cxx.h" Index: test/Analysis/malloc.m =================================================================== --- test/Analysis/malloc.m +++ test/Analysis/malloc.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -Wno-objc-root-class -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -Wno-objc-root-class -fblocks %s #include "Inputs/system-header-simulator-objc.h" @class NSString; Index: test/Analysis/malloc.mm =================================================================== --- test/Analysis/malloc.mm +++ test/Analysis/malloc.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify -fblocks %s #import "Inputs/system-header-simulator-objc.h" #import "Inputs/system-header-simulator-for-malloc.h" Index: test/Analysis/max-nodes-suppress-on-sink.c =================================================================== --- test/Analysis/max-nodes-suppress-on-sink.c +++ test/Analysis/max-nodes-suppress-on-sink.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config max-nodes=12 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config max-nodes=12 -verify %s // Here we test how "suppress on sink" feature of certain bugtypes interacts // with reaching analysis limits. Index: test/Analysis/member-expr.cpp =================================================================== --- test/Analysis/member-expr.cpp +++ test/Analysis/member-expr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection %s -verify void clang_analyzer_checkInlined(bool); void clang_analyzer_eval(int); Index: test/Analysis/method-arg-decay.m =================================================================== --- test/Analysis/method-arg-decay.m +++ test/Analysis/method-arg-decay.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyzer-checker=core -verify %s -Wno-incomplete-implementation +// RUN: %clang_cc1 %z3_cc1 -analyzer-checker=core -verify %s -Wno-incomplete-implementation typedef signed char BOOL; typedef int NSInteger; typedef unsigned int NSUInteger; Index: test/Analysis/method-call-intra-p.cpp =================================================================== --- test/Analysis/method-call-intra-p.cpp +++ test/Analysis/method-call-intra-p.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store region -verify %s // expected-no-diagnostics // Intra-procedural C++ tests. Index: test/Analysis/method-call-path-notes.cpp =================================================================== --- test/Analysis/method-call-path-notes.cpp +++ test/Analysis/method-call-path-notes.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s // Test warning about null or uninitialized pointer values used as instance member Index: test/Analysis/method-call.cpp =================================================================== --- test/Analysis/method-call.cpp +++ test/Analysis/method-call.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config c++-inlining=constructors -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/misc-ps-64.m =================================================================== --- test/Analysis/misc-ps-64.m +++ test/Analysis/misc-ps-64.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s // expected-no-diagnostics // - A bunch of misc. failures involving evaluating Index: test/Analysis/misc-ps-arm.m =================================================================== --- test/Analysis/misc-ps-arm.m +++ test/Analysis/misc-ps-arm.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv7-apple-ios0.0.0 -target-feature +neon -analyze -analyzer-checker=core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple thumbv7-apple-ios0.0.0 -target-feature +neon -analyze -analyzer-checker=core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s // expected-no-diagnostics // - Handle casts of vectors to structs, and loading Index: test/Analysis/misc-ps-cxx0x.cpp =================================================================== --- test/Analysis/misc-ps-cxx0x.cpp +++ test/Analysis/misc-ps-cxx0x.cpp @@ -1,4 +1,4 @@ -// RUN: %clang --analyze -std=c++11 %s -Xclang -verify -o /dev/null +// RUN: %clang %z3 --analyze -std=c++11 %s -Xclang -verify -o /dev/null void test_static_assert() { static_assert(sizeof(void *) == sizeof(void*), "test_static_assert"); Index: test/Analysis/misc-ps-eager-assume.m =================================================================== --- test/Analysis/misc-ps-eager-assume.m +++ test/Analysis/misc-ps-eager-assume.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s -analyzer-eagerly-assume +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s -analyzer-eagerly-assume // expected-no-diagnostics // Delta-reduced header stuff (needed for test cases). Index: test/Analysis/misc-ps-ranges.m =================================================================== --- test/Analysis/misc-ps-ranges.m +++ test/Analysis/misc-ps-ranges.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s // // main's 'argc' argument is always > 0 Index: test/Analysis/misc-ps-region-store-i386.m =================================================================== --- test/Analysis/misc-ps-region-store-i386.m +++ test/Analysis/misc-ps-region-store-i386.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s // expected-no-diagnostics // Here is a case where a pointer is treated as integer, invalidated as an Index: test/Analysis/misc-ps-region-store-x86_64.m =================================================================== --- test/Analysis/misc-ps-region-store-x86_64.m +++ test/Analysis/misc-ps-region-store-x86_64.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks %s // expected-no-diagnostics // Here is a case where a pointer is treated as integer, invalidated as an Index: test/Analysis/misc-ps-region-store.cpp =================================================================== --- test/Analysis/misc-ps-region-store.cpp +++ test/Analysis/misc-ps-region-store.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions -Wno-tautological-undefined-compare -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions -Wno-tautological-undefined-compare +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions -Wno-tautological-undefined-compare +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions -Wno-tautological-undefined-compare void clang_analyzer_warnIfReached(); Index: test/Analysis/misc-ps-region-store.m =================================================================== --- test/Analysis/misc-ps-region-store.m +++ test/Analysis/misc-ps-region-store.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s typedef long unsigned int size_t; void *memcpy(void *, const void *, size_t); Index: test/Analysis/misc-ps-region-store.mm =================================================================== --- test/Analysis/misc-ps-region-store.mm +++ test/Analysis/misc-ps-region-store.mm @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s // expected-no-diagnostics //===------------------------------------------------------------------------------------------===// Index: test/Analysis/misc-ps.c =================================================================== --- test/Analysis/misc-ps.c +++ test/Analysis/misc-ps.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -disable-free -analyzer-eagerly-assume -analyzer-checker=core,deadcode,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -disable-free -analyzer-eagerly-assume -analyzer-checker=core,deadcode,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/misc-ps.m =================================================================== --- test/Analysis/misc-ps.m +++ test/Analysis/misc-ps.m @@ -1,6 +1,6 @@ // NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple reports are not issued. -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s #ifndef __clang_analyzer__ #error __clang_analyzer__ not defined Index: test/Analysis/model-file.cpp =================================================================== --- test/Analysis/model-file.cpp +++ test/Analysis/model-file.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-config faux-bodies=true,model-path=%S/Inputs/Models -analyzer-output=plist-multi-file -verify %s -o %t +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-config faux-bodies=true,model-path=%S/Inputs/Models -analyzer-output=plist-multi-file -verify %s -o %t // RUN: FileCheck --input-file=%t %s typedef int* intptr; Index: test/Analysis/mpichecker.cpp =================================================================== --- test/Analysis/mpichecker.cpp +++ test/Analysis/mpichecker.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.mpi.MPI-Checker -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=optin.mpi.MPI-Checker -verify %s #include "MPIMock.h" Index: test/Analysis/mpicheckernotes.cpp =================================================================== --- test/Analysis/mpicheckernotes.cpp +++ test/Analysis/mpicheckernotes.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.mpi.MPI-Checker -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=optin.mpi.MPI-Checker -analyzer-output=text -verify %s // MPI-Checker test file to test note diagnostics. Index: test/Analysis/new-with-exceptions.cpp =================================================================== --- test/Analysis/new-with-exceptions.cpp +++ test/Analysis/new-with-exceptions.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -std=c++11 -fexceptions -fcxx-exceptions -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -std=c++11 -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/new.cpp =================================================================== --- test/Analysis/new.cpp +++ test/Analysis/new.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-store region -std=c++11 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-store region -std=c++11 -verify %s #include "Inputs/system-header-simulator-cxx.h" void clang_analyzer_eval(bool); Index: test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m =================================================================== --- test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m +++ test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret-region.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s // - This test case shows that a nil instance // variable can possibly be initialized by a method. Index: test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m =================================================================== --- test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m +++ test/Analysis/nil-receiver-undefined-larger-than-voidptr-ret.m @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s > %t.1 2>&1 +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin8 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s > %t.1 2>&1 // RUN: FileCheck -input-file=%t.1 -check-prefix=CHECK-darwin8 %s -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s > %t.2 2>&1 +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s > %t.2 2>&1 // RUN: FileCheck -input-file=%t.2 -check-prefix=CHECK-darwin9 %s -// RUN: %clang_cc1 -triple thumbv6-apple-ios4.0 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s > %t.3 2>&1 +// RUN: %clang_cc1 %z3_cc1 -triple thumbv6-apple-ios4.0 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-objc-root-class %s > %t.3 2>&1 // RUN: FileCheck -input-file=%t.3 -check-prefix=CHECK-darwin9 %s @interface MyClass {} Index: test/Analysis/no-exit-cfg.c =================================================================== --- test/Analysis/no-exit-cfg.c +++ test/Analysis/no-exit-cfg.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics // This is a test case for the issue reported in PR 2819: Index: test/Analysis/no-outofbounds.c =================================================================== --- test/Analysis/no-outofbounds.c +++ test/Analysis/no-outofbounds.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,alpha.unix,alpha.security.ArrayBound -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,alpha.unix,alpha.security.ArrayBound -analyzer-store=region -verify %s // expected-no-diagnostics //===----------------------------------------------------------------------===// Index: test/Analysis/no-unreachable-dtors.cpp =================================================================== --- test/Analysis/no-unreachable-dtors.cpp +++ test/Analysis/no-unreachable-dtors.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.Stats -verify -Wno-unreachable-code %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.Stats -verify -Wno-unreachable-code %s struct S { ~S(); Index: test/Analysis/non-diagnosable-assumptions.c =================================================================== --- test/Analysis/non-diagnosable-assumptions.c +++ test/Analysis/non-diagnosable-assumptions.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -w -analyze -analyzer-checker=core.DivideZero -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -w -analyze -analyzer-checker=core.DivideZero -analyzer-output=text -verify %s // This test file verifies the "Assuming..." diagnostic pieces that are being // reported when the branch condition was too complicated to explain. Index: test/Analysis/nonnull.m =================================================================== --- test/Analysis/nonnull.m +++ test/Analysis/nonnull.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -w -verify %s @interface MyObject - (void)takePointer:(void *)ptr __attribute__((nonnull(1))); Index: test/Analysis/null-deref-path-notes.m =================================================================== --- test/Analysis/null-deref-path-notes.m +++ test/Analysis/null-deref-path-notes.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-output=text -fblocks -verify -Wno-objc-root-class %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false -fblocks -Wno-objc-root-class %s -o %t +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-output=text -fblocks -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false -fblocks -Wno-objc-root-class %s -o %t // RUN: FileCheck --input-file=%t %s @interface Root { Index: test/Analysis/null-deref-ps-region.c =================================================================== --- test/Analysis/null-deref-ps-region.c +++ test/Analysis/null-deref-ps-region.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -std=gnu99 -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -std=gnu99 -analyzer-store=region -verify %s // expected-no-diagnostics Index: test/Analysis/null-deref-ps.c =================================================================== --- test/Analysis/null-deref-ps.c +++ test/Analysis/null-deref-ps.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -analyzer-purge=none -verify %s -Wno-error=return-type -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -verify %s -Wno-error=return-type +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -analyzer-purge=none -verify %s -Wno-error=return-type +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -verify %s -Wno-error=return-type typedef unsigned uintptr_t; Index: test/Analysis/nullability-no-arc.mm =================================================================== --- test/Analysis/nullability-no-arc.mm +++ test/Analysis/nullability-no-arc.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,nullability -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,nullability -verify %s #define nil 0 Index: test/Analysis/nullability.c =================================================================== --- test/Analysis/nullability.c +++ test/Analysis/nullability.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability -verify %s +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-checker=core,nullability -verify %s void it_takes_two(int a, int b); void function_pointer_arity_mismatch() { Index: test/Analysis/nullability.mm =================================================================== --- test/Analysis/nullability.mm +++ test/Analysis/nullability.mm @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -DNOSYSTEMHEADERS=0 -verify %s -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=true -DNOSYSTEMHEADERS=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -DNOSYSTEMHEADERS=0 -verify %s +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=true -DNOSYSTEMHEADERS=1 -verify %s #include "Inputs/system-header-simulator-for-nullability.h" Index: test/Analysis/nullability_nullonly.mm =================================================================== --- test/Analysis/nullability_nullonly.mm +++ test/Analysis/nullability_nullonly.mm @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -fobjc-arc -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull -DNOSYSTEMHEADERS=0 -verify %s -// RUN: %clang_cc1 -analyze -fobjc-arc -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=true -DNOSYSTEMHEADERS=1 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fobjc-arc -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull -DNOSYSTEMHEADERS=0 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -fobjc-arc -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull -analyzer-config nullability:NoDiagnoseCallsToSystemHeaders=true -DNOSYSTEMHEADERS=1 -verify %s #include "Inputs/system-header-simulator-for-nullability.h" Index: test/Analysis/nullptr.cpp =================================================================== --- test/Analysis/nullptr.cpp +++ test/Analysis/nullptr.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -Wno-conversion-null -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -Wno-conversion-null -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store region -verify %s void clang_analyzer_eval(int); Index: test/Analysis/number-object-conversion.c =================================================================== --- test/Analysis/number-object-conversion.c +++ test/Analysis/number-object-conversion.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -w -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -w -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -w -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -w -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify #define NULL ((void *)0) Index: test/Analysis/number-object-conversion.cpp =================================================================== --- test/Analysis/number-object-conversion.cpp +++ test/Analysis/number-object-conversion.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -w -std=c++11 -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -w -std=c++11 -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -w -std=c++11 -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -w -std=c++11 -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify #define NULL ((void *)0) #include "Inputs/system-header-simulator-cxx.h" // for nullptr Index: test/Analysis/number-object-conversion.m =================================================================== --- test/Analysis/number-object-conversion.m +++ test/Analysis/number-object-conversion.m @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -w -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -w -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -fobjc-arc -w -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -fobjc-arc -w -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -fblocks -w -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -fblocks -w -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -fblocks -fobjc-arc -w -analyze -analyzer-checker=osx.NumberObjectConversion %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -fblocks -fobjc-arc -w -analyze -analyzer-checker=osx.NumberObjectConversion -analyzer-config osx.NumberObjectConversion:Pedantic=true -DPEDANTIC %s -verify #include "Inputs/system-header-simulator-objc.h" Index: test/Analysis/objc-arc.m =================================================================== --- test/Analysis/objc-arc.m +++ test/Analysis/objc-arc.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,deadcode -verify -fblocks -analyzer-opt-analyze-nested-blocks -fobjc-arc -analyzer-config path-diagnostics-alternate=true -analyzer-output=plist-multi-file -o %t.plist %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,deadcode -verify -fblocks -analyzer-opt-analyze-nested-blocks -fobjc-arc -analyzer-config path-diagnostics-alternate=true -analyzer-output=plist-multi-file -o %t.plist %s // RUN: FileCheck --input-file=%t.plist %s typedef signed char BOOL; Index: test/Analysis/objc-bool.m =================================================================== --- test/Analysis/objc-bool.m +++ test/Analysis/objc-bool.m @@ -1,4 +1,4 @@ -// RUN: %clang --analyze %s -o %t -Xclang -verify +// RUN: %clang %z3 --analyze %s -o %t -Xclang -verify // expected-no-diagnostics // Test handling of ObjC bool literals. Index: test/Analysis/objc-boxing.m =================================================================== --- test/Analysis/objc-boxing.m +++ test/Analysis/objc-boxing.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-objc-literal-conversion -analyze -analyzer-checker=core,unix.Malloc,osx.cocoa.NonNilReturnValue,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -Wno-objc-literal-conversion -analyze -analyzer-checker=core,unix.Malloc,osx.cocoa.NonNilReturnValue,debug.ExprInspection -analyzer-store=region -verify %s void clang_analyzer_eval(int); Index: test/Analysis/objc-for.m =================================================================== --- test/Analysis/objc-for.m +++ test/Analysis/objc-for.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.Loops,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.Loops,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/objc-message.m =================================================================== --- test/Analysis/objc-message.m +++ test/Analysis/objc-message.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s extern void clang_analyzer_warnIfReached(); void clang_analyzer_eval(int); Index: test/Analysis/objc-method-coverage.m =================================================================== --- test/Analysis/objc-method-coverage.m +++ test/Analysis/objc-method-coverage.m @@ -1,5 +1,5 @@ // REQUIRES: asserts -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-stats -fblocks %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-stats -fblocks %s 2>&1 | FileCheck %s @interface I int f() { return 0; Index: test/Analysis/objc-properties.m =================================================================== --- test/Analysis/objc-properties.m +++ test/Analysis/objc-properties.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.osx.cocoa.DirectIvarAssignment -verify -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.osx.cocoa.DirectIvarAssignment -verify -fblocks %s typedef signed char BOOL; @protocol NSObject - (BOOL)isEqual:(id)object; @end Index: test/Analysis/objc-radar17039661.m =================================================================== --- test/Analysis/objc-radar17039661.m +++ test/Analysis/objc-radar17039661.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t // RUN: FileCheck --input-file=%t %s @class NSString; typedef long NSInteger; Index: test/Analysis/objc-string.mm =================================================================== --- test/Analysis/objc-string.mm +++ test/Analysis/objc-string.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -Wno-objc-literal-conversion %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -Wno-objc-literal-conversion %s void clang_analyzer_eval(bool); @class NSString; Index: test/Analysis/objc-subscript.m =================================================================== --- test/Analysis/objc-subscript.m +++ test/Analysis/objc-subscript.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify -Wno-objc-root-class %s typedef signed char BOOL; typedef unsigned int NSUInteger; Index: test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m =================================================================== --- test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m +++ test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.osx.cocoa.DirectIvarAssignmentForAnnotatedFunctions -verify -fblocks %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.osx.cocoa.DirectIvarAssignmentForAnnotatedFunctions -verify -fblocks %s typedef signed char BOOL; @protocol NSObject - (BOOL)isEqual:(id)object; @end Index: test/Analysis/objc_invalidation.m =================================================================== --- test/Analysis/objc_invalidation.m +++ test/Analysis/objc_invalidation.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.InstanceVariableInvalidation -DRUN_IVAR_INVALIDATION -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.MissingInvalidationMethod -DRUN_MISSING_INVALIDATION_METHOD -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.InstanceVariableInvalidation -DRUN_IVAR_INVALIDATION -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.osx.cocoa.MissingInvalidationMethod -DRUN_MISSING_INVALIDATION_METHOD -verify %s extern void __assert_fail (__const char *__assertion, __const char *__file, unsigned int __line, __const char *__function) __attribute__ ((__noreturn__)); Index: test/Analysis/operator-calls.cpp =================================================================== --- test/Analysis/operator-calls.cpp +++ test/Analysis/operator-calls.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -verify %s void clang_analyzer_eval(bool); struct X0 { }; Index: test/Analysis/out-of-bounds-new.cpp =================================================================== --- test/Analysis/out-of-bounds-new.cpp +++ test/Analysis/out-of-bounds-new.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -Wno-array-bounds -analyze -analyzer-checker=unix,core,alpha.security.ArrayBoundV2 -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -Wno-array-bounds -analyze -analyzer-checker=unix,core,alpha.security.ArrayBoundV2 -verify %s // Tests doing an out-of-bounds access after the end of an array using: // - constant integer index Index: test/Analysis/out-of-bounds.c =================================================================== --- test/Analysis/out-of-bounds.c +++ test/Analysis/out-of-bounds.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,alpha.security.ArrayBoundV2,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,alpha.security.ArrayBoundV2,debug.ExprInspection -verify %s void clang_analyzer_eval(int); Index: test/Analysis/outofbound-notwork.c =================================================================== --- test/Analysis/outofbound-notwork.c +++ test/Analysis/outofbound-notwork.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,alpha.security.ArrayBound -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,alpha.security.ArrayBound -analyzer-store=region -verify %s // XFAIL: * // Once we better handle modeling of sizes of VLAs, we can pull this back Index: test/Analysis/outofbound.c =================================================================== --- test/Analysis/outofbound.c +++ test/Analysis/outofbound.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,unix,alpha.security.ArrayBound -analyzer-store=region -verify -analyzer-config unix:Optimistic=true %s +// RUN: %clang_cc1 %z3_cc1 -Wno-array-bounds -analyze -analyzer-checker=core,unix,alpha.security.ArrayBound -analyzer-store=region -verify -analyzer-config unix:Optimistic=true %s typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); Index: test/Analysis/override-werror.c =================================================================== --- test/Analysis/override-werror.c +++ test/Analysis/override-werror.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -Werror %s -analyzer-store=region -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -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 Index: test/Analysis/padding_c.c =================================================================== --- test/Analysis/padding_c.c +++ test/Analysis/padding_c.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.performance -analyzer-config optin.performance.Padding:AllowedPad=2 -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=optin.performance -analyzer-config optin.performance.Padding:AllowedPad=2 -verify %s #if __has_include() #include Index: test/Analysis/padding_cpp.cpp =================================================================== --- test/Analysis/padding_cpp.cpp +++ test/Analysis/padding_cpp.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++14 -analyze -analyzer-checker=optin.performance -analyzer-config optin.performance.Padding:AllowedPad=2 -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++14 -analyze -analyzer-checker=optin.performance -analyzer-config optin.performance.Padding:AllowedPad=2 -verify %s // Make sure that the C cases still work fine, even when compiled as C++. #include "padding_c.c" Index: test/Analysis/padding_message.cpp =================================================================== --- test/Analysis/padding_message.cpp +++ test/Analysis/padding_message.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-linux -std=c++14 -analyze -analyzer-checker=optin.performance -analyzer-config optin.performance.Padding:AllowedPad=2 -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-linux -std=c++14 -analyze -analyzer-checker=optin.performance -analyzer-config optin.performance.Padding:AllowedPad=2 -verify %s // expected-warning@+7{{\ Excessive padding in 'struct IntSandwich' (6 padding bytes, where 2 is optimal). \ Index: test/Analysis/plist-html-macros.c =================================================================== --- test/Analysis/plist-html-macros.c +++ test/Analysis/plist-html-macros.c @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s // (sanity check) // RUN: rm -rf %t.dir // RUN: mkdir -p %t.dir -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-html -o %t.dir/index.plist %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-html -o %t.dir/index.plist %s // RUN: ls %t.dir | grep '\.html' | count 1 // RUN: grep '\.html' %t.dir/index.plist | count 1 Index: test/Analysis/plist-macros.cpp =================================================================== --- test/Analysis/plist-macros.cpp +++ test/Analysis/plist-macros.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -analyzer-eagerly-assume -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -analyzer-eagerly-assume -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=ture %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix -analyzer-eagerly-assume -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix -analyzer-eagerly-assume -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=ture %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s Index: test/Analysis/plist-output-alternate.m =================================================================== --- test/Analysis/plist-output-alternate.m +++ test/Analysis/plist-output-alternate.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -fblocks -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -fblocks -analyzer-output=plist -analyzer-config path-diagnostics-alternate=false -o %t %s // RUN: FileCheck --input-file %t %s void test_null_init(void) { Index: test/Analysis/plist-output.m =================================================================== --- test/Analysis/plist-output.m +++ test/Analysis/plist-output.m @@ -1,4 +1,4 @@ -// RUN: %clang --analyze %s -Xanalyzer -analyzer-checker=osx.cocoa.RetainCount -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t.plist +// RUN: %clang %z3 --analyze %s -Xanalyzer -analyzer-checker=osx.cocoa.RetainCount -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t.plist // RUN: FileCheck --input-file=%t.plist %s void test_null_init(void) { Index: test/Analysis/pointer-to-member.cpp =================================================================== --- test/Analysis/pointer-to-member.cpp +++ test/Analysis/pointer-to-member.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/pr22954.c =================================================================== --- test/Analysis/pr22954.c +++ test/Analysis/pr22954.c @@ -3,7 +3,7 @@ // At the moment the whole of the destination array content is invalidated. // If a.s1 region has a symbolic offset, the whole region of 'a' is invalidated. // Specific triple set to test structures of size 0. -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-store=region -verify %s typedef __typeof(sizeof(int)) size_t; Index: test/Analysis/pr4209.m =================================================================== --- test/Analysis/pr4209.m +++ test/Analysis/pr4209.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-incomplete-implementation -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -Wno-incomplete-implementation -verify %s // This test case was crashing due to how CFRefCount.cpp resolved the // ObjCInterfaceDecl* and ClassName in EvalObjCMessageExpr. Index: test/Analysis/pr_2542_rdar_6793404.m =================================================================== --- test/Analysis/pr_2542_rdar_6793404.m +++ test/Analysis/pr_2542_rdar_6793404.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -pedantic -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -pedantic -analyzer-store=region -verify -Wno-objc-root-class %s // BEGIN delta-debugging reduced header stuff Index: test/Analysis/pr_4164.c =================================================================== --- test/Analysis/pr_4164.c +++ test/Analysis/pr_4164.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics // PR 4164: http://llvm.org/bugs/show_bug.cgi?id=4164 Index: test/Analysis/properties.m =================================================================== --- test/Analysis/properties.m +++ test/Analysis/properties.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.Dealloc,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.Dealloc,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class -fobjc-arc %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.Dealloc,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.Dealloc,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class -fobjc-arc %s void clang_analyzer_eval(int); Index: test/Analysis/properties.mm =================================================================== --- test/Analysis/properties.mm +++ test/Analysis/properties.mm @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class -fobjc-arc %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class -fobjc-arc %s void clang_analyzer_eval(bool); void clang_analyzer_checkInlined(bool); Index: test/Analysis/pthreadlock.c =================================================================== --- test/Analysis/pthreadlock.c +++ test/Analysis/pthreadlock.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.unix.PthreadLock -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.unix.PthreadLock -verify %s // Tests performing normal locking patterns and wrong locking orders Index: test/Analysis/ptr-arith.c =================================================================== --- test/Analysis/ptr-arith.c +++ test/Analysis/ptr-arith.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple x86_64-apple-darwin9 -Wno-tautological-pointer-compare %s -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple i686-apple-darwin9 -Wno-tautological-pointer-compare %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple x86_64-apple-darwin9 -Wno-tautological-pointer-compare %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple i686-apple-darwin9 -Wno-tautological-pointer-compare %s void clang_analyzer_eval(int); Index: test/Analysis/ptr-arith.cpp =================================================================== --- test/Analysis/ptr-arith.cpp +++ test/Analysis/ptr-arith.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-unused-value -std=c++14 -analyze -analyzer-checker=core,debug.ExprInspection,alpha.core.PointerArithm -verify %s +// RUN: %clang_cc1 %z3_cc1 -Wno-unused-value -std=c++14 -analyze -analyzer-checker=core,debug.ExprInspection,alpha.core.PointerArithm -verify %s struct X { int *p; int zero; Index: test/Analysis/qt_malloc.cpp =================================================================== --- test/Analysis/qt_malloc.cpp +++ test/Analysis/qt_malloc.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -analyze -analyzer-checker=core,alpha.deadcode.UnreachableCode,alpha.core.CastSize,unix.Malloc,cplusplus -analyzer-store=region -verify %s // expected-no-diagnostics #include "Inputs/qt-simulator.h" Index: test/Analysis/range_casts.c =================================================================== --- test/Analysis/range_casts.c +++ test/Analysis/range_casts.c @@ -1,5 +1,5 @@ // This test checks that intersecting ranges does not cause 'system is over constrained' assertions in the case of eg: 32 bits unsigned integers getting their range from 64 bits signed integers. -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-store=region -verify %s void clang_analyzer_warnIfReached(); Index: test/Analysis/rdar-6442306-1.m =================================================================== --- test/Analysis/rdar-6442306-1.m +++ test/Analysis/rdar-6442306-1.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-disable-checker=alpha.core.PointerArithm %s -analyzer-store=region -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-disable-checker=alpha.core.PointerArithm %s -analyzer-store=region -verify // expected-no-diagnostics typedef int bar_return_t; Index: test/Analysis/rdar-6540084.m =================================================================== --- test/Analysis/rdar-6540084.m +++ test/Analysis/rdar-6540084.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-checker=deadcode.DeadStores -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-checker=deadcode.DeadStores -verify %s // // This test exercises the live variables analysis (LiveVariables.cpp). // The case originally identified a non-termination bug. Index: test/Analysis/rdar-6541136-region.c =================================================================== --- test/Analysis/rdar-6541136-region.c +++ test/Analysis/rdar-6541136-region.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -analyze -analyzer-checker=core,alpha.security.ArrayBound -analyzer-store=region %s +// RUN: %clang_cc1 %z3_cc1 -verify -analyze -analyzer-checker=core,alpha.security.ArrayBound -analyzer-store=region %s struct tea_cheese { unsigned magic; }; typedef struct tea_cheese kernel_tea_cheese_t; Index: test/Analysis/rdar-6562655.m =================================================================== --- test/Analysis/rdar-6562655.m +++ test/Analysis/rdar-6562655.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics // // This test case mainly checks that the retain/release checker doesn't crash Index: test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m =================================================================== --- test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m +++ test/Analysis/rdar-6600344-nil-receiver-undefined-struct-ret.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify -Wno-objc-root-class %s // expected-no-diagnostics typedef struct Foo { int x; } Bar; Index: test/Analysis/rdar-7168531.m =================================================================== --- test/Analysis/rdar-7168531.m +++ test/Analysis/rdar-7168531.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -triple i386-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -analyzer-store=region %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -triple i386-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -analyzer-store=region %s // Note that the target triple is important for this test case. It specifies that we use the // fragile Objective-C ABI. Index: test/Analysis/redefined_system.c =================================================================== --- test/Analysis/redefined_system.c +++ test/Analysis/redefined_system.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx,unix,core,alpha.security.taint -w -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx,unix,core,alpha.security.taint -w -verify %s // expected-no-diagnostics // Make sure we don't crash when someone redefines a system function we reason about. Index: test/Analysis/refcnt_naming.m =================================================================== --- test/Analysis/refcnt_naming.m +++ test/Analysis/refcnt_naming.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-config ipa=none -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-config ipa=none -analyzer-store=region -verify %s typedef const struct __CFString * CFStringRef; typedef const struct __CFAllocator * CFAllocatorRef; Index: test/Analysis/reference.cpp =================================================================== --- test/Analysis/reference.cpp +++ test/Analysis/reference.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -Wno-null-dereference -Wno-tautological-undefined-compare %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -Wno-null-dereference -Wno-tautological-undefined-compare %s void clang_analyzer_eval(bool); Index: test/Analysis/reference.mm =================================================================== --- test/Analysis/reference.mm +++ test/Analysis/reference.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -Wno-null-dereference %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify -Wno-null-dereference %s @interface Foo - (int &)ref; Index: test/Analysis/region-1.m =================================================================== --- test/Analysis/region-1.m +++ test/Analysis/region-1.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics // // This test case simply should not crash. It evaluates the logic of not Index: test/Analysis/region-store.c =================================================================== --- test/Analysis/region-store.c +++ test/Analysis/region-store.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix,debug.ExprInspection -verify %s int printf(const char *restrict,...); Index: test/Analysis/region-store.cpp =================================================================== --- test/Analysis/region-store.cpp +++ test/Analysis/region-store.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix -verify %s // expected-no-diagnostics class Loc { Index: test/Analysis/reinterpret-cast.cpp =================================================================== --- test/Analysis/reinterpret-cast.cpp +++ test/Analysis/reinterpret-cast.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/retain-release-arc.m =================================================================== --- test/Analysis/retain-release-arc.m +++ test/Analysis/retain-release-arc.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -fobjc-arc -fblocks -verify -Wno-objc-root-class %s -analyzer-output=text -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -fblocks -verify -Wno-objc-root-class %s -analyzer-output=text +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -fobjc-arc -fblocks -verify -Wno-objc-root-class %s -analyzer-output=text +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -fblocks -verify -Wno-objc-root-class %s -analyzer-output=text typedef __typeof(sizeof(int)) size_t; Index: test/Analysis/retain-release-cache-out.m =================================================================== --- test/Analysis/retain-release-cache-out.m +++ test/Analysis/retain-release-cache-out.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze %s -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -verify +// RUN: %clang_cc1 %z3_cc1 -analyze %s -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -verify // This test is checking behavior when a single checker runs only with the core // checkers, testing that the traversal order in the CFG does not affect the Index: test/Analysis/retain-release-cf-audited.m =================================================================== --- test/Analysis/retain-release-cf-audited.m +++ test/Analysis/retain-release-cf-audited.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -verify %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -verify %s -x objective-c++ +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -verify %s -x objective-c++ // The special thing about this file is that CFRetain and CFRelease are marked // as cf_audited_transfer. Index: test/Analysis/retain-release-gc-only.m =================================================================== --- test/Analysis/retain-release-gc-only.m +++ test/Analysis/retain-release-gc-only.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.NSAutoreleasePool -analyzer-store=region -fobjc-gc-only -fblocks -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -triple %itanium_abi_triple -analyze -analyzer-checker=core,osx.cocoa.RetainCount,osx.cocoa.NSAutoreleasePool -analyzer-store=region -fobjc-gc-only -fblocks -verify -Wno-objc-root-class %s //===----------------------------------------------------------------------===// // Header stuff. Index: test/Analysis/retain-release-inline.m =================================================================== --- test/Analysis/retain-release-inline.m +++ test/Analysis/retain-release-inline.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -fblocks -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Mac OS X headers: Index: test/Analysis/retain-release-path-notes-gc.m =================================================================== --- test/Analysis/retain-release-path-notes-gc.m +++ test/Analysis/retain-release-path-notes-gc.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fobjc-gc-only -analyzer-output=text -verify %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fobjc-gc-only -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fobjc-gc-only -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fobjc-gc-only -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t.plist // RUN: FileCheck --input-file=%t.plist %s /*** Index: test/Analysis/retain-release-path-notes.m =================================================================== --- test/Analysis/retain-release-path-notes.m +++ test/Analysis/retain-release-path-notes.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=text -verify %s -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=plist-multi-file -analyzer-config path-diagnostics-alternate=false %s -o %t // RUN: FileCheck --input-file=%t %s /*** Index: test/Analysis/retain-release-region-store.m =================================================================== --- test/Analysis/retain-release-region-store.m +++ test/Analysis/retain-release-region-store.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple %itanium_abi_triple -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -analyzer-max-loop 6 -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple %itanium_abi_triple -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -analyzer-max-loop 6 -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Index: test/Analysis/retain-release.m =================================================================== --- test/Analysis/retain-release.m +++ test/Analysis/retain-release.m @@ -1,6 +1,6 @@ // RUN: rm -f %t.objc.plist %t.objcpp.plist -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify -Wno-objc-root-class %s -analyzer-output=plist -o %t.objc.plist -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify -x objective-c++ -std=gnu++98 -Wno-objc-root-class %s -analyzer-output=plist -o %t.objcpp.plist +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify -Wno-objc-root-class %s -analyzer-output=plist -o %t.objc.plist +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify -x objective-c++ -std=gnu++98 -Wno-objc-root-class %s -analyzer-output=plist -o %t.objcpp.plist // FIXLATER: cat %t.objc.plist ; FileCheck --input-file=%t.objc.plist %s // FIXLATER: cat %t.objcpp.plist ; FileCheck --input-file=%t.objcpp.plist %s Index: test/Analysis/retain-release.mm =================================================================== --- test/Analysis/retain-release.mm +++ test/Analysis/retain-release.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -fblocks -verify %s #if __has_feature(attribute_ns_returns_retained) #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) Index: test/Analysis/return-ptr-range.cpp =================================================================== --- test/Analysis/return-ptr-range.cpp +++ test/Analysis/return-ptr-range.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.security.ReturnPtrRange -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.security.ReturnPtrRange -verify %s int arr[10]; int *ptr; Index: test/Analysis/security-syntax-checks-no-emit.c =================================================================== --- test/Analysis/security-syntax-checks-no-emit.c +++ test/Analysis/security-syntax-checks-no-emit.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple i686-pc-linux-gnu -analyze -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i686-pc-linux-gnu -analyze -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify // expected-no-diagnostics // This file complements 'security-syntax-checks.m', but tests that we omit Index: test/Analysis/security-syntax-checks.m =================================================================== --- test/Analysis/security-syntax-checks.m +++ test/Analysis/security-syntax-checks.m @@ -1,11 +1,11 @@ -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -DUSE_BUILTINS -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify -// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify -// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify -// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -DUSE_BUILTINS -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify -// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify -// RUN: %clang_cc1 -triple x86_64-unknown-cloudabi -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -DUSE_BUILTINS -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple i386-apple-darwin10 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-cloudabi -analyze -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-cloudabi -analyze -DUSE_BUILTINS -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-cloudabi -analyze -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-cloudabi -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=security.insecureAPI,security.FloatLoopCounter %s -verify #ifdef USE_BUILTINS # define BUILTIN(f) __builtin_ ## f Index: test/Analysis/self-assign.cpp =================================================================== --- test/Analysis/self-assign.cpp +++ test/Analysis/self-assign.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -analyze -analyzer-checker=core,cplusplus,unix.Malloc,debug.ExprInspection %s -verify -analyzer-output=text +// RUN: %clang_cc1 %z3_cc1 -std=c++11 -analyze -analyzer-checker=core,cplusplus,unix.Malloc,debug.ExprInspection %s -verify -analyzer-output=text extern "C" char *strdup(const char* s); extern "C" void free(void* ptr); Index: test/Analysis/self-init.m =================================================================== --- test/Analysis/self-init.m +++ test/Analysis/self-init.m @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.SelfInit -analyzer-config ipa=dynamic -fno-builtin %s -verify -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.SelfInit -fno-builtin %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.SelfInit -analyzer-config ipa=dynamic -fno-builtin %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.SelfInit -fno-builtin %s -verify @class NSZone, NSCoder; @protocol NSObject Index: test/Analysis/shallow-mode.m =================================================================== --- test/Analysis/shallow-mode.m +++ test/Analysis/shallow-mode.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config mode=shallow -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config mode=shallow -verify %s // expected-no-diagnostics void clang_analyzer_checkInlined(unsigned); Index: test/Analysis/simple-stream-checks.c =================================================================== --- test/Analysis/simple-stream-checks.c +++ test/Analysis/simple-stream-checks.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.unix.SimpleStream -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.unix.SimpleStream -verify %s #include "Inputs/system-header-simulator-for-simple-stream.h" Index: test/Analysis/sizeofpointer.c =================================================================== --- test/Analysis/sizeofpointer.c +++ test/Analysis/sizeofpointer.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.SizeofPtr -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.core.SizeofPtr -verify %s struct s { }; Index: test/Analysis/stack-addr-ps.c =================================================================== --- test/Analysis/stack-addr-ps.c +++ test/Analysis/stack-addr-ps.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s int* f1() { int x = 0; Index: test/Analysis/stack-addr-ps.cpp =================================================================== --- test/Analysis/stack-addr-ps.cpp +++ test/Analysis/stack-addr-ps.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s -Wno-undefined-bool-conversion +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s -Wno-undefined-bool-conversion typedef __INTPTR_TYPE__ intptr_t; Index: test/Analysis/stack-block-returned.cpp =================================================================== --- test/Analysis/stack-block-returned.cpp +++ test/Analysis/stack-block-returned.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s typedef void (^bptr)(void); Index: test/Analysis/stackaddrleak.c =================================================================== --- test/Analysis/stackaddrleak.c +++ test/Analysis/stackaddrleak.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -std=c99 -Dbool=_Bool -Wno-bool-conversion %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -x c++ -Wno-bool-conversion %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify -std=c99 -Dbool=_Bool -Wno-bool-conversion %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify -x c++ -Wno-bool-conversion %s typedef __INTPTR_TYPE__ intptr_t; char const *p; Index: test/Analysis/static_local.m =================================================================== --- test/Analysis/static_local.m +++ test/Analysis/static_local.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify -Wno-objc-root-class %s // expected-no-diagnostics // Test reasoning about static locals in ObjCMethods. Index: test/Analysis/stats.c =================================================================== --- test/Analysis/stats.c +++ test/Analysis/stats.c @@ -1,5 +1,5 @@ // REQUIRES: asserts -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-stats %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-stats %s 2>&1 | FileCheck %s void foo() { int x; Index: test/Analysis/std-c-library-functions.c =================================================================== --- test/Analysis/std-c-library-functions.c +++ test/Analysis/std-c-library-functions.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s -// RUN: %clang_cc1 -triple i686-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s -// RUN: %clang_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s -// RUN: %clang_cc1 -triple armv7-a15-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s -// RUN: %clang_cc1 -triple thumbv7-a15-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple i686-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple armv7-a15-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple thumbv7-a15-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s void clang_analyzer_eval(int); @@ -57,8 +57,7 @@ size_t y = fread(buf, sizeof(int), 10, fp); clang_analyzer_eval(y <= 10); // expected-warning{{TRUE}} size_t z = fwrite(buf, sizeof(int), y, fp); - // FIXME: should be TRUE once symbol-symbol constraint support is improved. - clang_analyzer_eval(z <= y); // expected-warning{{UNKNOWN}} + clang_analyzer_eval(z <= y); // expected-warning{{TRUE}} } ssize_t getline(char **, size_t *, FILE *); Index: test/Analysis/std-c-library-functions.cpp =================================================================== --- test/Analysis/std-c-library-functions.cpp +++ test/Analysis/std-c-library-functions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-unknown-linux -analyze -analyzer-checker=unix.StdCLibraryFunctions,debug.ExprInspection -verify %s // Test that we don't model functions with broken prototypes. // Because they probably work differently as well. Index: test/Analysis/stream.c =================================================================== --- test/Analysis/stream.c +++ test/Analysis/stream.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.unix.Stream -analyzer-store region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.unix.Stream -analyzer-store region -verify %s typedef __typeof__(sizeof(int)) size_t; typedef struct _IO_FILE FILE; Index: test/Analysis/string-fail.c =================================================================== --- test/Analysis/string-fail.c +++ test/Analysis/string-fail.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s -// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,unix.cstring,debug.ExprInspection -analyzer-store=region -verify %s // XFAIL: * // This file is for tests that may eventually go into string.c, or may be Index: test/Analysis/string.c =================================================================== --- test/Analysis/string.c +++ test/Analysis/string.c @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s -// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s -// RUN: %clang_cc1 -analyze -DVARIANT -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s -// RUN: %clang_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=alpha.security.taint,core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -DUSE_BUILTINS -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -DVARIANT -analyzer-checker=core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -DUSE_BUILTINS -DVARIANT -analyzer-checker=alpha.security.taint,core,unix.cstring,alpha.unix.cstring,debug.ExprInspection -analyzer-store=region -Wno-null-dereference -verify %s //===----------------------------------------------------------------------=== // Declarations Index: test/Analysis/superclass.m =================================================================== --- test/Analysis/superclass.m +++ test/Analysis/superclass.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=osx.cocoa.MissingSuperCall -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-checker=osx.cocoa.MissingSuperCall -verify -Wno-objc-root-class %s // Define used Classes @protocol NSObject Index: test/Analysis/svalbuilder-logic.c =================================================================== --- test/Analysis/svalbuilder-logic.c +++ test/Analysis/svalbuilder-logic.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix -verify %s // expected-no-diagnostics // Testing core functionality of the SValBuilder. Index: test/Analysis/switch-case.c =================================================================== --- test/Analysis/switch-case.c +++ test/Analysis/switch-case.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s void clang_analyzer_eval(int); void clang_analyzer_warnIfReached(); Index: test/Analysis/symbol-reaper.c =================================================================== --- test/Analysis/symbol-reaper.c +++ test/Analysis/symbol-reaper.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.ExprInspection -verify %s void clang_analyzer_eval(int); void clang_analyzer_warnOnDeadSymbol(int); Index: test/Analysis/taint-generic.c =================================================================== --- test/Analysis/taint-generic.c +++ test/Analysis/taint-generic.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.security.taint,core,alpha.security.ArrayBoundV2 -Wno-format-security -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.security.taint,core,alpha.security.ArrayBoundV2 -Wno-format-security -verify %s int scanf(const char *restrict format, ...); int getchar(void); Index: test/Analysis/taint-tester.c =================================================================== --- test/Analysis/taint-tester.c +++ test/Analysis/taint-tester.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wno-int-to-pointer-cast -analyze -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify +// RUN: %clang_cc1 %z3_cc1 -Wno-int-to-pointer-cast -analyze -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify #include "Inputs/system-header-simulator.h" Index: test/Analysis/taint-tester.cpp =================================================================== --- test/Analysis/taint-tester.cpp +++ test/Analysis/taint-tester.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify // expected-no-diagnostics typedef struct _FILE FILE; Index: test/Analysis/taint-tester.m =================================================================== --- test/Analysis/taint-tester.m +++ test/Analysis/taint-tester.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify // expected-no-diagnostics #import Index: test/Analysis/temp-obj-dtors-cfg-output.cpp =================================================================== --- test/Analysis/temp-obj-dtors-cfg-output.cpp +++ test/Analysis/temp-obj-dtors-cfg-output.cpp @@ -1,7 +1,7 @@ // RUN: rm -f %t -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-temporary-dtors=true -std=c++98 %s > %t 2>&1 +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-temporary-dtors=true -std=c++98 %s > %t 2>&1 // RUN: FileCheck --input-file=%t -check-prefix=CXX98 -check-prefix=CHECK %s -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-temporary-dtors=true -std=c++11 %s > %t 2>&1 +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-temporary-dtors=true -std=c++11 %s > %t 2>&1 // RUN: FileCheck --input-file=%t -check-prefix=CXX11 -check-prefix=CHECK %s class A { Index: test/Analysis/templates.cpp =================================================================== --- test/Analysis/templates.cpp +++ test/Analysis/templates.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fblocks -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fblocks -analyzer-config c++-template-inlining=false -DNO_INLINE -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -fblocks -analyzer-config c++-template-inlining=false -DNO_INLINE -verify %s void clang_analyzer_eval(bool); Index: test/Analysis/temporaries.cpp =================================================================== --- test/Analysis/temporaries.cpp +++ test/Analysis/temporaries.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -w -std=c++03 %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -w -std=c++11 %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -DTEMPORARY_DTORS -verify -w -analyzer-config cfg-temporary-dtors=true %s -std=c++11 +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -w -std=c++03 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -w -std=c++11 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -DTEMPORARY_DTORS -verify -w -analyzer-config cfg-temporary-dtors=true %s -std=c++11 extern bool clang_analyzer_eval(bool); extern bool clang_analyzer_warnIfReached(); Index: test/Analysis/test-after-div-zero.c =================================================================== --- test/Analysis/test-after-div-zero.c +++ test/Analysis/test-after-div-zero.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c99 -Dbool=_Bool -analyze -analyzer-checker=core,alpha.core.TestAfterDivZero -analyzer-output=text -verify %s -// RUN: %clang_cc1 -x c++ -analyze -analyzer-checker=core,alpha.core.TestAfterDivZero -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=c99 -Dbool=_Bool -analyze -analyzer-checker=core,alpha.core.TestAfterDivZero -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -x c++ -analyze -analyzer-checker=core,alpha.core.TestAfterDivZero -analyzer-output=text -verify %s int var; Index: test/Analysis/test-include-cpp.cpp =================================================================== --- test/Analysis/test-include-cpp.cpp +++ test/Analysis/test-include-cpp.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s #include "test-include-cpp.h" Index: test/Analysis/test-include.c =================================================================== --- test/Analysis/test-include.c +++ test/Analysis/test-include.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s #include "test-include.h" #define DIVYX(X,Y) Y/X Index: test/Analysis/test-objc-non-nil-return-value-checker.m =================================================================== --- test/Analysis/test-objc-non-nil-return-value-checker.m +++ test/Analysis/test-objc-non-nil-return-value-checker.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=osx.cocoa.NonNilReturnValue,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=osx.cocoa.NonNilReturnValue,debug.ExprInspection -verify %s typedef unsigned int NSUInteger; typedef signed char BOOL; Index: test/Analysis/test-variably-modified-types.c =================================================================== --- test/Analysis/test-variably-modified-types.c +++ test/Analysis/test-variably-modified-types.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyze-function=testVariablyModifiedTypes -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyze-function=testVariablyModifiedTypes -verify %s // Test that we process variably modified type correctly - the call graph construction should pick up function_with_bug while recursively visiting test_variably_modifiable_types. unsigned getArraySize(int *x) { Index: test/Analysis/traversal-algorithm.mm =================================================================== --- test/Analysis/traversal-algorithm.mm +++ test/Analysis/traversal-algorithm.mm @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpTraversal -analyzer-max-loop 4 -std=c++11 %s | FileCheck -check-prefix=DFS %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=debug.DumpTraversal -analyzer-max-loop 4 -std=c++11 %s | FileCheck -check-prefix=DFS %s int a(); int b(); Index: test/Analysis/traversal-begin-end-function.c =================================================================== --- test/Analysis/traversal-begin-end-function.c +++ test/Analysis/traversal-begin-end-function.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal %s | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal %s | FileCheck %s void inline_callee(int i); Index: test/Analysis/traversal-path-unification.c =================================================================== --- test/Analysis/traversal-path-unification.c +++ test/Analysis/traversal-path-unification.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal %s | FileCheck %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal -DUSE_EXPR %s | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal %s | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.DumpTraversal -DUSE_EXPR %s | FileCheck %s int a(); int b(); Index: test/Analysis/ubigraph-viz.cpp =================================================================== --- test/Analysis/ubigraph-viz.cpp +++ test/Analysis/ubigraph-viz.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API -analyzer-viz-egraph-ubigraph -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.API -analyzer-viz-egraph-ubigraph -verify %s // expected-no-diagnostics int f(int x) { Index: test/Analysis/undef-buffers.c =================================================================== --- test/Analysis/undef-buffers.c +++ test/Analysis/undef-buffers.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix,core.uninitialized -analyzer-store=region -verify -analyzer-config unix:Optimistic=true %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix,core.uninitialized -analyzer-store=region -verify -analyzer-config unix:Optimistic=true %s typedef __typeof(sizeof(int)) size_t; void *malloc(size_t); void free(void *); Index: test/Analysis/uninit-const.c =================================================================== --- test/Analysis/uninit-const.c +++ test/Analysis/uninit-const.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=unix.Malloc,core,alpha.core.CallAndMessageUnInitRefArg -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=unix.Malloc,core,alpha.core.CallAndMessageUnInitRefArg -analyzer-output=text -verify %s // Passing uninitialized const data to function #include "Inputs/system-header-simulator.h" Index: test/Analysis/uninit-const.cpp =================================================================== --- test/Analysis/uninit-const.cpp +++ test/Analysis/uninit-const.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,core,alpha.core.CallAndMessageUnInitRefArg -analyzer-output=text -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,core,alpha.core.CallAndMessageUnInitRefArg -analyzer-output=text -verify %s // Passing uninitialized const data to unknown function #include "Inputs/system-header-simulator-cxx.h" Index: test/Analysis/uninit-msg-expr.m =================================================================== --- test/Analysis/uninit-msg-expr.m +++ test/Analysis/uninit-msg-expr.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Index: test/Analysis/uninit-ps-rdar6145427.m =================================================================== --- test/Analysis/uninit-ps-rdar6145427.m +++ test/Analysis/uninit-ps-rdar6145427.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -analyzer-store=region %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify -analyzer-store=region %s // Delta-Debugging reduced preamble. typedef signed char BOOL; Index: test/Analysis/uninit-sometimes.cpp =================================================================== --- test/Analysis/uninit-sometimes.cpp +++ test/Analysis/uninit-sometimes.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=gnu++11 -Wsometimes-uninitialized -verify %s -// RUN: %clang_cc1 -std=gnu++11 -Wsometimes-uninitialized -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s +// RUN: %clang_cc1 %z3_cc1 -std=gnu++11 -Wsometimes-uninitialized -verify %s +// RUN: %clang_cc1 %z3_cc1 -std=gnu++11 -Wsometimes-uninitialized -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s bool maybe(); Index: test/Analysis/uninit-vals-ps-region.m =================================================================== --- test/Analysis/uninit-vals-ps-region.m +++ test/Analysis/uninit-vals-ps-region.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-store=region -analyzer-checker=core -verify %s struct s { int data; Index: test/Analysis/uninit-vals-ps.c =================================================================== --- test/Analysis/uninit-vals-ps.c +++ test/Analysis/uninit-vals-ps.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s struct FPRec { void (*my_func)(int * x); Index: test/Analysis/uninit-vals-union.c =================================================================== --- test/Analysis/uninit-vals-union.c +++ test/Analysis/uninit-vals-union.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core.builtin -analyzer-store=region -verify -Wno-unused %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core.builtin -analyzer-store=region -verify -Wno-unused %s typedef union { int y; Index: test/Analysis/uninit-vals.cpp =================================================================== --- test/Analysis/uninit-vals.cpp +++ test/Analysis/uninit-vals.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core.builtin -verify -DCHECK_FOR_CRASH %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core.builtin -verify -DCHECK_FOR_CRASH %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s #ifdef CHECK_FOR_CRASH // expected-no-diagnostics Index: test/Analysis/uninit-vals.m =================================================================== --- test/Analysis/uninit-vals.m +++ test/Analysis/uninit-vals.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -verify %s typedef unsigned int NSUInteger; typedef __typeof__(sizeof(int)) size_t; Index: test/Analysis/unions-region.m =================================================================== --- test/Analysis/unions-region.m +++ test/Analysis/unions-region.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -analyzer-store=region %s -verify // expected-no-diagnostics //===-- unions-region.m ---------------------------------------------------===// Index: test/Analysis/unions.cpp =================================================================== --- test/Analysis/unions.cpp +++ test/Analysis/unions.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection %s -verify +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection %s -verify extern void clang_analyzer_eval(bool); extern "C" char *strdup(const char *s); Index: test/Analysis/unix-api.c =================================================================== --- test/Analysis/unix-api.c +++ test/Analysis/unix-api.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.API -verify %s #ifndef O_RDONLY #define O_RDONLY 0 Index: test/Analysis/unix-api.cpp =================================================================== --- test/Analysis/unix-api.cpp +++ test/Analysis/unix-api.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.API -verify %s extern "C" { #ifndef O_RDONLY #define O_RDONLY 0 Index: test/Analysis/unix-fns.c =================================================================== --- test/Analysis/unix-fns.c +++ test/Analysis/unix-fns.c @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,unix.API,osx.API %s -analyzer-store=region -analyzer-output=plist -analyzer-eagerly-assume -analyzer-config faux-bodies=true -analyzer-config path-diagnostics-alternate=false -fblocks -verify -o %t.plist +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,unix.API,osx.API %s -analyzer-store=region -analyzer-output=plist -analyzer-eagerly-assume -analyzer-config faux-bodies=true -analyzer-config path-diagnostics-alternate=false -fblocks -verify -o %t.plist // RUN: FileCheck --input-file=%t.plist %s // RUN: mkdir -p %t.dir -// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.API,osx.API -analyzer-output=html -analyzer-config faux-bodies=true -fblocks -o %t.dir %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,unix.API,osx.API -analyzer-output=html -analyzer-config faux-bodies=true -fblocks -o %t.dir %s // RUN: rm -fR %t.dir struct _opaque_pthread_once_t { long __sig; Index: test/Analysis/unreachable-code-path.c =================================================================== --- test/Analysis/unreachable-code-path.c +++ test/Analysis/unreachable-code-path.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,alpha.deadcode.UnreachableCode -verify -analyzer-opt-analyze-nested-blocks -Wno-unused-value %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,deadcode.DeadStores,alpha.deadcode.UnreachableCode -verify -analyzer-opt-analyze-nested-blocks -Wno-unused-value %s extern void foo(int a); Index: test/Analysis/unsupported-types.c =================================================================== --- test/Analysis/unsupported-types.c +++ test/Analysis/unsupported-types.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -triple x86_64-unknown-linux -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -triple powerpc64-linux-gnu -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -triple x86_64-unknown-linux -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -triple powerpc64-linux-gnu -verify %s #define _Complex_I (__extension__ 1.0iF) Index: test/Analysis/unused-ivars.m =================================================================== --- test/Analysis/unused-ivars.m +++ test/Analysis/unused-ivars.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=osx.cocoa.UnusedIvars -verify -Wno-objc-root-class %s +// RUN: %clang_cc1 %z3_cc1 -fblocks -analyze -analyzer-checker=osx.cocoa.UnusedIvars -verify -Wno-objc-root-class %s //===--- BEGIN: Delta-debugging reduced headers. --------------------------===// Index: test/Analysis/valist-uninitialized.c =================================================================== --- test/Analysis/valist-uninitialized.c +++ test/Analysis/valist-uninitialized.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,alpha.valist.Uninitialized,alpha.valist.CopyToSelf -analyzer-output=text -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,alpha.valist.Uninitialized,alpha.valist.CopyToSelf -analyzer-output=text -analyzer-store=region -verify %s #include "Inputs/system-header-simulator-for-valist.h" Index: test/Analysis/valist-unterminated.c =================================================================== --- test/Analysis/valist-unterminated.c +++ test/Analysis/valist-unterminated.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,alpha.valist.Unterminated,alpha.valist.CopyToSelf -analyzer-output=text -analyzer-store=region -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-pc-linux-gnu -analyze -analyzer-checker=core,alpha.valist.Unterminated,alpha.valist.CopyToSelf -analyzer-output=text -analyzer-store=region -verify %s #include "Inputs/system-header-simulator-for-valist.h" Index: test/Analysis/variadic-method-types.m =================================================================== --- test/Analysis/variadic-method-types.m +++ test/Analysis/variadic-method-types.m @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.VariadicMethodTypes -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,osx.cocoa.VariadicMethodTypes -analyzer-store=region -fblocks -verify %s //===----------------------------------------------------------------------===// // The following code is reduced using delta-debugging from Index: test/Analysis/vfork.c =================================================================== --- test/Analysis/vfork.c +++ test/Analysis/vfork.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,security.insecureAPI.vfork,unix.Vfork -verify %s -// RUN: %clang_cc1 -analyze -analyzer-checker=core,security.insecureAPI.vfork,unix.Vfork -verify -x c++ %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,security.insecureAPI.vfork,unix.Vfork -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,security.insecureAPI.vfork,unix.Vfork -verify -x c++ %s #include "Inputs/system-header-simulator.h" Index: test/Analysis/virtualcall.cpp =================================================================== --- test/Analysis/virtualcall.cpp +++ test/Analysis/virtualcall.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.cplusplus.VirtualCall -analyzer-store region -verify -std=c++11 %s -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.cplusplus.VirtualCall -analyzer-store region -analyzer-config optin.cplusplus.VirtualCall:Interprocedural=true -DINTERPROCEDURAL=1 -verify -std=c++11 %s -// RUN: %clang_cc1 -analyze -analyzer-checker=optin.cplusplus.VirtualCall -analyzer-store region -analyzer-config optin.cplusplus.VirtualCall:PureOnly=true -DPUREONLY=1 -verify -std=c++11 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=optin.cplusplus.VirtualCall -analyzer-store region -verify -std=c++11 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=optin.cplusplus.VirtualCall -analyzer-store region -analyzer-config optin.cplusplus.VirtualCall:Interprocedural=true -DINTERPROCEDURAL=1 -verify -std=c++11 %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=optin.cplusplus.VirtualCall -analyzer-store region -analyzer-config optin.cplusplus.VirtualCall:PureOnly=true -DPUREONLY=1 -verify -std=c++11 %s /* When INTERPROCEDURAL is set, we expect diagnostics in all functions reachable from a constructor or destructor. If it is not set, we expect diagnostics Index: test/Analysis/vla.c =================================================================== --- test/Analysis/vla.c +++ test/Analysis/vla.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core -verify %s // Zero-sized VLAs. void check_zero_sized_VLA(int x) { Index: test/Analysis/weak-functions.c =================================================================== --- test/Analysis/weak-functions.c +++ test/Analysis/weak-functions.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection,unix.Malloc,unix.cstring,alpha.unix.cstring,unix.API,osx.API,osx.cocoa.RetainCount -Wno-null-dereference -Wno-tautological-compare -analyzer-store=region -fblocks -verify %s +// RUN: %clang_cc1 %z3_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection,unix.Malloc,unix.cstring,alpha.unix.cstring,unix.API,osx.API,osx.cocoa.RetainCount -Wno-null-dereference -Wno-tautological-compare -analyzer-store=region -fblocks -verify %s #define NULL 0 void clang_analyzer_eval(int); void myFunc(); Index: test/lit.cfg =================================================================== --- test/lit.cfg +++ test/lit.cfg @@ -482,6 +482,14 @@ else: config.available_features.add("nozlib") +if has_plugins and config.have_z3 == "1": + config.available_features.add("z3") + config.substitutions.append( ('%z3_cc1', '-load ' + config.llvm_shlib_dir + '/Z3ConstraintManagerPlugin' + config.llvm_plugin_ext) ) + config.substitutions.append( ('%z3', '-fplugin=' + config.llvm_shlib_dir + '/Z3ConstraintManagerPlugin' + config.llvm_plugin_ext) ) +else: + config.substitutions.append( ('%z3_cc1', '') ) + config.substitutions.append( ('%z3', '') ) + # Check if we should run long running tests. if lit_config.params.get("run_long_tests", None) == "true": config.available_features.add("long_tests") Index: tools/CMakeLists.txt =================================================================== --- tools/CMakeLists.txt +++ tools/CMakeLists.txt @@ -19,6 +19,9 @@ add_clang_subdirectory(clang-check) add_clang_subdirectory(scan-build) add_clang_subdirectory(scan-view) + if(CLANG_HAVE_Z3) + add_clang_subdirectory(z3-constraint-manager) + endif() endif() # We support checking out the clang-tools-extra repository into the 'extra' Index: tools/z3-constraint-manager/CMakeLists.txt =================================================================== --- /dev/null +++ tools/z3-constraint-manager/CMakeLists.txt @@ -0,0 +1,19 @@ +set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/Z3ConstraintManager.exports) + +set(LLVM_LINK_COMPONENTS Support) + +add_llvm_loadable_module(Z3ConstraintManagerPlugin + Z3ConstraintManager.cpp + + PLUGIN_TOOL + clang + ) + +include_directories(SYSTEM + ${Z3_INCLUDE_DIR} + ) + +target_link_libraries(Z3ConstraintManagerPlugin PRIVATE + ${Z3_LIBRARIES} + clangStaticAnalyzerCore + ) Index: tools/z3-constraint-manager/README =================================================================== --- /dev/null +++ tools/z3-constraint-manager/README @@ -0,0 +1,16 @@ +This plugin implements a constraint manager for the Clang Static Analyzer +using the Z3 constraint solver: + +https://github.com/z3prover/z3 + +## Building + +Please build and install Z3 first. It should then be automatically detected. + +## Usage + +Use the plug-in like so: + + clang -Xclang -load -Xclang path/to/Z3ConstraintManagerPlugin.so \ + -Xanalyzer -analyzer-constraints=z3 \ + --analyze ... Index: tools/z3-constraint-manager/Z3ConstraintManager.cpp =================================================================== --- tools/z3-constraint-manager/Z3ConstraintManager.cpp +++ tools/z3-constraint-manager/Z3ConstraintManager.cpp @@ -12,13 +12,11 @@ #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" #include "clang/StaticAnalyzer/Core/PathSensitive/SimpleConstraintManager.h" +#include + using namespace clang; using namespace ento; -#ifdef CLANG_HAVE_Z3 - -#include - namespace { class Z3Expr { static Z3_context ZC; @@ -619,8 +617,8 @@ }; // end class Z3Expr void Z3ErrorHandler(Z3_context Context, Z3_error_code Error) { - llvm::report_fatal_error( - "Z3 error: " + llvm::Twine(Z3_get_error_msg_ex(Context, Error))); + llvm::report_fatal_error("Z3 error: " + + llvm::Twine(Z3_get_error_msg_ex(Context, Error))); } Z3_context Z3Expr::ZC; @@ -1392,14 +1390,10 @@ OS << nl; } -#endif - +extern "C" { std::unique_ptr -ento::CreateZ3ConstraintManager(ProgramStateManager &StMgr, SubEngine *Eng) { -#ifdef CLANG_HAVE_Z3 +CreateZ3ConstraintManager(ProgramStateManager &StMgr, + SubEngine *Eng) { return llvm::make_unique(Eng, StMgr.getSValBuilder()); -#else - llvm::report_fatal_error("Clang was not compiled with Z3 support!", false); - return nullptr; -#endif +} } Index: tools/z3-constraint-manager/Z3ConstraintManager.exports =================================================================== --- /dev/null +++ tools/z3-constraint-manager/Z3ConstraintManager.exports @@ -0,0 +1 @@ +CreateZ3ConstraintManager