[clangd] Remove redundant -fno-delayed-template-parsing in tests. NFCI

We now (since a while) turn this off centrally in ParsedAST and CodeComplete.
This commit is contained in:
Sam McCall 2021-02-10 22:20:23 +01:00
parent 4dc8365f80
commit bda5e57742
9 changed files with 0 additions and 45 deletions

View File

@ -326,9 +326,6 @@ TEST_F(TargetDeclTest, Types) {
EXPECT_DECLS("TypedefTypeLoc", {"typedef ns::S X", Rel::Alias},
{"struct S", Rel::Underlying});
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
Flags = {"-fno-delayed-template-parsing"};
Code = R"cpp(
template<class T>
void foo() { [[T]] x; }
@ -336,9 +333,6 @@ TEST_F(TargetDeclTest, Types) {
EXPECT_DECLS("TemplateTypeParmTypeLoc", "class T");
Flags.clear();
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
Flags = {"-fno-delayed-template-parsing"};
Code = R"cpp(
template<template<typename> class T>
void foo() { [[T<int>]] x; }
@ -615,9 +609,6 @@ TEST_F(TargetDeclTest, Lambda) {
}
TEST_F(TargetDeclTest, OverloadExpr) {
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
Flags = {"-fno-delayed-template-parsing"};
Flags.push_back("--target=x86_64-pc-linux-gnu");
Code = R"cpp(
@ -676,8 +667,6 @@ TEST_F(TargetDeclTest, OverloadExpr) {
}
TEST_F(TargetDeclTest, DependentExprs) {
Flags = {"-fno-delayed-template-parsing"};
// Heuristic resolution of method of dependent field
Code = R"cpp(
struct A { void foo() {} };
@ -758,8 +747,6 @@ TEST_F(TargetDeclTest, DependentExprs) {
}
TEST_F(TargetDeclTest, DependentTypes) {
Flags = {"-fno-delayed-template-parsing"};
// Heuristic resolution of dependent type name
Code = R"cpp(
template <typename>
@ -981,7 +968,6 @@ protected:
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
TU.ExtraArgs.push_back("-std=c++20");
TU.ExtraArgs.push_back("-xobjective-c++");

View File

@ -184,9 +184,6 @@ TEST(ParsedASTTest,
template <>
int foo<bool> = 0;
)cpp";
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
auto AST = TU.build();
EXPECT_THAT(

View File

@ -829,7 +829,6 @@ TEST(RenameTest, WithinFileRename) {
SCOPED_TRACE(T);
Annotations Code(T);
auto TU = TestTU::withCode(Code.code());
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
TU.ExtraArgs.push_back("-xobjective-c++");
auto AST = TU.build();
for (const auto &RenamePos : Code.points()) {

View File

@ -462,9 +462,6 @@ TEST(SelectionTest, CommonAncestor) {
TestTU TU;
TU.Code = std::string(Test.code());
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
TU.ExtraArgs.push_back("-xobjective-c++");
auto AST = TU.build();

View File

@ -74,9 +74,6 @@ void checkHighlightings(llvm::StringRef Code,
TestTU TU;
TU.Code = std::string(Test.code());
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
TU.ExtraArgs.push_back("-std=c++20");
for (auto File : AdditionalFiles)

View File

@ -896,9 +896,6 @@ TEST(LocateSymbol, All) {
TestTU TU;
TU.Code = std::string(T.code());
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
TU.ExtraArgs.push_back("-fno-delayed-template-parsing");
TU.ExtraArgs.push_back("-xobjective-c++");
auto AST = TU.build();

View File

@ -176,9 +176,6 @@ TEST_F(DefineInlineTest, CheckForCanonDecl) {
}
TEST_F(DefineInlineTest, UsingShadowDecls) {
// Template body is not parsed until instantiation time on windows, which
// results in arbitrary failures as function body becomes NULL.
ExtraArgs.push_back("-fno-delayed-template-parsing");
EXPECT_UNAVAILABLE(R"cpp(
namespace ns1 { void foo(int); }
namespace ns2 { void foo(int*); }
@ -426,9 +423,6 @@ TEST_F(DefineInlineTest, TransformDependentTypes) {
using namespace a;
)cpp";
// Template body is not parsed until instantiation time on windows, which
// results in arbitrary failures as function body becomes NULL.
ExtraArgs.push_back("-fno-delayed-template-parsing");
EXPECT_EQ(apply(Test), Expected);
}
@ -512,9 +506,6 @@ TEST_F(DefineInlineTest, TransformFunctionTempls) {
)cpp"},
};
// Template body is not parsed until instantiation time on windows, which
// results in arbitrary failures as function body becomes NULL.
ExtraArgs.push_back("-fno-delayed-template-parsing");
for (const auto &Case : Cases)
EXPECT_EQ(apply(Case.first), Case.second) << Case.first;
}
@ -658,7 +649,6 @@ est);
void foo(PARAM, TYPE b, TYPE c, TYPE d = BODY(x)){}
)cpp"},
};
ExtraArgs.push_back("-fno-delayed-template-parsing");
for (const auto &Case : Cases)
EXPECT_EQ(apply(Case.first), Case.second) << Case.first;
}
@ -689,7 +679,6 @@ TEST_F(DefineInlineTest, TransformTemplParamNames) {
};
)cpp";
ExtraArgs.push_back("-fno-delayed-template-parsing");
EXPECT_EQ(apply(Test), Expected);
}
@ -936,7 +925,6 @@ TEST_F(DefineInlineTest, QualifyWithUsingDirectives) {
}
TEST_F(DefineInlineTest, AddInline) {
ExtraArgs.push_back("-fno-delayed-template-parsing");
llvm::StringMap<std::string> EditedFiles;
ExtraFiles["a.h"] = "void foo();";
apply(R"cpp(#include "a.h"

View File

@ -99,9 +99,6 @@ TEST_F(DefineOutlineTest, ApplyTest) {
llvm::StringMap<std::string> EditedFiles;
ExtraFiles["Test.cpp"] = "";
FileName = "Test.hpp";
// Template body is not parsed until instantiation time on windows, which
// results in arbitrary failures as function body becomes NULL.
ExtraArgs.push_back("-fno-delayed-template-parsing");
struct {
llvm::StringRef Test;

View File

@ -74,9 +74,6 @@ TEST_F(ExpandAutoTypeTest, Test) {
// expanding types in structured bindings is syntactically invalid.
EXPECT_UNAVAILABLE("const ^auto &[x,y] = (int[]){1,2};");
// FIXME: Auto-completion in a template requires disabling delayed template
// parsing.
ExtraArgs.push_back("-fno-delayed-template-parsing");
// unknown types in a template should not be replaced
EXPECT_THAT(apply("template <typename T> void x() { ^auto y = T::z(); }"),
StartsWith("fail: Could not deduce type for 'auto' type"));