Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions clang-tools-extra/clangd/CodeComplete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1393,10 +1393,6 @@ bool semaCodeComplete(std::unique_ptr<CodeCompleteConsumer> Consumer,
FrontendOpts.SkipFunctionBodies = true;
// Disable typo correction in Sema.
CI->getLangOpts().SpellChecking = false;
// Code completion won't trigger in delayed template bodies.
// This is on-by-default in windows to allow parsing SDK headers; we're only
// disabling it for the main-file (not preamble).
CI->getLangOpts().DelayedTemplateParsing = false;
// Setup code completion.
FrontendOpts.CodeCompleteOpts = Options;
FrontendOpts.CodeCompletionAt.FileName = std::string(Input.FileName);
Expand Down
4 changes: 0 additions & 4 deletions clang-tools-extra/clangd/ParsedAST.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,6 @@ ParsedAST::build(llvm::StringRef Filename, const ParseInputs &Inputs,
const PrecompiledPreamble *PreamblePCH =
Preamble ? &Preamble->Preamble : nullptr;

// This is on-by-default in windows to allow parsing SDK headers, but it
// breaks many features. Disable it for the main-file (not preamble).
CI->getLangOpts().DelayedTemplateParsing = false;

std::vector<std::unique_ptr<FeatureModule::ASTListener>> ASTListeners;
if (Inputs.FeatureModules) {
for (auto &M : *Inputs.FeatureModules) {
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3953,8 +3953,8 @@ TEST(CompletionTest, DelayedTemplateParsing) {
template <typename T> int foo() { return xx^; }
)cpp");
auto TU = TestTU::withCode(Test.code());
// Even though delayed-template-parsing is on, we will disable it to provide
// completion in templates.
// We provide completion in templates even when delayed-template-parsing
// is on.
TU.ExtraArgs.push_back("-fdelayed-template-parsing");

EXPECT_THAT(completions(TU, Test.point()).Completions,
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clangd/unittests/ParsedASTTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ TEST(ParsedASTTest,
AllOf(declNamed("foo"), withTemplateArgs("<bool>"))}));
}

TEST(ParsedASTTest, IgnoresDelayedTemplateParsing) {
TEST(ParsedASTTest, WorksEvenWithDelayedTemplateParsing) {
auto TU = TestTU::withCode(R"cpp(
template <typename T> void xxx() {
int yyy = 0;
Expand Down
1 change: 0 additions & 1 deletion clang-tools-extra/clangd/unittests/RenameTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1382,7 +1382,6 @@ TEST(RenameTest, Renameable) {
SCOPED_TRACE(Case.Code);
Annotations T(Case.Code);
TestTU TU = TestTU::withCode(T.code());
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
if (Case.IsHeaderFile) {
// We open the .h file as the main file.
TU.Filename = "test.h";
Expand Down
3 changes: 0 additions & 3 deletions clang-tools-extra/clangd/unittests/XRefsTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1418,9 +1418,6 @@ TEST(LocateSymbol, Ambiguous) {
}
)cpp");
auto TU = TestTU::withCode(T.code());
// FIXME: Go-to-definition in a template requires disabling delayed template
// parsing.
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
auto AST = TU.build();
// Ordered assertions are deliberate: we expect a predictable order.
EXPECT_THAT(locateSymbolAt(AST, T.point("1")), ElementsAre(sym("str")));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-branch-clone %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s bugprone-branch-clone %t

void test_basic1(int in, int &out) {
if (in > 77)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-crtp-constructor-accessibility %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-crtp-constructor-accessibility %t

namespace class_implicit_ctor {
template <typename T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %check_clang_tidy %s bugprone-infinite-loop %t \
// RUN: -- -- -fexceptions -fblocks -fno-delayed-template-parsing
// RUN: -- -- -fexceptions -fblocks

void simple_infinite_loop1() {
int i = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++14-or-later %s bugprone-move-forwarding-reference %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++14-or-later %s bugprone-move-forwarding-reference %t

namespace std {
template <typename> struct remove_reference;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-return-const-ref-from-parameter %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s bugprone-return-const-ref-from-parameter %t

using T = int;
using TConst = int const;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// RUN: %check_clang_tidy %s bugprone-sizeof-expression %t \
// RUN: -- -config="{CheckOptions: {bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression: true}}" \
// RUN: -- -fno-delayed-template-parsing
// RUN: -- -config="{CheckOptions: {bugprone-sizeof-expression.WarnOnSizeOfIntegerExpression: true}}"

class C {
int size() { return sizeof(this); }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-string-integer-assignment %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s bugprone-string-integer-assignment %t

namespace std {
template<typename T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-switch-missing-default-case %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s bugprone-switch-missing-default-case %t

typedef int MyInt;
enum EnumType { eE2 };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-unhandled-self-assignment %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s bugprone-unhandled-self-assignment %t

namespace std {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s bugprone-unused-raii %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s bugprone-unused-raii %t

struct Foo {
Foo();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX11 %s bugprone-use-after-move %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-use-after-move %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++11 -check-suffixes=,CXX11 %s bugprone-use-after-move %t
// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-use-after-move %t

typedef decltype(nullptr) nullptr_t;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s cppcoreguidelines-init-variables -fix-errors %t -- -- -fno-delayed-template-parsing -fexceptions
// RUN: %check_clang_tidy %s cppcoreguidelines-init-variables -fix-errors %t -- -- -fexceptions
// CHECK-FIXES: #include <math.h>

// Ensure that function declarations are not changed.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %check_clang_tidy -std=c++14 %s cppcoreguidelines-missing-std-forward %t -- \
// RUN: -config="{CheckOptions: {cppcoreguidelines-missing-std-forward.ForwardFunction: custom_forward}}" -- -fno-delayed-template-parsing
// RUN: -config="{CheckOptions: {cppcoreguidelines-missing-std-forward.ForwardFunction: custom_forward}}"

// NOLINTBEGIN
namespace std {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s cppcoreguidelines-missing-std-forward %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s cppcoreguidelines-missing-std-forward %t

// NOLINTBEGIN
namespace std {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-no-suspend-with-lock %t -- -- -fno-delayed-template-parsing -fexceptions
// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-no-suspend-with-lock %t -- -- -fexceptions

// NOLINTBEGIN
namespace std {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-pro-type-member-init %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++20 %s cppcoreguidelines-pro-type-member-init %t

struct PositiveBitfieldMember {
PositiveBitfieldMember() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++98 %s cppcoreguidelines-pro-type-member-init %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++98 %s cppcoreguidelines-pro-type-member-init %t

struct PositiveFieldBeforeConstructor {
int F;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-member-init %t -- -- -fdelayed-template-parsing
// RUN: %check_clang_tidy %s cppcoreguidelines-pro-type-member-init %t

template <class T>
struct PositiveFieldBeforeConstructor {
Expand All @@ -21,12 +21,3 @@ struct PositiveFieldAfterConstructor {
};
// Explicit instantiation.
template class PositiveFieldAfterConstructor<int>;

// This declaration isn't used and won't be parsed 'delayed-template-parsing'.
// The body of the declaration is 'null' and may cause crash if not handled
// properly by checkers.
template <class T>
struct UnusedDelayedConstructor {
UnusedDelayedConstructor() {}
int F;
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++11,c++14,c++17 %s cppcoreguidelines-pro-type-member-init %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++11,c++14,c++17 %s cppcoreguidelines-pro-type-member-init %t
// FIXME: Fix the checker to work in C++20 mode.

struct PositiveFieldBeforeConstructor {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// RUN: %check_clang_tidy -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true, cppcoreguidelines-rvalue-reference-param-not-moved.MoveFunction: custom_move}}" -- -fno-delayed-template-parsing
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true, cppcoreguidelines-rvalue-reference-param-not-moved.MoveFunction: custom_move}}"

// NOLINTBEGIN
namespace std {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// RUN: %check_clang_tidy -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,CXX14 -std=c++14 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,NOSUBEXPR -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,UNNAMED -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}" -- -fno-delayed-template-parsing
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: false, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: true}}"
// RUN: %check_clang_tidy -check-suffix=,NONDEDUCED -std=c++11 %s cppcoreguidelines-rvalue-reference-param-not-moved %t -- \
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: false}}" -- -fno-delayed-template-parsing
// RUN: -config="{CheckOptions: {cppcoreguidelines-rvalue-reference-param-not-moved.AllowPartialMove: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams: true, cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreNonDeducedTemplateTypes: false}}"

// NOLINTBEGIN
namespace std {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// RUN: %check_clang_tidy %s llvm-prefer-static-over-anonymous-namespace %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s llvm-prefer-static-over-anonymous-namespace %t
// RUN: %check_clang_tidy -check-suffixes=,VAR %s llvm-prefer-static-over-anonymous-namespace %t -- \
// RUN: -config="{CheckOptions: { \
// RUN: llvm-prefer-static-over-anonymous-namespace.AllowVariableDeclarations: false }, \
// RUN: }" -- -fno-delayed-template-parsing
// RUN: }"
// RUN: %check_clang_tidy -check-suffixes=,MEM %s llvm-prefer-static-over-anonymous-namespace %t -- \
// RUN: -config="{CheckOptions: { \
// RUN: llvm-prefer-static-over-anonymous-namespace.AllowMemberFunctionsInClass: false }, \
// RUN: }" -- -fno-delayed-template-parsing
// RUN: }"

namespace {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// RUN: misc-const-correctness.TransformReferences: true, \
// RUN: misc-const-correctness.WarnPointersAsValues: true, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false } \
// RUN: }" -- -fno-delayed-template-parsing
// RUN: }"

struct SmartPointer {
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s misc-const-correctness %t -- -- -std=c++17 -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s misc-const-correctness %t -- -- -std=c++17

template <typename L, typename R>
struct MyPair {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
// RUN: misc-const-correctness.WarnPointersAsPointers: true,\
// RUN: misc-const-correctness.TransformPointersAsValues: true,\
// RUN: misc-const-correctness.TransformPointersAsPointers: true\
// RUN: }}' \
// RUN: -- -fno-delayed-template-parsing
// RUN: }}'

void pointee_to_const() {
int a[] = {1, 2};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
// RUN: misc-const-correctness.WarnPointersAsPointers: true,\
// RUN: misc-const-correctness.TransformPointersAsValues: false,\
// RUN: misc-const-correctness.TransformPointersAsPointers: true\
// RUN: }}' \
// RUN: -- -fno-delayed-template-parsing
// RUN: }}'

void pointee_to_const() {
int a[] = {1, 2};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// RUN: {misc-const-correctness.AnalyzeValues: true,\
// RUN: misc-const-correctness.WarnPointersAsValues: true,\
// RUN: misc-const-correctness.WarnPointersAsPointers: false,\
// RUN: misc-const-correctness.TransformPointersAsValues: true}}' \
// RUN: -- -fno-delayed-template-parsing
// RUN: misc-const-correctness.TransformPointersAsValues: true}}'

void potential_const_pointer() {
double np_local0[10] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9.};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// RUN: misc-const-correctness.TransformReferences: true, \
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false} \
// RUN: }" -- -fno-delayed-template-parsing
// RUN: }"

template <typename T>
void type_dependent_variables() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: true, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: true}\
// RUN: }' -- -fno-delayed-template-parsing
// RUN: }'

void potential_const_pointer() {
double np_local0[10] = {0., 1., 2., 3., 4., 5., 6., 7., 8., 9.};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false} \
// RUN: }" -- -fno-delayed-template-parsing
// RUN: }"

bool global;
char np_global = 0; // globals can't be known to be const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: misc-const-correctness.TransformValues: true, \
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false} \
// RUN: }" -- -fno-delayed-template-parsing -fms-extensions
// RUN: }" -- -fms-extensions

struct S {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false \
// RUN: }}" -- -fno-delayed-template-parsing
// RUN: }}"


double &non_const_ref_return() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// RUN: misc-const-correctness.WarnPointersAsValues: false, \
// RUN: misc-const-correctness.WarnPointersAsPointers: false, \
// RUN: misc-const-correctness.TransformPointersAsValues: false \
// RUN: }}" -- -fno-delayed-template-parsing -fexceptions
// RUN: }}" -- -fexceptions

// ------- Provide test samples for primitive builtins ---------
// - every 'p_*' variable is a 'potential_const_*' variable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// RUN: {"misc-const-correctness.AnalyzeValues": false,\
// RUN: "misc-const-correctness.AnalyzeReferences": false,\
// RUN: "misc-const-correctness.AnalyzePointers": false\
// RUN: }}' -- -fno-delayed-template-parsing
// RUN: }}'

// CHECK-MESSAGES: warning: The check 'misc-const-correctness' will not perform any analysis because 'AnalyzeValues', 'AnalyzeReferences' and 'AnalyzePointers' are false. [clang-tidy-config]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// RUN: -config='{CheckOptions: \
// RUN: {"misc-include-cleaner.UnusedIncludes": false,\
// RUN: "misc-include-cleaner.MissingIncludes": false,\
// RUN: }}' -- -I%S/Inputs -isystem%S/Inputs/system -fno-delayed-template-parsing
// RUN: }}' -- -I%S/Inputs -isystem%S/Inputs/system

// CHECK-MESSAGES: warning: The check 'misc-include-cleaner' will not perform any analysis because 'UnusedIncludes' and 'MissingIncludes' are both false. [clang-tidy-config]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++14-or-later %s misc-unconventional-assign-operator %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++14-or-later %s misc-unconventional-assign-operator %t

struct BadModifier {
BadModifier& operator=(const BadModifier&) const;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s misc-unconventional-assign-operator %t -- -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy %s misc-unconventional-assign-operator %t

namespace std {
template <typename T>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RUN: mkdir -p %t.dir
// RUN: echo "static void staticFunctionHeader(int i) {;}" > %t.dir/header.h
// RUN: echo "static void staticFunctionHeader(int /*i*/) {;}" > %t.dir/header-fixed.h
// RUN: %check_clang_tidy -std=c++11 %s misc-unused-parameters %t.dir/code -- -header-filter='.*' -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++11 %s misc-unused-parameters %t.dir/code -- -header-filter='.*'
// RUN: diff %t.dir/header.h %t.dir/header-fixed.h
// FIXME: Make the test work in all language modes.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy -std=c++17-or-later %s misc-unused-using-decls %t -- --fix-notes -- -fno-delayed-template-parsing
// RUN: %check_clang_tidy -std=c++17-or-later %s misc-unused-using-decls %t -- --fix-notes

namespace ns {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: %check_clang_tidy %s misc-unused-using-decls %t -- --fix-notes -- -fno-delayed-template-parsing -isystem %S/Inputs
// RUN: %check_clang_tidy %s misc-unused-using-decls %t -- --fix-notes -- -isystem %S/Inputs

// ----- Definitions -----
template <typename T> class vector {};
Expand Down
Loading
Loading