Skip to content

Commit f78a60b

Browse files
committed
Merge remote-tracking branch 'otcshare/sycl' into private/abatashe/post_commit
* otcshare/sycl: (469 commits) [SYCL] Implement thread-local storage restriction (intel#1281) [Driver][SYCL][FPGA] Adjust the output location for the project report (intel#1278) [SYCL][NFC] Fix static code analysis concerns (intel#1283) [SYCL] Fix the test/basic_tests/buffer/subbuffer.cpp (intel#1277) [SYCL][CUDA] Implement the program kernel names query (intel#1248) [SYCL] Honor the LLVM_LIBDIR_SUFFIX variable at installation time (intel#1261) [SYCL][UX] Diagnostic for undefined device functions (intel#1026) [SYCL] Reverse reqd_work_group_size attribute (intel#1234) [SYCL] Rename project to oneAPI DPC++ Compiler (intel#1249) [SYCL][XPTI] Instrumentation of SYCL runtime with XPTI (intel#1129) [SYCL] Add buffer dimensions restriction (intel#1147) [SYCL][NFC] Update copyright header in handler files (intel#1271) [SYCL][NFC] Format the code with clang-format [SYCL][Test] Fix SYCL library location path for LIT tests (intel#1228) [SYCL][NFC] Fix doxygen warnings (intel#1270) [SYCL][CUDA] Add the CUDA backend to the deploy-sycl-toolchain target (intel#1268) [SYCL][NFC] Fix a misleading comment regarding the SYCL flow (intel#1266) Change capability for SpecId decoration README.md: Mention retrieving llvm archive signatures travis: Restore macOS builds ...
2 parents 4ee3269 + eb373c4 commit f78a60b

File tree

1,478 files changed

+54436
-20794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,478 files changed

+54436
-20794
lines changed

CONTRIBUTING.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Contributing
22

33
## License
4-
Intel Project for LLVM* technology is licensed under the terms of the
4+
Intel Project for LLVM\* technology is licensed under the terms of the
55
Apache-2.0 with LLVM-exception license ([LICENSE.txt](llvm/LICENSE.TXT))
66
to ensure our ability to contribute this project to the LLVM project
77
under the same license.
@@ -70,11 +70,11 @@ commit automatically with `git commit -s`.
7070
### Development
7171

7272
- Create a personal fork of the project on GitHub
73-
- Use **sycl** branch as baseline for your changes
73+
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
74+
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
7475
- Prepare your patch (follow
7576
[LLVM coding standards](https://llvm.org/docs/CodingStandards.html))
76-
- Build the project and run all tests (see
77-
[GetStartedWithSYCLCompiler.md](sycl/doc/GetStartedWithSYCLCompiler.md))
77+
- Build the project and run all tests
7878

7979
### Review and acceptance testing
8080

@@ -94,4 +94,8 @@ Project maintainers merge pull requests using one of the following options:
9494
- [Squash and merge] Used when there are multiple commits in the PR
9595
- Squashing is done to make sure that the project is buildable on any commit
9696
- [Create a merge commit] Used for LLVM pull-down PRs to preserve hashes of the
97-
commits pulled from the LLVM community repository
97+
commits pulled from the LLVM community repository
98+
99+
100+
*Other names and brands may be claimed as the property of others.
101+

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
# Intel Project for LLVM* technology
1+
# Intel Project for LLVM\* technology
22

33
## Introduction
44

55
Intel staging area for llvm.org contribution.
66
Home for Intel LLVM-based projects:
7-
- SYCL* Compiler and Runtimes - compiler and runtime libraries for SYCL ([https://www.khronos.org/sycl/](https://www.khronos.org/sycl/)). See **sycl** branch.
7+
- oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
8+
oneAPI and DPC++ is available at
9+
([https://www.oneapi.com/](https://www.oneapi.com/))
810

911
## License
1012
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
1113

12-
1314
## Contributing
1415
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
1516

1617
## Sub-projects Documentation
17-
- SYCL Compiler and Runtimes - See [GetStartedWithSYCLCompiler.md](sycl/doc/GetStartedWithSYCLCompiler.md)
18+
- oneAPI Data Parallel C++ compiler - See
19+
[GetStartedGuide.md](sycl/doc/GetStartedGuide.md)
1820

19-
*Other names and brands may be claimed as the property of others.
21+
## DPC++ extensions
2022

21-
## SYCL Extension Proposal Documents
23+
DPC++ is an open, cross-architecture language built upon the ISO C++ and Khronos
24+
SYCL\* standards. DPC++ extends these standards with a number of extensions,
25+
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
2226

23-
See [sycl/doc/extensions](sycl/doc/extensions)
27+
\*Other names and brands may be claimed as the property of others.
2428

buildbot/configure.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ def do_configure(args):
1010
llvm_dir = os.path.join(args.src_dir, "llvm")
1111
sycl_dir = os.path.join(args.src_dir, "sycl")
1212
spirv_dir = os.path.join(args.src_dir, "llvm-spirv")
13+
xpti_dir = os.path.join(args.src_dir, "xpti")
1314
ocl_header_dir = os.path.join(args.obj_dir, "OpenCL-Headers")
1415
icd_loader_lib = os.path.join(args.obj_dir, "OpenCL-ICD-Loader", "build")
1516
llvm_targets_to_build = 'X86'
16-
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot'
17+
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti'
1718
libclc_targets_to_build = ''
1819
sycl_build_pi_cuda = 'OFF'
1920
llvm_enable_assertions = 'ON'
@@ -48,9 +49,10 @@ def do_configure(args):
4849
"-DCMAKE_BUILD_TYPE={}".format(args.build_type),
4950
"-DLLVM_ENABLE_ASSERTIONS={}".format(llvm_enable_assertions),
5051
"-DLLVM_TARGETS_TO_BUILD={}".format(llvm_targets_to_build),
51-
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot",
52+
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti",
5253
"-DLLVM_EXTERNAL_SYCL_SOURCE_DIR={}".format(sycl_dir),
5354
"-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR={}".format(spirv_dir),
55+
"-DLLVM_EXTERNAL_XPTI_SOURCE_DIR={}".format(xpti_dir),
5456
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
5557
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),
5658
"-DOpenCL_INCLUDE_DIR={}".format(ocl_header_dir),
@@ -61,7 +63,8 @@ def do_configure(args):
6163
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
6264
"-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests.
6365
"-DLLVM_ENABLE_DOXYGEN={}".format(llvm_enable_doxygen),
64-
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
66+
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
67+
"-DSYCL_ENABLE_XPTI_TRACING=ON", # Explicitly turn on XPTI tracing
6568
llvm_dir
6669
]
6770

clang-tools-extra/clang-tidy/ClangTidy.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,8 @@ ClangTidyASTConsumerFactory::CreateASTConsumer(
409409
}
410410

411411
for (auto &Check : Checks) {
412+
if (!Check->isLanguageVersionSupported(Context.getLangOpts()))
413+
continue;
412414
Check->registerMatchers(&*Finder);
413415
Check->registerPPCallbacks(*SM, PP, ModuleExpanderPP);
414416
}

clang-tools-extra/clang-tidy/ClangTidyCheck.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,24 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback {
5353
/// constructor using the Options.get() methods below.
5454
ClangTidyCheck(StringRef CheckName, ClangTidyContext *Context);
5555

56+
/// Override this to disable registering matchers and PP callbacks if an
57+
/// invalid language version is being used.
58+
///
59+
/// For example if a check is examining overloaded functions then this should
60+
/// be overridden to return false when the CPlusPlus flag is not set in
61+
/// \p LangOpts.
62+
virtual bool isLanguageVersionSupported(const LangOptions &LangOpts) const {
63+
return true;
64+
}
65+
5666
/// Override this to register ``PPCallbacks`` in the preprocessor.
5767
///
5868
/// This should be used for clang-tidy checks that analyze preprocessor-
5969
/// dependent properties, e.g. include directives and macro definitions.
6070
///
71+
/// This will only be executed if the function isLanguageVersionSupported
72+
/// returns true.
73+
///
6174
/// There are two Preprocessors to choose from that differ in how they handle
6275
/// modular #includes:
6376
/// - PP is the real Preprocessor. It doesn't walk into modular #includes and
@@ -80,6 +93,9 @@ class ClangTidyCheck : public ast_matchers::MatchFinder::MatchCallback {
8093
/// "this" will be used as callback, but you can also specify other callback
8194
/// classes. Thereby, different matchers can trigger different callbacks.
8295
///
96+
/// This will only be executed if the function isLanguageVersionSupported
97+
/// returns true.
98+
///
8399
/// If you need to merge information between the different matchers, you can
84100
/// store these as members of the derived class. However, note that all
85101
/// matches occur in the order of the AST traversal.

clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ void NoRecursionCheck::check(const MatchFinder::MatchResult &Result) {
264264
for (llvm::scc_iterator<CallGraph *> SCCI = llvm::scc_begin(&CG),
265265
SCCE = llvm::scc_end(&CG);
266266
SCCI != SCCE; ++SCCI) {
267-
if (!SCCI.hasLoop()) // We only care about cycles, not standalone nodes.
267+
if (!SCCI.hasCycle()) // We only care about cycles, not standalone nodes.
268268
continue;
269269
handleSCC(*SCCI);
270270
}

clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,12 @@ bool MakeSmartPtrCheck::isLanguageVersionSupported(
6868
void MakeSmartPtrCheck::registerPPCallbacks(const SourceManager &SM,
6969
Preprocessor *PP,
7070
Preprocessor *ModuleExpanderPP) {
71-
if (isLanguageVersionSupported(getLangOpts())) {
7271
Inserter = std::make_unique<utils::IncludeInserter>(SM, getLangOpts(),
7372
IncludeStyle);
7473
PP->addPPCallbacks(Inserter->CreatePPCallbacks());
75-
}
7674
}
7775

7876
void MakeSmartPtrCheck::registerMatchers(ast_matchers::MatchFinder *Finder) {
79-
if (!isLanguageVersionSupported(getLangOpts()))
80-
return;
81-
8277
// Calling make_smart_ptr from within a member function of a type with a
8378
// private or protected constructor would be ill-formed.
8479
auto CanCallCtor = unless(has(ignoringImpCasts(

clang-tools-extra/clang-tidy/modernize/MakeSmartPtrCheck.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MakeSmartPtrCheck : public ClangTidyCheck {
4141
virtual SmartPtrTypeMatcher getSmartPointerTypeMatcher() const = 0;
4242

4343
/// Returns whether the C++ version is compatible with current check.
44-
virtual bool isLanguageVersionSupported(const LangOptions &LangOpts) const;
44+
bool isLanguageVersionSupported(const LangOptions &LangOpts) const override;
4545

4646
static const char PointerType[];
4747

clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ AST_MATCHER(CXXRecordDecl, isMoveConstructible) {
4646
}
4747
} // namespace
4848

49-
static TypeMatcher constRefType() {
50-
return lValueReferenceType(pointee(isConstQualified()));
49+
static TypeMatcher notTemplateSpecConstRefType() {
50+
return lValueReferenceType(
51+
pointee(unless(templateSpecializationType()), isConstQualified()));
5152
}
5253

5354
static TypeMatcher nonConstValueType() {
@@ -145,16 +146,18 @@ void PassByValueCheck::registerMatchers(MatchFinder *Finder) {
145146
// ParenListExpr is generated instead of a CXXConstructExpr,
146147
// filtering out templates automatically for us.
147148
withInitializer(cxxConstructExpr(
148-
has(ignoringParenImpCasts(declRefExpr(to(
149-
parmVarDecl(
150-
hasType(qualType(
151-
// Match only const-ref or a non-const value
152-
// parameters. Rvalues and const-values
153-
// shouldn't be modified.
154-
ValuesOnly ? nonConstValueType()
155-
: anyOf(constRefType(),
156-
nonConstValueType()))))
157-
.bind("Param"))))),
149+
has(ignoringParenImpCasts(declRefExpr(
150+
to(parmVarDecl(
151+
hasType(qualType(
152+
// Match only const-ref or a non-const
153+
// value parameters. Rvalues,
154+
// TemplateSpecializationValues and
155+
// const-values shouldn't be modified.
156+
ValuesOnly
157+
? nonConstValueType()
158+
: anyOf(notTemplateSpecConstRefType(),
159+
nonConstValueType()))))
160+
.bind("Param"))))),
158161
hasDeclaration(cxxConstructorDecl(
159162
isCopyConstructor(), unless(isDeleted()),
160163
hasDeclContext(

clang-tools-extra/clang-tidy/utils/LexerUtils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "LexerUtils.h"
10+
#include "clang/Basic/SourceManager.h"
1011

1112
namespace clang {
1213
namespace tidy {

clang-tools-extra/clangd/AST.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "clang/Basic/SourceManager.h"
2626
#include "clang/Basic/Specifiers.h"
2727
#include "clang/Index/USRGeneration.h"
28-
#include "clang/Lex/Lexer.h"
2928
#include "llvm/ADT/ArrayRef.h"
3029
#include "llvm/ADT/Optional.h"
3130
#include "llvm/ADT/STLExtras.h"
@@ -417,16 +416,8 @@ class DeducedTypeVisitor : public RecursiveASTVisitor<DeducedTypeVisitor> {
417416

418417
llvm::Optional<QualType> getDeducedType(ASTContext &ASTCtx,
419418
SourceLocation Loc) {
420-
Token Tok;
421-
// Only try to find a deduced type if the token is auto or decltype.
422-
if (!Loc.isValid() ||
423-
Lexer::getRawToken(Loc, Tok, ASTCtx.getSourceManager(),
424-
ASTCtx.getLangOpts(), false) ||
425-
!Tok.is(tok::raw_identifier) ||
426-
!(Tok.getRawIdentifier() == "auto" ||
427-
Tok.getRawIdentifier() == "decltype")) {
419+
if (!Loc.isValid())
428420
return {};
429-
}
430421
DeducedTypeVisitor V(Loc);
431422
V.TraverseAST(ASTCtx);
432423
if (V.DeducedType.isNull())

clang-tools-extra/clangd/AST.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ NestedNameSpecifierLoc getQualifierLoc(const NamedDecl &ND);
109109
QualType declaredType(const TypeDecl *D);
110110

111111
/// Retrieves the deduced type at a given location (auto, decltype).
112-
/// Retuns None unless Loc starts an auto/decltype token.
113112
/// It will return the underlying type.
114113
llvm::Optional<QualType> getDeducedType(ASTContext &, SourceLocation Loc);
115114

clang-tools-extra/clangd/ClangdLSPServer.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ void ClangdLSPServer::onWorkspaceSymbol(
761761
void ClangdLSPServer::onPrepareRename(const TextDocumentPositionParams &Params,
762762
Callback<llvm::Optional<Range>> Reply) {
763763
Server->prepareRename(Params.textDocument.uri.file(), Params.position,
764-
std::move(Reply));
764+
RenameOpts, std::move(Reply));
765765
}
766766

767767
void ClangdLSPServer::onRename(const RenameParams &Params,
@@ -772,8 +772,7 @@ void ClangdLSPServer::onRename(const RenameParams &Params,
772772
return Reply(llvm::make_error<LSPError>(
773773
"onRename called for non-added file", ErrorCode::InvalidParams));
774774
Server->rename(
775-
File, Params.position, Params.newName,
776-
/*WantFormat=*/true,
775+
File, Params.position, Params.newName, RenameOpts,
777776
[File, Params, Reply = std::move(Reply),
778777
this](llvm::Expected<FileEdits> Edits) mutable {
779778
if (!Edits)
@@ -1230,12 +1229,14 @@ void ClangdLSPServer::onDocumentLink(
12301229
ClangdLSPServer::ClangdLSPServer(
12311230
class Transport &Transp, const FileSystemProvider &FSProvider,
12321231
const clangd::CodeCompleteOptions &CCOpts,
1232+
const clangd::RenameOptions &RenameOpts,
12331233
llvm::Optional<Path> CompileCommandsDir, bool UseDirBasedCDB,
12341234
llvm::Optional<OffsetEncoding> ForcedOffsetEncoding,
12351235
const ClangdServer::Options &Opts)
12361236
: BackgroundContext(Context::current().clone()), Transp(Transp),
12371237
MsgHandler(new MessageHandler(*this)), FSProvider(FSProvider),
1238-
CCOpts(CCOpts), SupportedSymbolKinds(defaultSymbolKinds()),
1238+
CCOpts(CCOpts), RenameOpts(RenameOpts),
1239+
SupportedSymbolKinds(defaultSymbolKinds()),
12391240
SupportedCompletionItemKinds(defaultCompletionItemKinds()),
12401241
UseDirBasedCDB(UseDirBasedCDB),
12411242
CompileCommandsDir(std::move(CompileCommandsDir)), ClangdServerOpts(Opts),

clang-tools-extra/clangd/ClangdLSPServer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ class ClangdLSPServer : private ClangdServer::Callbacks {
4242
// FIXME: Clean up signature around CDBs.
4343
ClangdLSPServer(Transport &Transp, const FileSystemProvider &FSProvider,
4444
const clangd::CodeCompleteOptions &CCOpts,
45+
const clangd::RenameOptions &RenameOpts,
4546
llvm::Optional<Path> CompileCommandsDir, bool UseDirBasedCDB,
4647
llvm::Optional<OffsetEncoding> ForcedOffsetEncoding,
4748
const ClangdServer::Options &Opts);
@@ -197,6 +198,8 @@ class ClangdLSPServer : private ClangdServer::Callbacks {
197198
const FileSystemProvider &FSProvider;
198199
/// Options used for code completion
199200
clangd::CodeCompleteOptions CCOpts;
201+
/// Options used for rename.
202+
clangd::RenameOptions RenameOpts;
200203
/// Options used for diagnostics.
201204
ClangdDiagnosticOptions DiagOpts;
202205
/// The supported kinds of the client.

clang-tools-extra/clangd/ClangdServer.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ ClangdServer::ClangdServer(const GlobalCompilationDatabase &CDB,
131131
: nullptr),
132132
GetClangTidyOptions(Opts.GetClangTidyOptions),
133133
SuggestMissingIncludes(Opts.SuggestMissingIncludes),
134-
CrossFileRename(Opts.CrossFileRename), TweakFilter(Opts.TweakFilter),
135-
WorkspaceRoot(Opts.WorkspaceRoot),
134+
TweakFilter(Opts.TweakFilter), WorkspaceRoot(Opts.WorkspaceRoot),
136135
// Pass a callback into `WorkScheduler` to extract symbols from a newly
137136
// parsed file and rebuild the file index synchronously each time an AST
138137
// is parsed.
@@ -319,8 +318,9 @@ ClangdServer::formatOnType(llvm::StringRef Code, PathRef File, Position Pos,
319318
}
320319

321320
void ClangdServer::prepareRename(PathRef File, Position Pos,
321+
const RenameOptions &RenameOpts,
322322
Callback<llvm::Optional<Range>> CB) {
323-
auto Action = [Pos, File = File.str(), CB = std::move(CB),
323+
auto Action = [Pos, File = File.str(), CB = std::move(CB), RenameOpts,
324324
this](llvm::Expected<InputsAndAST> InpAST) mutable {
325325
if (!InpAST)
326326
return CB(InpAST.takeError());
@@ -338,14 +338,13 @@ void ClangdServer::prepareRename(PathRef File, Position Pos,
338338
SM, CharSourceRange::getCharRange(TouchingIdentifier->location(),
339339
TouchingIdentifier->endLocation()));
340340

341-
if (CrossFileRename)
341+
if (RenameOpts.AllowCrossFile)
342342
// FIXME: we now assume cross-file rename always succeeds, revisit this.
343343
return CB(Range);
344344

345345
// Performing the local rename isn't substantially more expensive than
346346
// doing an AST-based check, so we just rename and throw away the results.
347-
auto Changes = clangd::rename({Pos, "dummy", AST, File, Index,
348-
/*AllowCrossFile=*/false,
347+
auto Changes = clangd::rename({Pos, "dummy", AST, File, Index, RenameOpts,
349348
/*GetDirtyBuffer=*/nullptr});
350349
if (!Changes) {
351350
// LSP says to return null on failure, but that will result in a generic
@@ -359,10 +358,10 @@ void ClangdServer::prepareRename(PathRef File, Position Pos,
359358
}
360359

361360
void ClangdServer::rename(PathRef File, Position Pos, llvm::StringRef NewName,
362-
bool WantFormat, Callback<FileEdits> CB) {
361+
const RenameOptions &Opts, Callback<FileEdits> CB) {
363362
// A snapshot of all file dirty buffers.
364363
llvm::StringMap<std::string> Snapshot = WorkScheduler.getAllFileContents();
365-
auto Action = [File = File.str(), NewName = NewName.str(), Pos, WantFormat,
364+
auto Action = [File = File.str(), NewName = NewName.str(), Pos, Opts,
366365
CB = std::move(CB), Snapshot = std::move(Snapshot),
367366
this](llvm::Expected<InputsAndAST> InpAST) mutable {
368367
if (!InpAST)
@@ -374,12 +373,12 @@ void ClangdServer::rename(PathRef File, Position Pos, llvm::StringRef NewName,
374373
return llvm::None;
375374
return It->second;
376375
};
377-
auto Edits = clangd::rename({Pos, NewName, InpAST->AST, File, Index,
378-
CrossFileRename, GetDirtyBuffer});
376+
auto Edits = clangd::rename(
377+
{Pos, NewName, InpAST->AST, File, Index, Opts, GetDirtyBuffer});
379378
if (!Edits)
380379
return CB(Edits.takeError());
381380

382-
if (WantFormat) {
381+
if (Opts.WantFormat) {
383382
auto Style = getFormatStyleForFile(File, InpAST->Inputs.Contents,
384383
InpAST->Inputs.FS.get());
385384
llvm::Error Err = llvm::Error::success();

0 commit comments

Comments
 (0)