diff options
author | Alexander Kornienko <alexfh@google.com> | 2016-08-23 14:13:31 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2016-08-23 14:13:31 +0000 |
commit | 42fd75ea86692a735bbdc49ece438a18794c040b (patch) | |
tree | 0aaa99a253deb16d76492919622bd9f074debe44 /clang-tools-extra/test/clang-tidy/custom-diagnostics.cpp | |
parent | a4092104cb21ba98edf8ed48ce5640bb0725c406 (diff) | |
download | bcm5719-llvm-42fd75ea86692a735bbdc49ece438a18794c040b.tar.gz bcm5719-llvm-42fd75ea86692a735bbdc49ece438a18794c040b.zip |
[clang-tidy] Fix the order of ExtraArgsBefore
Added tests for the relative order of -extra-arg(-before) and ExtraArgs(Before).
llvm-svn: 279516
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/custom-diagnostics.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/custom-diagnostics.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang-tools-extra/test/clang-tidy/custom-diagnostics.cpp b/clang-tools-extra/test/clang-tidy/custom-diagnostics.cpp index 61a92920317..81837702c4e 100644 --- a/clang-tools-extra/test/clang-tidy/custom-diagnostics.cpp +++ b/clang-tools-extra/test/clang-tidy/custom-diagnostics.cpp @@ -1,7 +1,22 @@ // RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' %s -- | count 0 +// +// Enable warnings using -config: // RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' \ // RUN: -config='{ExtraArgs: ["-Wshadow","-Wno-unused-variable"], ExtraArgsBefore: ["-Wno-shadow","-Wfloat-conversion","-Wunused-variable"]}' %s -- \ // RUN: | FileCheck -implicit-check-not='{{warning:|error:}}' %s +// +// ... -extra-arg: +// RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' \ +// RUN: -extra-arg=-Wshadow -extra-arg=-Wno-unused-variable \ +// RUN: -extra-arg-before=-Wno-shadow -extra-arg-before=-Wfloat-conversion \ +// RUN: -extra-arg-before=-Wunused-variable %s -- \ +// RUN: | FileCheck -implicit-check-not='{{warning:|error:}}' %s +// +// ... a combination of -config and -extra-arg(-before): +// RUN: clang-tidy -checks='-*,modernize-use-override,clang-diagnostic-shadow,clang-diagnostic-float-conversion' \ +// RUN: -config='{ExtraArgs: ["-Wno-unused-variable"], ExtraArgsBefore: ["-Wno-shadow","-Wfloat-conversion"]}' \ +// RUN: -extra-arg=-Wshadow -extra-arg-before=-Wunused-variable %s -- \ +// RUN: | FileCheck -implicit-check-not='{{warning:|error:}}' %s void f(float x) { int a; |