[clang-tools-extra] 626849c - [clang-tidy][test] Add trailing -- to suppress compile_commands.json read

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sun May 14 14:12:20 PDT 2023


Author: Fangrui Song
Date: 2023-05-14T14:12:16-07:00
New Revision: 626849c71e85d546a004cc91866beab610222194

URL: https://github.com/llvm/llvm-project/commit/626849c71e85d546a004cc91866beab610222194
DIFF: https://github.com/llvm/llvm-project/commit/626849c71e85d546a004cc91866beab610222194.diff

LOG: [clang-tidy][test] Add trailing -- to suppress compile_commands.json read

This fixes some build bots if we reland D150505: specifically when using GCC to
build LLVM and then `-fno-lifetime-dse` ends up passed to compile_commands.json
and causing clang-tidy to pick up the Clang unknown option.

Added: 
    

Modified: 
    clang-tools-extra/test/clang-tidy/checkers/performance/trivially-destructible.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/test/clang-tidy/checkers/performance/trivially-destructible.cpp b/clang-tools-extra/test/clang-tidy/checkers/performance/trivially-destructible.cpp
index 927a0905ee424..2ff3eda559a52 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/performance/trivially-destructible.cpp
+++ b/clang-tools-extra/test/clang-tidy/checkers/performance/trivially-destructible.cpp
@@ -1,7 +1,7 @@
 // RUN: %check_clang_tidy %s performance-trivially-destructible %t
 // RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
-// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -fix
-// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -warnings-as-errors='-*,performance-trivially-destructible'
+// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -fix --
+// RUN: clang-tidy %t.cpp -checks='-*,performance-trivially-destructible' -warnings-as-errors='-*,performance-trivially-destructible' --
 
 struct TriviallyDestructible1 {
   int a;


        


More information about the cfe-commits mailing list