Hiralo updated this revision to Diff 301044. Hiralo added a comment. Added Lit test for --config-file cmdline option.
CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89936/new/ https://reviews.llvm.org/D89936 Files: clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp Index: clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp =================================================================== --- /dev/null +++ clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp @@ -0,0 +1,12 @@ +// REQUIRES: shell +// RUN: mkdir -p %T/config-file/ +// RUN: cp %s %T/read-file-config/test.cpp +// RUN: echo 'Checks: "-*,hicpp-uppercase-literal-suffix"' > %T/read-file-config/.clang-tidy +// RUN: clang-tidy --config-file=%T/read-file-config/.clang-tidy %T/read-file-config/test.cpp | grep "warning: .*\[hicpp-uppercase-literal-suffix\]$" + +void f() { + unsigned long c = 100ull; + int x; + x = 1; + x = 2; +}
Index: clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp =================================================================== --- /dev/null +++ clang-tools-extra/test/clang-tidy/infrastructure/config-file.cpp @@ -0,0 +1,12 @@ +// REQUIRES: shell +// RUN: mkdir -p %T/config-file/ +// RUN: cp %s %T/read-file-config/test.cpp +// RUN: echo 'Checks: "-*,hicpp-uppercase-literal-suffix"' > %T/read-file-config/.clang-tidy +// RUN: clang-tidy --config-file=%T/read-file-config/.clang-tidy %T/read-file-config/test.cpp | grep "warning: .*\[hicpp-uppercase-literal-suffix\]$" + +void f() { + unsigned long c = 100ull; + int x; + x = 1; + x = 2; +}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits