forked from OSchip/llvm-project
[clang-tidy] Added missing check lines, made the checking stricter.
llvm-svn: 248899
This commit is contained in:
parent
eaa3d2a63c
commit
87e1da6205
|
@ -1,14 +1,11 @@
|
|||
// RUN: clang-tidy -checks='-*,modernize-use-override' %s.nonexistent.cpp -- | FileCheck -check-prefix=CHECK1 %s
|
||||
// RUN: clang-tidy -checks='-*,clang-diagnostic-*,google-explicit-constructor' %s -- -fan-unknown-option | FileCheck -check-prefix=CHECK2 %s
|
||||
// RUN: clang-tidy -checks='-*,google-explicit-constructor,clang-diagnostic-literal-conversion' %s -- -fan-unknown-option | FileCheck -check-prefix=CHECK3 %s
|
||||
// RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-macro-redefined' %s -- -DMACRO_FROM_COMMAND_LINE | FileCheck -check-prefix=CHECK4 %s
|
||||
|
||||
// CHECK1-NOT: warning
|
||||
// CHECK2-NOT: warning
|
||||
// CHECK3-NOT: warning
|
||||
// RUN: clang-tidy -checks='-*,modernize-use-override' %s.nonexistent.cpp -- | FileCheck -check-prefix=CHECK1 -implicit-check-not='{{warning:|error:}}' %s
|
||||
// RUN: clang-tidy -checks='-*,clang-diagnostic-*,google-explicit-constructor' %s -- -fan-unknown-option | FileCheck -check-prefix=CHECK2 -implicit-check-not='{{warning:|error:}}' %s
|
||||
// RUN: clang-tidy -checks='-*,google-explicit-constructor,clang-diagnostic-literal-conversion' %s -- -fan-unknown-option | FileCheck -check-prefix=CHECK3 -implicit-check-not='{{warning:|error:}}' %s
|
||||
// RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-macro-redefined' %s -- -DMACRO_FROM_COMMAND_LINE | FileCheck -check-prefix=CHECK4 -implicit-check-not='{{warning:|error:}}' %s
|
||||
|
||||
// CHECK1: error: error reading '{{.*}}.nonexistent.cpp' [clang-diagnostic-error]
|
||||
// CHECK2: error: unknown argument: '-fan-unknown-option' [clang-diagnostic-error]
|
||||
// CHECK3: error: unknown argument: '-fan-unknown-option' [clang-diagnostic-error]
|
||||
|
||||
// CHECK2: :[[@LINE+2]]:9: warning: implicit conversion from 'double' to 'int' changes value from 1.5 to 1 [clang-diagnostic-literal-conversion]
|
||||
// CHECK3: :[[@LINE+1]]:9: warning: implicit conversion from 'double' to 'int' changes value
|
||||
|
@ -18,8 +15,5 @@ int a = 1.5;
|
|||
// CHECK3: :[[@LINE+1]]:11: warning: single-argument constructors must be explicit [google-explicit-constructor]
|
||||
class A { A(int) {} };
|
||||
|
||||
// CHECK2-NOT: warning:
|
||||
// CHECK3-NOT: warning:
|
||||
|
||||
#define MACRO_FROM_COMMAND_LINE
|
||||
// CHECK4: :[[@LINE-1]]:9: warning: 'MACRO_FROM_COMMAND_LINE' macro redefined
|
||||
|
|
Loading…
Reference in New Issue