summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/test/clang-tidy/werrors.cpp
blob: c98fd90faa306244ca8eabd528795c246ebb9298 (plain)
1
2
3
4
5
6
7
8
9
10
// 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 {
}
// CHECK-WARN: warning: namespace 'i' not terminated with a closing comment [llvm-namespace-comment]
// CHECK-WERR: error: namespace 'i' not terminated with a closing comment [llvm-namespace-comment,-warnings-as-errors]

// CHECK-WARN-NOT: treated as
// CHECK-WERR: 1 warning treated as error
OpenPOWER on IntegriCloud