mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 11:39:35 +00:00
[analyzer] Enable the new edge algorithm by default.
...but don't yet migrate over the existing plist tests. Some of these would be trivial to migrate; others could use a bit of inspection first. In any case, though, the new edge algorithm seems to have proven itself, and we'd like more coverage (and more usage) of it going forwards. llvm-svn: 183165
This commit is contained in:
parent
7ce598aeee
commit
5e2b3a30a0
@ -3076,7 +3076,7 @@ bool GRBugReporter::generatePathDiagnostic(PathDiagnostic& PD,
|
||||
|
||||
if (ActiveScheme == PathDiagnosticConsumer::Extensive) {
|
||||
AnalyzerOptions &options = getAnalyzerOptions();
|
||||
if (options.getBooleanOption("path-diagnostics-alternate", false)) {
|
||||
if (options.getBooleanOption("path-diagnostics-alternate", true)) {
|
||||
ActiveScheme = PathDiagnosticConsumer::AlternateExtensive;
|
||||
}
|
||||
}
|
||||
|
@ -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 %s -o %t.plist
|
||||
// RUN: %clang_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);
|
||||
|
@ -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 %s -o %t.plist
|
||||
// RUN: %clang_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() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// RUN: %clang --analyze %s -Xanalyzer -analyzer-output=text -Xclang -verify
|
||||
// RUN: %clang --analyze %s -o %t
|
||||
// RUN: %clang --analyze %s -Xanalyzer -analyzer-config -Xanalyzer path-diagnostics-alternate=false -o %t
|
||||
// RUN: FileCheck --input-file=%t %s
|
||||
|
||||
void testCondOp(int *p) {
|
||||
|
@ -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 %s -o %t.plist
|
||||
// RUN: %clang_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 {
|
||||
|
@ -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 %s -o %t.plist
|
||||
// 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: FileCheck --input-file=%t.plist %s
|
||||
#include "Inputs/include/report-issues-within-main-file.h"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist -o %t %s
|
||||
// RUN: %clang_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"
|
||||
|
@ -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 %s -o %t.plist
|
||||
// RUN: %clang_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) {
|
||||
|
@ -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 %s -o %t.plist
|
||||
// RUN: %clang_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;
|
||||
|
@ -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 -o %t
|
||||
// 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: FileCheck -input-file %t %s
|
||||
|
||||
// <rdar://problem/10967815>
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: %clang --analyze %s -o %t > /dev/null 2>&1
|
||||
// RUN: %clang --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) {
|
||||
|
@ -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 %s -o %t.plist
|
||||
// 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: FileCheck --input-file=%t.plist %s
|
||||
|
||||
void use(int *ptr, int val) {
|
||||
|
@ -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 %s -o %t.plist
|
||||
// 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: FileCheck --input-file=%t.plist %s
|
||||
|
||||
typedef struct {
|
||||
|
@ -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 %s -o %t.plist
|
||||
// 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: FileCheck --input-file=%t.plist %s
|
||||
|
||||
void zero(int **p) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config c++-inlining=destructors -std=c++11 -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config c++-inlining=destructors -std=c++11 %s -o %t.plist
|
||||
// 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
|
||||
// RUN: FileCheck --input-file=%t.plist %s
|
||||
|
||||
class Foo {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NilArg -analyzer-output=text -analyzer-config suppress-null-return-paths=false -fblocks -verify %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NilArg -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -fblocks %s -o %t.plist
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NilArg -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;
|
||||
|
@ -1,5 +1,5 @@
|
||||
// RUN: rm -f %t
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=unix.Malloc -analyzer-output=plist -o %t %s
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=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;
|
||||
|
@ -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 %s -o %t.plist
|
||||
// RUN: %clang_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
|
||||
|
@ -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 -fblocks -Wno-objc-root-class %s -o %t
|
||||
// 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: FileCheck --input-file=%t %s
|
||||
|
||||
@interface Root {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-output=plist -o %t %s
|
||||
// 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: FileCheck --input-file %t %s
|
||||
|
||||
void test_null_init(void) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// RUN: %clang --analyze %s -Xanalyzer -analyzer-checker=osx.cocoa.RetainCount -o %t.plist
|
||||
// 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: FileCheck --input-file=%t.plist %s
|
||||
|
||||
void test_null_init(void) {
|
||||
|
@ -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 %s -o %t.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 -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
|
||||
|
||||
/***
|
||||
|
@ -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 %s -o %t
|
||||
// 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: FileCheck --input-file=%t %s
|
||||
|
||||
/***
|
||||
|
@ -1,4 +1,4 @@
|
||||
// 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 -fblocks -verify -o %t.plist
|
||||
// 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: FileCheck --input-file=%t.plist %s
|
||||
|
||||
struct _opaque_pthread_once_t {
|
||||
|
Loading…
Reference in New Issue
Block a user