Options.IncludeBriefComments = false;
IncludeStructure PreambleInclusions; // Unused for signatureHelp
semaCodeComplete(
- std::make_unique<SignatureHelpCollector>(Options, Index, Result),
- Options,
+ std::make_unique<SignatureHelpCollector>(Options, Index, Result), Options,
{FileName, Command, Preamble, Contents, *Offset, std::move(VFS)});
return Result;
}
for (unsigned I = 0; I <= L.Length; ++I)
EXPECT_THAT_EXPECTED(positionToOffset(File, position(L.Number, I)),
llvm::HasValue(L.Offset + I));
- EXPECT_THAT_EXPECTED(positionToOffset(File, position(L.Number, L.Length+1)),
- llvm::HasValue(L.Offset + L.Length));
+ EXPECT_THAT_EXPECTED(
+ positionToOffset(File, position(L.Number, L.Length + 1)),
+ llvm::HasValue(L.Offset + L.Length));
EXPECT_THAT_EXPECTED(
positionToOffset(File, position(L.Number, L.Length + 1), false),
llvm::Failed()); // out of range
{""},
},
};
- for (const auto& Case : Cases) {
+ for (const auto &Case : Cases) {
EXPECT_EQ(Case.second,
visibleNamespaces(Case.first, format::getLLVMStyle()))
<< Case.first;
EXPECT_THAT(*Result, MacroName("MACRO"));
}
-TEST(SourceCodeTests, IsInsideMainFile){
+TEST(SourceCodeTests, IsInsideMainFile) {
TestTU TU;
TU.HeaderCode = R"cpp(
#define DEFINE_CLASS(X) class X {};
TU.ExtraArgs.push_back("-DHeader=Header3");
TU.ExtraArgs.push_back("-DMain=Main3");
auto AST = TU.build();
- const auto& SM = AST.getSourceManager();
+ const auto &SM = AST.getSourceManager();
auto DeclLoc = [&AST](llvm::StringRef Name) {
return findDecl(AST, Name).getLocation();
};
TU.AdditionalFiles["foo.inc"] = "int foo;\n";
TU.AdditionalFiles["bar.inc"] = "int bar;\n";
auto AST = TU.build();
- const auto& SM = AST.getSourceManager();
+ const auto &SM = AST.getSourceManager();
FileID Foo = SM.getFileID(findDecl(AST, "foo").getLocation());
EXPECT_EQ(SM.getFileOffset(includeHashLoc(Foo, SM)),