mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 06:56:07 +00:00

Summary: This change moves tests for checkers and infrastructure into separate directories, making it easier to find infrastructure tests. Tests for checkers are already easy to find because they are named after the checker. Tests for infrastructure were difficult to find because they were outnumbered by tests for checkers. Now they are in a separate directory. Reviewers: jfb, jdoerfert, lebedev.ri Subscribers: srhines, nemanjai, aheejin, kbarton, christof, mgrang, arphaman, jfb, lebedev.ri, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68807 llvm-svn: 374540
20 lines
954 B
C++
20 lines
954 B
C++
// RUN: rm -rf %T/clang-tidy/export-relpath
|
|
// RUN: mkdir -p %T/clang-tidy/export-relpath/subdir
|
|
// RUN: cp %s %T/clang-tidy/export-relpath/subdir/source.cpp
|
|
// RUN: echo '[{ "directory": "%/T/clang-tidy/export-relpath/subdir", "command": "clang++ source.cpp", "file": "%/T/clang-tidy/export-relpath/subdir/source.cpp"}]' > %T/clang-tidy/export-relpath/subdir/compile_commands.json
|
|
//
|
|
// Check that running clang-tidy in './subdir' and storing results
|
|
// in './fixes.yaml' works as expected.
|
|
//
|
|
// RUN: cd %T/clang-tidy/export-relpath
|
|
// RUN: clang-tidy -p subdir subdir/source.cpp -checks='-*,google-explicit-constructor,llvm-namespace-comment' -export-fixes=./fixes.yaml
|
|
// RUN: FileCheck -input-file=%T/clang-tidy/export-relpath/fixes.yaml -check-prefix=CHECK-YAML %s
|
|
|
|
namespace i {
|
|
void f(); // So that the namespace isn't empty.
|
|
}
|
|
// CHECK-YAML: ReplacementText: ' // namespace i'
|
|
|
|
class A { A(int i); };
|
|
// CHECK-YAML: ReplacementText: 'explicit '
|