1 // RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' %s -- | count 0
3 // Enable warnings using -config:
4 // RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' \
5 // RUN: -config='{ExtraArgs: ["-Wshadow","-Wno-unused-variable"], ExtraArgsBefore: ["-Wno-shadow","-Wfloat-conversion","-Wunused-variable"]}' %s -- \
6 // RUN: | FileCheck -implicit-check-not='{{warning:|error:}}' %s
9 // RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' \
10 // RUN: -extra-arg=-Wshadow -extra-arg=-Wno-unused-variable \
11 // RUN: -extra-arg-before=-Wno-shadow -extra-arg-before=-Wfloat-conversion \
12 // RUN: -extra-arg-before=-Wunused-variable %s -- \
13 // RUN: | FileCheck -implicit-check-not='{{warning:|error:}}' %s
15 // ... a combination of -config and -extra-arg(-before):
16 // RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' \
17 // RUN: -config='{ExtraArgs: ["-Wno-unused-variable"], ExtraArgsBefore: ["-Wno-shadow","-Wfloat-conversion"]}' \
18 // RUN: -extra-arg=-Wshadow -extra-arg-before=-Wunused-variable %s -- \
19 // RUN: | FileCheck -implicit-check-not='{{warning:|error:}}' %s
24 // CHECK: :[[@LINE-1]]:9: warning: declaration shadows a local variable [clang-diagnostic-shadow]
26 // CHECK: :[[@LINE-1]]:11: warning: implicit conversion turns floating-point number into integer: 'float' to 'int' [clang-diagnostic-float-conversion]