28 lines · cpp
1// RUN: clang-tidy -dump-config | FileCheck %s2// RUN: clang-tidy -dump-config -use-color | FileCheck -check-prefix=CHECK-CONFIG-COLOR %s3// RUN: clang-tidy -dump-config -use-color=false | FileCheck -check-prefix=CHECK-CONFIG-NO-COLOR %s4// RUN: clang-tidy -config='UseColor: true' -dump-config | FileCheck -check-prefix=CHECK-CONFIG-COLOR %s5// RUN: clang-tidy -config='UseColor: false' -dump-config | FileCheck -check-prefix=CHECK-CONFIG-NO-COLOR %s6// RUN: clang-tidy -help | FileCheck -check-prefix=CHECK-OPT-PRESENT %s7 8// RUN: clang-tidy -checks='-*, modernize-use-override' -use-color=false %s -- -std=c++11 | FileCheck -check-prefix=CHECK-NO-COLOR %s9// RUN: clang-tidy -checks='-*, modernize-use-override' %s -- -std=c++11 | FileCheck -check-prefix=CHECK-NO-COLOR %s10// RUN: clang-tidy -checks='-*, modernize-use-override' -use-color %s -- -std=c++11 | FileCheck -check-prefix=CHECK-COLOR %s11 12// CHECK-NOT: UseColor13// CHECK-CONFIG-NO-COLOR: UseColor: false14// CHECK-CONFIG-COLOR: UseColor: true15// CHECK-OPT-PRESENT: --use-color16 17class Base {18public:19 virtual ~Base() = 0;20};21 22class Delivered : public Base {23public:24 virtual ~Delivered() = default;25 // CHECK-NO-COLOR: warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]26 // CHECK-COLOR: {{.\[0;1;35m}}warning: {{.\[0m}}{{.\[1m}}prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override]27};28