forked from OSchip/llvm-project
[clang-tidy] Improve -warnings-as-errors tests.
llvm-svn: 268579
This commit is contained in:
parent
3c5eabfcbc
commit
1ccc219125
|
@ -0,0 +1,13 @@
|
|||
// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' \
|
||||
// RUN: -- -Wunused-variable 2>&1 \
|
||||
// RUN: | FileCheck %s --check-prefix=CHECK-WARN -implicit-check-not='{{warning|error}}:'
|
||||
// RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' \
|
||||
// RUN: -warnings-as-errors='clang-diagnostic*' -- -Wunused-variable 2>&1 \
|
||||
// RUN: | FileCheck %s --check-prefix=CHECK-WERR -implicit-check-not='{{warning|error}}:'
|
||||
|
||||
void f() { int i; }
|
||||
// CHECK-WARN: warning: unused variable 'i' [clang-diagnostic-unused-variable]
|
||||
// CHECK-WERR: error: unused variable 'i' [clang-diagnostic-unused-variable,-warnings-as-errors]
|
||||
|
||||
// CHECK-WARN-NOT: treated as
|
||||
// CHECK-WERR: 1 warning treated as error
|
|
@ -1,5 +1,8 @@
|
|||
// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WARN
|
||||
// RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment' -warnings-as-errors='llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WERR
|
||||
// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' -- 2>&1 \
|
||||
// RUN: | FileCheck %s --check-prefix=CHECK-WARN -implicit-check-not='{{warning|error}}:'
|
||||
// RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' \
|
||||
// RUN: -warnings-as-errors='llvm-namespace-comment' -- 2>&1 \
|
||||
// RUN: | FileCheck %s --check-prefix=CHECK-WERR -implicit-check-not='{{warning|error}}:'
|
||||
|
||||
namespace j {
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WARN
|
||||
// RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment' -warnings-as-errors='llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WERR
|
||||
// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WARN -implicit-check-not='{{warning|error}}:'
|
||||
// RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment' -warnings-as-errors='llvm-namespace-comment' -- 2>&1 | FileCheck %s --check-prefix=CHECK-WERR -implicit-check-not='{{warning|error}}:'
|
||||
|
||||
namespace i {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue