1// RUN: clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' -- 2>&1 \
2// RUN: | FileCheck %s --check-prefix=CHECK-WARN -implicit-check-not='{{warning|error}}:'
3// RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' \
4// RUN: -warnings-as-errors='llvm-namespace-comment' -- 2>&1 \
5// RUN: | FileCheck %s --check-prefix=CHECK-WERR -implicit-check-not='{{warning|error}}:'
6// RUN: not clang-tidy %s -checks='-*,llvm-namespace-comment,clang-diagnostic*' \
7// RUN: -warnings-as-errors='llvm-namespace-comment' -quiet -- 2>&1 \
8// RUN: | FileCheck %s --check-prefix=CHECK-WERR-QUIET -implicit-check-not='{{warning|error}}:'
9
10namespace j {
11}
12// CHECK-WARN: warning: namespace 'j' not terminated with a closing comment [llvm-namespace-comment]
13// CHECK-WERR: error: namespace 'j' not terminated with a closing comment [llvm-namespace-comment,-warnings-as-errors]
14// CHECK-WERR-QUIET: error: namespace 'j' not terminated with a closing comment [llvm-namespace-comment,-warnings-as-errors]
15
16namespace k {
17}
18// CHECK-WARN: warning: namespace 'k' not terminated with a closing comment [llvm-namespace-comment]
19// CHECK-WERR: error: namespace 'k' not terminated with a closing comment [llvm-namespace-comment,-warnings-as-errors]
20// CHECK-WERR-QUIET: error: namespace 'k' not terminated with a closing comment [llvm-namespace-comment,-warnings-as-errors]
21
22// CHECK-WARN-NOT: treated as
23// CHECK-WERR: 2 warnings treated as errors
24// CHECK-WERR-QUIET-NOT: treated as
25

source code of clang-tools-extra/test/clang-tidy/infrastructure/warnings-as-errors-plural.cpp