Skip to content

Commit 3549f63

Browse files
committed
Merge from 'main' to 'sycl-web' (32 commits)
CONFLICT (content): Merge conflict in clang/lib/Driver/ToolChains/Cuda.h
2 parents cfef6ca + debfa43 commit 3549f63

File tree

84 files changed

+2411
-563
lines changed

Some content is hidden

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

84 files changed

+2411
-563
lines changed

bolt/include/bolt/Core/BinarySection.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ class BinarySection {
232232
return isText() > Other.isText();
233233

234234
// Read-only before writable.
235-
if (isReadOnly() != Other.isReadOnly())
236-
return isReadOnly() > Other.isReadOnly();
235+
if (isWritable() != Other.isWritable())
236+
return isWritable() < Other.isWritable();
237237

238238
// BSS at the end.
239239
if (isBSS() != Other.isBSS())
@@ -275,10 +275,7 @@ class BinarySection {
275275
bool isTBSS() const { return isBSS() && isTLS(); }
276276
bool isVirtual() const { return ELFType == ELF::SHT_NOBITS; }
277277
bool isRela() const { return ELFType == ELF::SHT_RELA; }
278-
bool isReadOnly() const {
279-
return ((ELFFlags & ELF::SHF_ALLOC) && !(ELFFlags & ELF::SHF_WRITE) &&
280-
ELFType == ELF::SHT_PROGBITS);
281-
}
278+
bool isWritable() const { return (ELFFlags & ELF::SHF_WRITE); }
282279
bool isAllocatable() const {
283280
if (isELF()) {
284281
return (ELFFlags & ELF::SHF_ALLOC) && !isTBSS();

bolt/include/bolt/Core/MCPlusBuilder.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,9 @@ class MCPlusBuilder {
822822
/// \brief Given a branch instruction try to get the address the branch
823823
/// targets. Return true on success, and the address in Target.
824824
virtual bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size,
825-
uint64_t &Target) const;
825+
uint64_t &Target) const {
826+
return Analysis->evaluateBranch(Inst, Addr, Size, Target);
827+
}
826828

827829
/// Return true if one of the operands of the \p Inst instruction uses
828830
/// PC-relative addressing.

bolt/lib/Core/BinaryFunction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ BinaryFunction::processIndirectBranch(MCInst &Instruction, unsigned Size,
891891
if (!Value)
892892
return IndirectBranchType::UNKNOWN;
893893

894-
if (!BC.getSectionForAddress(ArrayStart)->isReadOnly())
894+
if (BC.getSectionForAddress(ArrayStart)->isWritable())
895895
return IndirectBranchType::UNKNOWN;
896896

897897
outs() << "BOLT-INFO: fixed indirect branch detected in " << *this

bolt/lib/Core/MCPlusBuilder.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -321,11 +321,6 @@ void MCPlusBuilder::printAnnotations(const MCInst &Inst,
321321
}
322322
}
323323

324-
bool MCPlusBuilder::evaluateBranch(const MCInst &Inst, uint64_t Addr,
325-
uint64_t Size, uint64_t &Target) const {
326-
return Analysis->evaluateBranch(Inst, Addr, Size, Target);
327-
}
328-
329324
void MCPlusBuilder::getClobberedRegs(const MCInst &Inst,
330325
BitVector &Regs) const {
331326
if (isPrefix(Inst) || isCFI(Inst))

bolt/lib/Passes/BinaryPasses.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ bool SimplifyRODataLoads::simplifyRODataLoads(BinaryFunction &BF) {
11521152
// memory operand. We are only interested in read-only sections.
11531153
ErrorOr<BinarySection &> DataSection =
11541154
BC.getSectionForAddress(TargetAddress);
1155-
if (!DataSection || !DataSection->isReadOnly())
1155+
if (!DataSection || DataSection->isWritable())
11561156
continue;
11571157

11581158
if (BC.getRelocationAt(TargetAddress) ||

bolt/lib/Profile/DataAggregator.cpp

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -644,13 +644,12 @@ void DataAggregator::processProfile(BinaryContext &BC) {
644644
processMemEvents();
645645

646646
// Mark all functions with registered events as having a valid profile.
647+
const auto Flags = opts::BasicAggregation ? BinaryFunction::PF_SAMPLE
648+
: BinaryFunction::PF_LBR;
647649
for (auto &BFI : BC.getBinaryFunctions()) {
648650
BinaryFunction &BF = BFI.second;
649-
if (getBranchData(BF) || getFuncSampleData(BF.getNames())) {
650-
const auto Flags = opts::BasicAggregation ? BinaryFunction::PF_SAMPLE
651-
: BinaryFunction::PF_LBR;
651+
if (getBranchData(BF) || getFuncSampleData(BF.getNames()))
652652
BF.markProfiled(Flags);
653-
}
654653
}
655654

656655
// Release intermediate storage.
@@ -727,17 +726,14 @@ bool DataAggregator::doIntraBranch(BinaryFunction &Func, uint64_t From,
727726

728727
From -= Func.getAddress();
729728
To -= Func.getAddress();
730-
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: bumpBranchCount: " << Func.getPrintName()
731-
<< " @ " << Twine::utohexstr(From) << " -> "
732-
<< Func.getPrintName() << " @ " << Twine::utohexstr(To)
733-
<< '\n');
729+
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: bumpBranchCount: "
730+
<< formatv("{0} @ {1:x} -> {0} @ {2:x}\n", Func, From, To));
734731
if (BAT) {
735732
From = BAT->translate(Func.getAddress(), From, /*IsBranchSrc=*/true);
736733
To = BAT->translate(Func.getAddress(), To, /*IsBranchSrc=*/false);
737-
LLVM_DEBUG(dbgs() << "BOLT-DEBUG: BAT translation on bumpBranchCount: "
738-
<< Func.getPrintName() << " @ " << Twine::utohexstr(From)
739-
<< " -> " << Func.getPrintName() << " @ "
740-
<< Twine::utohexstr(To) << '\n');
734+
LLVM_DEBUG(
735+
dbgs() << "BOLT-DEBUG: BAT translation on bumpBranchCount: "
736+
<< formatv("{0} @ {1:x} -> {0} @ {2:x}\n", Func, From, To));
741737
}
742738

743739
AggrData->bumpBranchCount(From, To, Count, Mispreds);
@@ -1712,8 +1708,7 @@ void DataAggregator::processMemEvents() {
17121708
BinaryFunction *Func = getBinaryFunctionContainingAddress(PC);
17131709
if (!Func) {
17141710
LLVM_DEBUG(if (PC != 0) {
1715-
dbgs() << "Skipped mem event: 0x" << Twine::utohexstr(PC) << " => 0x"
1716-
<< Twine::utohexstr(Addr) << "\n";
1711+
dbgs() << formatv("Skipped mem event: {0:x} => {1:x}\n", PC, Addr);
17171712
});
17181713
continue;
17191714
}
@@ -2139,10 +2134,10 @@ std::error_code DataAggregator::parseTaskEvents() {
21392134
<< BinaryMMapInfo.size() << " PID(s)\n";
21402135

21412136
LLVM_DEBUG({
2142-
for (std::pair<const uint64_t, MMapInfo> &MMI : BinaryMMapInfo)
2143-
outs() << " " << MMI.second.PID << (MMI.second.Forked ? " (forked)" : "")
2144-
<< ": (0x" << Twine::utohexstr(MMI.second.MMapAddress) << ": 0x"
2145-
<< Twine::utohexstr(MMI.second.Size) << ")\n";
2137+
for (const MMapInfo &MMI : llvm::make_second_range(BinaryMMapInfo))
2138+
outs() << formatv(" {0}{1}: ({2:x}: {3:x})\n", MMI.PID,
2139+
(MMI.Forked ? " (forked)" : ""), MMI.MMapAddress,
2140+
MMI.Size);
21462141
});
21472142

21482143
return std::error_code();

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2537,12 +2537,12 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
25372537
BC->getBinaryFunctionAtAddress(Address + 1)) {
25382538
// Do an extra check that the function was referenced previously.
25392539
// It's a linear search, but it should rarely happen.
2540-
bool Found =
2541-
llvm::any_of(llvm::make_second_range(ContainingBF->Relocations),
2542-
[&](const Relocation &Rel) {
2543-
return Rel.Symbol == RogueBF->getSymbol() &&
2544-
!Relocation::isPCRelative(Rel.Type);
2545-
});
2540+
auto CheckReloc = [&](const Relocation &Rel) {
2541+
return Rel.Symbol == RogueBF->getSymbol() &&
2542+
!Relocation::isPCRelative(Rel.Type);
2543+
};
2544+
bool Found = llvm::any_of(
2545+
llvm::make_second_range(ContainingBF->Relocations), CheckReloc);
25462546

25472547
if (Found) {
25482548
errs() << "BOLT-WARNING: detected possible compiler de-virtualization "
@@ -2581,7 +2581,7 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
25812581
ReferencedBF->registerReferencedOffset(RefFunctionOffset);
25822582
}
25832583
if (opts::Verbosity > 1 &&
2584-
!BinarySection(*BC, RelocatedSection).isReadOnly())
2584+
BinarySection(*BC, RelocatedSection).isWritable())
25852585
errs() << "BOLT-WARNING: writable reference into the middle of the "
25862586
<< formatv("function {0} detected at address {1:x}\n",
25872587
*ReferencedBF, Rel.getOffset());
@@ -2675,15 +2675,13 @@ void RewriteInstance::handleRelocation(const SectionRef &RelocatedSection,
26752675

26762676
auto checkMaxDataRelocations = [&]() {
26772677
++NumDataRelocations;
2678-
if (opts::MaxDataRelocations &&
2679-
NumDataRelocations + 1 == opts::MaxDataRelocations) {
2680-
LLVM_DEBUG({
2681-
dbgs() << "BOLT-DEBUG: processing ending on data relocation "
2682-
<< NumDataRelocations << ": ";
2683-
});
2678+
LLVM_DEBUG(if (opts::MaxDataRelocations &&
2679+
NumDataRelocations + 1 == opts::MaxDataRelocations) {
2680+
dbgs() << "BOLT-DEBUG: processing ending on data relocation "
2681+
<< NumDataRelocations << ": ";
26842682
printRelocationInfo(Rel, ReferencedSymbol->getName(), SymbolAddress,
26852683
Addend, ExtractedValue);
2686-
}
2684+
});
26872685

26882686
return (!opts::MaxDataRelocations ||
26892687
NumDataRelocations < opts::MaxDataRelocations);
@@ -3915,7 +3913,7 @@ void RewriteInstance::mapAllocatableSections(RuntimeDyld &RTDyld) {
39153913
if (!Section.hasValidSectionID())
39163914
continue;
39173915

3918-
if (Section.isReadOnly() != (SType == ST_READONLY))
3916+
if (Section.isWritable() == (SType == ST_READONLY))
39193917
continue;
39203918

39213919
if (Section.getOutputAddress()) {
@@ -4165,7 +4163,7 @@ void RewriteInstance::rewriteNoteSections() {
41654163
// Set/modify section info.
41664164
BinarySection &NewSection = BC->registerOrUpdateNoteSection(
41674165
SectionName, SectionData, Size, Section.sh_addralign,
4168-
BSec->isReadOnly(), BSec->getELFType());
4166+
!BSec->isWritable(), BSec->getELFType());
41694167
NewSection.setOutputAddress(0);
41704168
NewSection.setOutputFileOffset(NextAvailableOffset);
41714169

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -435,34 +435,6 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
435435
return getTargetAddend(Op.getExpr());
436436
}
437437

438-
bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size,
439-
uint64_t &Target) const override {
440-
size_t OpNum = 0;
441-
442-
if (isConditionalBranch(Inst)) {
443-
assert(MCPlus::getNumPrimeOperands(Inst) >= 2 &&
444-
"Invalid number of operands");
445-
OpNum = 1;
446-
}
447-
448-
if (isTB(Inst)) {
449-
assert(MCPlus::getNumPrimeOperands(Inst) >= 3 &&
450-
"Invalid number of operands");
451-
OpNum = 2;
452-
}
453-
454-
if (Info->get(Inst.getOpcode()).OpInfo[OpNum].OperandType !=
455-
MCOI::OPERAND_PCREL) {
456-
assert((isIndirectBranch(Inst) || isIndirectCall(Inst)) &&
457-
"FAILED evaluateBranch");
458-
return false;
459-
}
460-
461-
int64_t Imm = Inst.getOperand(OpNum).getImm() << 2;
462-
Target = Addr + Imm;
463-
return true;
464-
}
465-
466438
bool replaceBranchTarget(MCInst &Inst, const MCSymbol *TBB,
467439
MCContext *Ctx) const override {
468440
assert((isCall(Inst) || isBranch(Inst)) && !isIndirectBranch(Inst) &&

clang-tools-extra/clang-tidy/misc/CMakeLists.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,7 @@ set(LLVM_LINK_COMPONENTS
33
Support
44
)
55

6-
set(CLANG_TIDY_CONFUSABLE_CHARS_GEN "clang-tidy-confusable-chars-gen" CACHE
7-
STRING "Host clang-tidy-confusable-chars-gen executable. Saves building if cross-compiling.")
8-
9-
if(NOT CLANG_TIDY_CONFUSABLE_CHARS_GEN STREQUAL "clang-tidy-confusable-chars-gen")
10-
set(clang_tidy_confusable_chars_gen ${CLANG_TIDY_CONFUSABLE_CHARS_GEN})
11-
set(clang_tidy_confusable_chars_gen_target ${CLANG_TIDY_CONFUSABLE_CHARS_GEN})
12-
elseif(LLVM_USE_HOST_TOOLS)
13-
build_native_tool(clang-tidy-confusable-chars-gen clang_tidy_confusable_chars_gen)
14-
set(clang_tidy_confusable_chars_gen_target "${clang_tidy_confusable_chars_gen}")
15-
else()
16-
set(clang_tidy_confusable_chars_gen $<TARGET_FILE:clang-tidy-confusable-chars-gen>)
17-
set(clang_tidy_confusable_chars_gen_target clang-tidy-confusable-chars-gen)
18-
endif()
6+
setup_host_tool(clang-tidy-confusable-chars-gen CLANG_TIDY_CONFUSABLE_CHARS_GEN clang_tidy_confusable_chars_gen clang_tidy_confusable_chars_gen_target)
197

208
add_subdirectory(ConfusableTable)
219

clang-tools-extra/pseudo/include/CMakeLists.txt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
# The cxx.bnf grammar file
22
set(cxx_bnf ${CMAKE_CURRENT_SOURCE_DIR}/../lib/cxx/cxx.bnf)
33

4-
set(CLANG_PSEUDO_GEN "clang-pseudo-gen" CACHE
5-
STRING "Host clang-pseudo-gen executable. Saves building if cross-compiling.")
6-
7-
if(NOT CLANG_PSEUDO_GEN STREQUAL "clang-pseudo-gen")
8-
set(pseudo_gen ${CLANG_PSEUDO_GEN})
9-
set(pseudo_gen_target ${CLANG_PSEUDO_GEN})
10-
elseif(LLVM_USE_HOST_TOOLS)
11-
# The NATIVE executable *must* depend on the current target, otherwise the
12-
# native one won't get rebuilt when the pseudo-gen sources change.
13-
build_native_tool(clang-pseudo-gen pseudo_gen DEPENDS clang-pseudo-gen)
14-
set(pseudo_gen_target "${pseudo_gen}")
15-
else()
16-
set(pseudo_gen $<TARGET_FILE:clang-pseudo-gen>)
17-
set(pseudo_gen_target clang-pseudo-gen)
18-
endif()
4+
setup_host_tool(clang-pseudo-gen CLANG_PSEUDO_GEN pseudo_gen pseudo_gen_target)
195

206
# Generate inc files.
217
set(cxx_symbols_inc ${CMAKE_CURRENT_BINARY_DIR}/CXXSymbols.inc)

clang/docs/UsersManual.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3824,6 +3824,20 @@ backend.
38243824
Operating System Features and Limitations
38253825
-----------------------------------------
38263826

3827+
Apple
3828+
^^^^^
3829+
3830+
On Apple platforms, the standard headers and libraries are not provided by
3831+
the base system and are instead part of the Xcode SDK application. The location
3832+
of the SDK is determined any of the following ways:
3833+
3834+
- If passed to Clang, the ``-isysroot`` option specifies the path to the SDK.
3835+
3836+
- If the sysroot isn't provided, the ``SDKROOT`` environment variable is checked.
3837+
This variable is set by various Xcode tools.
3838+
3839+
- Otherwise, Clang uses Xcode's ``xcrun`` tool to find the SDK.
3840+
38273841
Windows
38283842
^^^^^^^
38293843

clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ class UnsafeBufferUsageHandler {
3131
using FixItList = llvm::SmallVectorImpl<FixItHint>;
3232

3333
/// Invoked when an unsafe operation over raw pointers is found.
34-
virtual void handleUnsafeOperation(const Stmt *Operation) = 0;
34+
virtual void handleUnsafeOperation(const Stmt *Operation,
35+
bool IsRelatedToDecl) = 0;
3536

3637
/// Invoked when a fix is suggested against a variable.
3738
virtual void handleFixableVariable(const VarDecl *Variable,

clang/include/clang/Basic/DiagnosticFrontendKinds.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,11 @@ def err_test_module_file_extension_version : Error<
256256
"test module file extension '%0' has different version (%1.%2) than expected "
257257
"(%3.%4)">;
258258

259+
def err_missing_vfs_stat_cache_file : Error<
260+
"stat cache file '%0' not found">, DefaultFatal;
261+
def err_invalid_vfs_stat_cache : Error<
262+
"invalid stat cache file '%0'">, DefaultFatal;
263+
259264
def err_missing_vfs_overlay_file : Error<
260265
"virtual filesystem overlay file '%0' not found">, DefaultFatal;
261266
def err_invalid_vfs_overlay : Error<

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12023,12 +12023,16 @@ def err_loongarch_builtin_requires_la64 : Error<
1202312023
"this builtin requires target: loongarch64">;
1202412024

1202512025
// Unsafe buffer usage diagnostics.
12026-
def warn_unsafe_buffer_expression : Warning<
12027-
"unchecked operation on raw buffer in expression">,
12028-
InGroup<UnsafeBufferUsage>, DefaultIgnore;
1202912026
def warn_unsafe_buffer_variable : Warning<
12030-
"variable %0 participates in unchecked buffer operations">,
12027+
"%0 is an %select{unsafe pointer used for buffer access|unsafe buffer that "
12028+
"does not perform bounds checks}1">,
12029+
InGroup<UnsafeBufferUsage>, DefaultIgnore;
12030+
def warn_unsafe_buffer_operation : Warning<
12031+
"%select{unsafe pointer operation|unsafe pointer arithmetic|"
12032+
"unsafe buffer access}0">,
1203112033
InGroup<UnsafeBufferUsage>, DefaultIgnore;
12034+
def note_unsafe_buffer_operation : Note<
12035+
"used%select{| in pointer arithmetic| in buffer access}0 here">;
1203212036
def err_loongarch_builtin_requires_la32 : Error<
1203312037
"this builtin requires target: loongarch32">;
1203412038
} // end of sema component.

clang/include/clang/Driver/Options.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3515,6 +3515,8 @@ def iwithsysroot : JoinedOrSeparate<["-"], "iwithsysroot">, Group<clang_i_Group>
35153515
HelpText<"Add directory to SYSTEM include search path, "
35163516
"absolute paths are relative to -isysroot">, MetaVarName<"<directory>">,
35173517
Flags<[CC1Option]>;
3518+
def ivfsstatcache : JoinedOrSeparate<["-"], "ivfsstatcache">, Group<clang_i_Group>, Flags<[CC1Option]>,
3519+
HelpText<"Use the stat data cached in file instead of doing filesystem syscalls. See clang-stat-cache utility.">;
35183520
def ivfsoverlay : JoinedOrSeparate<["-"], "ivfsoverlay">, Group<clang_i_Group>, Flags<[CC1Option]>,
35193521
HelpText<"Overlay the virtual filesystem described by file over the real file system">;
35203522
def imultilib : Separate<["-"], "imultilib">, Group<gfortran_Group>;

clang/include/clang/Frontend/CompilerInvocation.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ IntrusiveRefCntPtr<llvm::vfs::FileSystem> createVFSFromCompilerInvocation(
296296

297297
IntrusiveRefCntPtr<llvm::vfs::FileSystem>
298298
createVFSFromOverlayFiles(ArrayRef<std::string> VFSOverlayFiles,
299+
ArrayRef<std::string> VFSStatCacheFiles,
299300
DiagnosticsEngine &Diags,
300301
IntrusiveRefCntPtr<llvm::vfs::FileSystem> BaseFS);
301302

clang/include/clang/Lex/HeaderSearchOptions.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ class HeaderSearchOptions {
181181
/// of computing the module hash.
182182
llvm::SmallSetVector<llvm::CachedHashString, 16> ModulesIgnoreMacros;
183183

184+
/// The set of user-provided stat cache files.
185+
std::vector<std::string> VFSStatCacheFiles;
186+
184187
/// The set of user-provided virtual filesystem overlay files.
185188
std::vector<std::string> VFSOverlayFiles;
186189

@@ -250,6 +253,10 @@ class HeaderSearchOptions {
250253
SystemHeaderPrefixes.emplace_back(Prefix, IsSystemHeader);
251254
}
252255

256+
void AddVFSStatCacheFile(StringRef Name) {
257+
VFSStatCacheFiles.push_back(std::string(Name));
258+
}
259+
253260
void AddVFSOverlayFile(StringRef Name) {
254261
VFSOverlayFiles.push_back(std::string(Name));
255262
}

clang/include/clang/Tooling/Transformer/SourceCode.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,14 @@ llvm::Error validateEditRange(const CharSourceRange &Range,
104104
/// will be rewritten to
105105
/// foo(6)
106106
std::optional<CharSourceRange>
107-
getRangeForEdit(const CharSourceRange &EditRange, const SourceManager &SM,
108-
const LangOptions &LangOpts, bool IncludeMacroExpansion = true);
107+
getFileRangeForEdit(const CharSourceRange &EditRange, const SourceManager &SM,
108+
const LangOptions &LangOpts,
109+
bool IncludeMacroExpansion = true);
109110
inline std::optional<CharSourceRange>
110-
getRangeForEdit(const CharSourceRange &EditRange, const ASTContext &Context,
111-
bool IncludeMacroExpansion = true) {
112-
return getRangeForEdit(EditRange, Context.getSourceManager(),
113-
Context.getLangOpts(), IncludeMacroExpansion);
111+
getFileRangeForEdit(const CharSourceRange &EditRange, const ASTContext &Context,
112+
bool IncludeMacroExpansion = true) {
113+
return getFileRangeForEdit(EditRange, Context.getSourceManager(),
114+
Context.getLangOpts(), IncludeMacroExpansion);
114115
}
115116

116117
/// Attempts to resolve the given range to one that starts and ends in a

0 commit comments

Comments
 (0)