Move test inputs into Inputs directory.

We don't need a new ExpectedOutputs/ convention. Expected outputs are
just another form of test input.

llvm-svn: 339634
This commit is contained in:
Richard Smith 2018-08-14 00:18:48 +00:00
parent 936240c77a
commit 5b2636142a
61 changed files with 28 additions and 28 deletions

View File

@ -1,7 +1,7 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=text -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=text -analyzer-config c++-allocator-inlining=true -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=cplusplus.NewDelete,unix.Malloc -analyzer-output=plist %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/NewDelete-path-notes.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/NewDelete-path-notes.cpp.plist
void test() {
int *p = new int;

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=text -verify
// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=plist -o %t
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/conditional-path-notes.c.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/conditional-path-notes.c.plist
void testCondOp(int *p) {
int *x = p ? p : p;

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -analyzer-output=plist -analyzer-config notes-as-events=true -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/copypaste/plist-diagnostics-notes-as-events.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/plist-diagnostics-notes-as-events.cpp.plist
void log();

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -analyzer-output=plist -o %t.plist -std=c++11 -analyzer-checker=alpha.clone.CloneChecker -analyzer-config alpha.clone.CloneChecker:MinimumCloneComplexity=10 -verify %s
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/copypaste/plist-diagnostics.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/plist-diagnostics.cpp.plist
void log();

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -std=c++11 -analyzer-checker=core -analyzer-output=plist-multi-file -o %t.plist -verify %s
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/cxx-for-range.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/cxx-for-range.cpp.plist
extern void work();

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/diagnostics/deref-track-symbolic-region.c.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/deref-track-symbolic-region.c.plist
struct S {
int *x;

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist -o %t %s
// RUN: tail -n +11 %t | diff -u -w - %S/../ExpectedOutputs/plists/diagnostics/undef-value-caller.c.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/undef-value-caller.c.plist
#include "undef-value-callee.h"

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/diagnostics/undef-value-param.c.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/undef-value-param.c.plist
void foo_irrelevant(int c) {
if (c)

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx -analyzer-output=text -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx -analyzer-output=plist-multi-file %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/diagnostics/undef-value-param.m.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/undef-value-param.m.plist
typedef signed char BOOL;
@protocol NSObject - (BOOL)isEqual:(id)object; @end

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,deadcode.DeadStores,osx.cocoa.RetainCount,unix.Malloc,unix.MismatchedDeallocator -analyzer-eagerly-assume -analyzer-output=plist -o %t -w %s
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/edges-new.mm.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/edges-new.mm.plist
//===----------------------------------------------------------------------===//
// Forward declarations (from headers).

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.ObjCGenerics,alpha.core.DynamicTypeChecker -verify -Wno-objc-method-access %s -analyzer-output=plist -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/generics.m.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/generics.m.plist
#if !__has_feature(objc_generics)
# error Compiler does not support Objective-C generics?

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference,core.DivideZero -fblocks -analyzer-output=text -analyzer-config suppress-null-return-paths=false -verify %s
// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference,core.DivideZero -fblocks -analyzer-output=plist -analyzer-config suppress-null-return-paths=false -o %t
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/inline-plist.c.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/inline-plist.c.plist
// <rdar://problem/10967815>
void mmm(int y) {

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 %s -analyzer-checker=core.NullDereference -analyzer-output=plist -o %t > /dev/null 2>&1
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/inline-unique-reports.c.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/inline-unique-reports.c.plist
static inline bug(int *p) {
*p = 0xDEADBEEF;

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config graph-trim-interval=5 %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/inlining/eager-reclamation-path-notes.c.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/eager-reclamation-path-notes.c.plist
void use(int *ptr, int val) {
*ptr = val; // expected-warning {{Dereference of null pointer (loaded from variable 'ptr')}}

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config graph-trim-interval=5 -analyzer-config suppress-null-return-paths=false -verify %s
// RUN: %clang_analyze_cc1 -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: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/inlining/eager-reclamation-path-notes.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/eager-reclamation-path-notes.cpp.plist
typedef struct {
int getValue();

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config suppress-null-return-paths=false -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/inlining/path-notes.c.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/path-notes.c.plist
void zero(int **p) {
*p = 0;

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -analyzer-config c++-inlining=destructors -std=c++11 -verify -Wno-tautological-undefined-compare %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config c++-inlining=destructors -std=c++11 %s -o %t.plist -Wno-tautological-undefined-compare
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/inlining/path-notes.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/path-notes.cpp.plist
class Foo {
public:

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=text -analyzer-config suppress-null-return-paths=false -fblocks -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.NilArg,osx.cocoa.RetainCount -analyzer-output=plist-multi-file -analyzer-config suppress-null-return-paths=false -fblocks %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/../ExpectedOutputs/plists/inlining/path-notes.m.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/path-notes.m.plist
typedef struct dispatch_queue_s *dispatch_queue_t;
typedef void (^dispatch_block_t)(void);

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=text -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-output=plist-multi-file %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/method-call-path-notes.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/method-call-path-notes.cpp.plist
// Test warning about null or uninitialized pointer values used as instance member
// calls.

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config faux-bodies=true,model-path=%S/Inputs/Models -analyzer-output=plist-multi-file -verify %s -o %t
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/model-file.cpp.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/model-file.cpp.plist
typedef int* intptr;

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region -analyzer-output=text -fblocks -verify -Wno-objc-root-class %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region -analyzer-output=plist-multi-file -fblocks -Wno-objc-root-class %s -o %t
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/null-deref-path-notes.m.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/null-deref-path-notes.m.plist
@interface Root {
@public

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -fblocks -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -analyzer-output=text -verify %s
// RUN: %clang_analyze_cc1 -fblocks -analyzer-checker=core,nullability.NullPassedToNonnull,nullability.NullReturnedFromNonnull,nullability.NullablePassedToNonnull,nullability.NullableReturnedFromNonnull,nullability.NullableDereferenced -analyzer-output=plist -o %t.plist %s
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/nullability-notes.m.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/nullability-notes.m.plist
#include "Inputs/system-header-simulator-for-nullability.h"

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,osx.cocoa.RetainCount,deadcode -verify -fblocks -analyzer-opt-analyze-nested-blocks -fobjc-arc -analyzer-output=plist-multi-file -o %t.plist %s
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/objc-arc.m.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/objc-arc.m.plist
typedef signed char BOOL;
typedef struct _NSZone NSZone;

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -analyzer-eagerly-assume -verify %s
// RUN: %clang_analyze_cc1 -analyzer-checker=core,unix -analyzer-eagerly-assume -analyzer-output=plist-multi-file %s -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/plist-macros.cpp.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/plist-macros.cpp.plist
typedef __typeof(sizeof(int)) size_t;

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -fblocks -analyzer-output=plist -o %t %s
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/plist-output-alternate.m.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/plist-output-alternate.m.plist
void test_null_init(void) {
int *p = 0;

View File

@ -1,5 +1,5 @@
// RUN: %clang_analyze_cc1 %s -analyzer-checker=osx.cocoa.RetainCount,deadcode.DeadStores,core -analyzer-output=plist -o %t.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/plist-output.m.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/plist-output.m.plist
void test_null_init(void) {
int *p = 0;

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -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_analyze_cc1 -triple x86_64-apple-darwin10 -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: tail -n +11 %t.plist | diff -u -w - %S/ExpectedOutputs/plists/retain-release-path-notes-gc.m.plist
// RUN: tail -n +11 %t.plist | diff -u -w - %S/Inputs/expected-plists/retain-release-path-notes-gc.m.plist
/***
This file is for testing the path-sensitive notes for retain/release errors.

View File

@ -1,6 +1,6 @@
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=text -verify %s
// RUN: %clang_analyze_cc1 -triple x86_64-apple-darwin10 -analyzer-checker=core,osx.coreFoundation.CFRetainRelease,osx.cocoa.ClassRelease,osx.cocoa.RetainCount -analyzer-store=region -analyzer-output=plist-multi-file %s -o %t
// RUN: tail -n +11 %t | diff -u -w - %S/ExpectedOutputs/plists/retain-release-path-notes.m.plist
// RUN: tail -n +11 %t | diff -u -w - %S/Inputs/expected-plists/retain-release-path-notes.m.plist
/***
This file is for testing the path-sensitive notes for retain/release errors.