[clang-tools-extra] 9f13a03 - clang-tidy: don't use an absolute path in a test

George Burgess IV via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 22 18:13:31 PST 2019


Author: George Burgess IV
Date: 2019-11-22T18:13:18-08:00
New Revision: 9f13a032b6d7f720caf6511d0c9b1b6b7d2bbc67

URL: https://github.com/llvm/llvm-project/commit/9f13a032b6d7f720caf6511d0c9b1b6b7d2bbc67
DIFF: https://github.com/llvm/llvm-project/commit/9f13a032b6d7f720caf6511d0c9b1b6b7d2bbc67.diff

LOG: clang-tidy: don't use an absolute path in a test

`run_clang_tidy` takes a regular expression to match against
compile_commands.json entries. If we pass "%t/test.cpp" and "%t" expands
to anything that includes chars that a regex treats specially, like '+',
this test starts failing.

Added: 
    

Modified: 
    clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp
index 31c4d681ebc9..0d0e41e022ae 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/run-clang-tidy.cpp
@@ -9,7 +9,7 @@
 // RUN: echo "    value:           '0'" >> %t/.clang-tidy
 // RUN: cp "%s" "%t/test.cpp"
 // RUN: cd "%t"
-// RUN: not %run_clang_tidy "%t/test.cpp"
+// RUN: not %run_clang_tidy "test.cpp"
 
 int main()
 {


        


More information about the cfe-commits mailing list