llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/nolintbeginend-multiple-TUs.cpp
Justin Bogner 12babb0818 [clang-tidy] Disable implicit search for a compilation db in some tests
These tests were failing for me on windows with a very curious error:

  error: argument unused during compilation: '/Zc:preprocessor'

It turns out that they were walking up the directory structure and
finding the compilation DB in my top level llvm-project directory.

Add `--` to the ends of the clang-tidy command lines so that they
don't go looking for random compilation databases. Also replace args
specified with `-extra-arg` with directly specifying them to the
FixedCompilationDatabase.

Differential Revision: https://reviews.llvm.org/D158157
2023-08-17 08:29:52 -07:00

7 lines
605 B
C++

// RUN: clang-tidy %S/Inputs/nolintbeginend/1st-translation-unit.cpp %S/Inputs/nolintbeginend/2nd-translation-unit.cpp --checks='-*,google-explicit-constructor' -- 2>&1 | FileCheck %s
// CHECK-NOT: 1st-translation-unit.cpp:2:11: warning: single-argument constructors must be marked explicit
// CHECK: 1st-translation-unit.cpp:5:11: warning: single-argument constructors must be marked explicit
// CHECK: 2nd-translation-unit.cpp:2:11: warning: single-argument constructors must be marked explicit
// CHECK-NOT: 2nd-translation-unit.cpp:5:11: warning: single-argument constructors must be marked explicit