Skip to content

Commit

Permalink
Revert "[clang] NFCI: Adopt SourceManager::getFileEntryRefForID()"
Browse files Browse the repository at this point in the history
This reverts commit ddbcc10.

The 'clang-tidy/checkers/misc/header-include-cycle.cpp' test started failing on Windows: https://lab.llvm.org/buildbot/#/builders/216/builds/26855.
  • Loading branch information
jansvoboda11 committed Sep 6, 2023
1 parent 8d933ea commit 0a9611f
Show file tree
Hide file tree
Showing 30 changed files with 58 additions and 70 deletions.
2 changes: 1 addition & 1 deletion clang/include/clang/ASTMatchers/ASTMatchers.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ AST_POLYMORPHIC_MATCHER_REGEX(isExpansionInFileMatching,
return false;
}
auto FileEntry =
SourceManager.getFileEntryRefForID(SourceManager.getFileID(ExpansionLoc));
SourceManager.getFileEntryForID(SourceManager.getFileID(ExpansionLoc));
if (!FileEntry) {
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions clang/include/clang/Basic/SourceLocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#ifndef LLVM_CLANG_BASIC_SOURCELOCATION_H
#define LLVM_CLANG_BASIC_SOURCELOCATION_H

#include "clang/Basic/FileEntry.h"
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include <cassert>
Expand Down Expand Up @@ -357,6 +356,8 @@ class PresumedLoc {
}
};

class FileEntry;

/// A SourceLocation and its associated SourceManager.
///
/// This is useful for argument passing to functions that expect both objects.
Expand Down Expand Up @@ -412,7 +413,6 @@ class FullSourceLoc : public SourceLocation {
unsigned getColumnNumber(bool *Invalid = nullptr) const;

const FileEntry *getFileEntry() const;
OptionalFileEntryRef getFileEntryRef() const;

/// Return a StringRef to the source buffer data for the
/// specified FileID.
Expand Down
3 changes: 1 addition & 2 deletions clang/lib/ARCMigrate/ARCMT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,7 @@ bool MigrationProcess::applyTransform(TransformFn trans,
I = rewriter.buffer_begin(), E = rewriter.buffer_end(); I != E; ++I) {
FileID FID = I->first;
RewriteBuffer &buf = I->second;
OptionalFileEntryRef file =
Ctx.getSourceManager().getFileEntryRefForID(FID);
const FileEntry *file = Ctx.getSourceManager().getFileEntryForID(FID);
assert(file);
std::string newFname = std::string(file->getName());
newFname += "-trans";
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/ARCMigrate/ObjCMT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1785,7 +1785,7 @@ class JSONEditWriter : public edit::EditsReceiver {
std::tie(FID, Offset) = SourceMgr.getDecomposedLoc(Loc);
assert(FID.isValid());
SmallString<200> Path =
StringRef(SourceMgr.getFileEntryRefForID(FID)->getName());
StringRef(SourceMgr.getFileEntryForID(FID)->getName());
llvm::sys::fs::make_absolute(Path);
OS << " \"file\": \"";
OS.write_escaped(Path.str()) << "\",\n";
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/ARCMigrate/PlistReporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void arcmt::writeARCDiagsToPlist(const std::string &outPath,
" <array>\n";

for (FileID FID : Fids)
EmitString(o << " ", SM.getFileEntryRefForID(FID)->getName()) << '\n';
EmitString(o << " ", SM.getFileEntryForID(FID)->getName()) << '\n';

o << " </array>\n"
" <key>diagnostics</key>\n"
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/AST/MicrosoftMangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ MicrosoftMangleContextImpl::MicrosoftMangleContextImpl(ASTContext &Context,
// The generated names are intended to look similar to what MSVC generates,
// which are something like "?A0x01234567@".
SourceManager &SM = Context.getSourceManager();
if (OptionalFileEntryRef FE = SM.getFileEntryRefForID(SM.getMainFileID())) {
if (const FileEntry *FE = SM.getFileEntryForID(SM.getMainFileID())) {
// Truncate the hash so we get 8 characters of hexadecimal.
uint32_t TruncatedHash = uint32_t(xxh3_64bits(FE->getName()));
AnonymousNamespaceHash = llvm::utohexstr(TruncatedHash);
Expand Down
5 changes: 2 additions & 3 deletions clang/lib/Analysis/PathDiagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,8 @@ static bool compareCrossTUSourceLocs(FullSourceLoc XL, FullSourceLoc YL) {
std::pair<bool, bool> InSameTU = SM.isInTheSameTranslationUnit(XOffs, YOffs);
if (InSameTU.first)
return XL.isBeforeInTranslationUnitThan(YL);
OptionalFileEntryRef XFE =
SM.getFileEntryRefForID(XL.getSpellingLoc().getFileID());
OptionalFileEntryRef YFE = SM.getFileEntryRefForID(YL.getSpellingLoc().getFileID());
const FileEntry *XFE = SM.getFileEntryForID(XL.getSpellingLoc().getFileID());
const FileEntry *YFE = SM.getFileEntryForID(YL.getSpellingLoc().getFileID());
if (!XFE || !YFE)
return XFE && !YFE;
int NameCmp = XFE->getName().compare(YFE->getName());
Expand Down
5 changes: 0 additions & 5 deletions clang/lib/Basic/SourceLocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,6 @@ const FileEntry *FullSourceLoc::getFileEntry() const {
return SrcMgr->getFileEntryForID(getFileID());
}

OptionalFileEntryRef FullSourceLoc::getFileEntryRef() const {
assert(isValid());
return SrcMgr->getFileEntryRefForID(getFileID());
}

unsigned FullSourceLoc::getExpansionLineNumber(bool *Invalid) const {
assert(isValid());
return SrcMgr->getExpansionLineNumber(*this, Invalid);
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Basic/SourceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ SourceLocation SourceManager::getImmediateSpellingLoc(SourceLocation Loc) const{

/// Return the filename of the file containing a SourceLocation.
StringRef SourceManager::getFilename(SourceLocation SpellingLoc) const {
if (OptionalFileEntryRef F = getFileEntryRefForID(getFileID(SpellingLoc)))
if (const FileEntry *F = getFileEntryForID(getFileID(SpellingLoc)))
return F->getName();
return StringRef();
}
Expand Down
6 changes: 3 additions & 3 deletions clang/lib/CodeGen/CodeGenModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3215,7 +3215,7 @@ bool CodeGenModule::isInNoSanitizeList(SanitizerMask Kind, llvm::Function *Fn,
return true;
// NoSanitize by location. Check "mainfile" prefix.
auto &SM = Context.getSourceManager();
FileEntryRef MainFile = *SM.getFileEntryRefForID(SM.getMainFileID());
const FileEntry &MainFile = *SM.getFileEntryForID(SM.getMainFileID());
if (NoSanitizeL.containsMainFile(Kind, MainFile.getName()))
return true;

Expand All @@ -3236,7 +3236,7 @@ bool CodeGenModule::isInNoSanitizeList(SanitizerMask Kind,
return true;
auto &SM = Context.getSourceManager();
if (NoSanitizeL.containsMainFile(
Kind, SM.getFileEntryRefForID(SM.getMainFileID())->getName(), Category))
Kind, SM.getFileEntryForID(SM.getMainFileID())->getName(), Category))
return true;
if (NoSanitizeL.containsLocation(Kind, Loc, Category))
return true;
Expand Down Expand Up @@ -3302,7 +3302,7 @@ CodeGenModule::isFunctionBlockedByProfileList(llvm::Function *Fn,
// If location is unknown, this may be a compiler-generated function. Assume
// it's located in the main file.
auto &SM = Context.getSourceManager();
if (auto MainFile = SM.getFileEntryRefForID(SM.getMainFileID()))
if (const auto *MainFile = SM.getFileEntryForID(SM.getMainFileID()))
if (auto V = ProfileList.isFileExcluded(MainFile->getName(), Kind))
return *V;
return ProfileList.getDefault(Kind);
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Frontend/ASTUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1493,8 +1493,8 @@ StringRef ASTUnit::getMainFileName() const {
}

if (SourceMgr) {
if (OptionalFileEntryRef FE =
SourceMgr->getFileEntryRefForID(SourceMgr->getMainFileID()))
if (const FileEntry *
FE = SourceMgr->getFileEntryForID(SourceMgr->getMainFileID()))
return FE->getName();
}

Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Frontend/FrontendAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
} else {
auto &OldSM = AST->getSourceManager();
FileID ID = OldSM.getMainFileID();
if (auto File = OldSM.getFileEntryRefForID(ID))
if (auto *File = OldSM.getFileEntryForID(ID))
Input = FrontendInputFile(File->getName(), Kind);
else
Input = FrontendInputFile(OldSM.getBufferOrFake(ID), Kind);
Expand Down Expand Up @@ -844,7 +844,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
return false;
}
// We now have the filename...
FileName = FE->getName();
FileName = FE->getFileEntry().getName();
// ... still a header unit, but now use the path as written.
Kind = Input.getKind().withHeaderUnit(InputKind::HeaderUnit_Abs);
Input = FrontendInputFile(FileName, Kind, Input.isSystem());
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Frontend/HeaderIncludeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ void HeaderIncludesCallback::FileSkipped(const FileEntryRef &SkippedFile, const
}

void HeaderIncludesJSONCallback::EndOfMainFile() {
OptionalFileEntryRef FE = SM.getFileEntryRefForID(SM.getMainFileID());
const FileEntry *FE = SM.getFileEntryForID(SM.getMainFileID());
SmallString<256> MainFile(FE->getName());
SM.getFileManager().makeAbsolutePath(MainFile);

Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Frontend/LogDiagnosticPrinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void LogDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level,
const SourceManager &SM = Info.getSourceManager();
FileID FID = SM.getMainFileID();
if (FID.isValid()) {
if (OptionalFileEntryRef FE = SM.getFileEntryRefForID(FID))
if (const FileEntry *FE = SM.getFileEntryForID(FID))
MainFilename = std::string(FE->getName());
}
}
Expand Down Expand Up @@ -147,7 +147,7 @@ void LogDiagnosticPrinter::HandleDiagnostic(DiagnosticsEngine::Level Level,
// At least print the file name if available:
FileID FID = SM.getFileID(Info.getLocation());
if (FID.isValid()) {
if (OptionalFileEntryRef FE = SM.getFileEntryRefForID(FID))
if (const FileEntry *FE = SM.getFileEntryForID(FID))
DE.Filename = std::string(FE->getName());
}
} else {
Expand Down
16 changes: 8 additions & 8 deletions clang/lib/Frontend/PrecompiledPreamble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,19 +550,19 @@ llvm::ErrorOr<PrecompiledPreamble> PrecompiledPreamble::Build(

SourceManager &SourceMgr = Clang->getSourceManager();
for (auto &Filename : PreambleDepCollector->getDependencies()) {
auto MaybeFile = Clang->getFileManager().getOptionalFileRef(Filename);
if (!MaybeFile ||
MaybeFile == SourceMgr.getFileEntryRefForID(SourceMgr.getMainFileID()))
auto FileOrErr = Clang->getFileManager().getFile(Filename);
if (!FileOrErr ||
*FileOrErr == SourceMgr.getFileEntryForID(SourceMgr.getMainFileID()))
continue;
auto File = *MaybeFile;
if (time_t ModTime = File.getModificationTime()) {
FilesInPreamble[File.getName()] =
PrecompiledPreamble::PreambleFileHash::createForFile(File.getSize(),
auto File = *FileOrErr;
if (time_t ModTime = File->getModificationTime()) {
FilesInPreamble[File->getName()] =
PrecompiledPreamble::PreambleFileHash::createForFile(File->getSize(),
ModTime);
} else {
llvm::MemoryBufferRef Buffer =
SourceMgr.getMemoryBufferForFileOrFake(File);
FilesInPreamble[File.getName()] =
FilesInPreamble[File->getName()] =
PrecompiledPreamble::PreambleFileHash::createForMemoryBuffer(Buffer);
}
}
Expand Down
3 changes: 1 addition & 2 deletions clang/lib/Frontend/Rewrite/FixItRewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ bool FixItRewriter::WriteFixedFiles(
}

for (iterator I = buffer_begin(), E = buffer_end(); I != E; ++I) {
OptionalFileEntryRef Entry =
Rewrite.getSourceMgr().getFileEntryRefForID(I->first);
const FileEntry *Entry = Rewrite.getSourceMgr().getFileEntryForID(I->first);
int fd;
std::string Filename =
FixItOpts->RewriteFilename(std::string(Entry->getName()), fd);
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Frontend/Rewrite/HTMLPrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void HTMLPrinter::HandleTranslationUnit(ASTContext &Ctx) {

// Format the file.
FileID FID = R.getSourceMgr().getMainFileID();
OptionalFileEntryRef Entry = R.getSourceMgr().getFileEntryRefForID(FID);
const FileEntry* Entry = R.getSourceMgr().getFileEntryForID(FID);
StringRef Name;
// In some cases, in particular the case where the input is from stdin,
// there is no entry. Fall back to the memory buffer for a name in those
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Frontend/SARIFDiagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SarifResult SARIFDiagnostic::addLocationToResult(
// At least add the file name if available:
FileID FID = Loc.getFileID();
if (FID.isValid()) {
if (OptionalFileEntryRef FE = Loc.getFileEntryRef()) {
if (const FileEntry *FE = Loc.getFileEntry()) {
emitFilename(FE->getName(), Loc.getManager());
// FIXME(llvm-project/issues/57366): File-only locations
}
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Frontend/TextDiagnostic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ void TextDiagnostic::emitDiagnosticLoc(FullSourceLoc Loc, PresumedLoc PLoc,
if (PLoc.isInvalid()) {
// At least print the file name if available:
if (FileID FID = Loc.getFileID(); FID.isValid()) {
if (OptionalFileEntryRef FE = Loc.getFileEntryRef()) {
if (const FileEntry *FE = Loc.getFileEntry()) {
emitFilename(FE->getName(), Loc.getManager());
OS << ": ";
}
Expand Down
4 changes: 2 additions & 2 deletions clang/lib/Frontend/VerifyDiagnosticConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -868,8 +868,8 @@ static unsigned PrintUnexpected(DiagnosticsEngine &Diags, SourceManager *SourceM
OS << "\n (frontend)";
else {
OS << "\n ";
if (OptionalFileEntryRef File =
SourceMgr->getFileEntryRefForID(SourceMgr->getFileID(I->first)))
if (const FileEntry *File = SourceMgr->getFileEntryForID(
SourceMgr->getFileID(I->first)))
OS << " File " << File->getName();
OS << " Line " << SourceMgr->getPresumedLineNumber(I->first);
}
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Index/CommentToXML.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ void CommentASTToXMLConverter::visitFullComment(const FullComment *C) {
unsigned FileOffset = LocInfo.second;

if (FID.isValid()) {
if (OptionalFileEntryRef FE = SM.getFileEntryRefForID(FID)) {
if (const FileEntry *FE = SM.getFileEntryForID(FID)) {
Result << " file=\"";
appendToResultWithXMLEscaping(FE->getName());
Result << "\"";
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Index/USRGeneration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static bool printLoc(llvm::raw_ostream &OS, SourceLocation Loc,
}
Loc = SM.getExpansionLoc(Loc);
const std::pair<FileID, unsigned> &Decomposed = SM.getDecomposedLoc(Loc);
OptionalFileEntryRef FE = SM.getFileEntryRefForID(Decomposed.first);
const FileEntry *FE = SM.getFileEntryForID(Decomposed.first);
if (FE) {
OS << llvm::sys::path::filename(FE->getName());
} else {
Expand Down
6 changes: 3 additions & 3 deletions clang/lib/Sema/Sema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ class SemaPPCallbacks : public PPCallbacks {
SourceLocation IncludeLoc = SM.getIncludeLoc(SM.getFileID(Loc));
if (IncludeLoc.isValid()) {
if (llvm::timeTraceProfilerEnabled()) {
OptionalFileEntryRef FE = SM.getFileEntryRefForID(SM.getFileID(Loc));
llvm::timeTraceProfilerBegin("Source", FE ? FE->getName()
: StringRef("<unknown>"));
const FileEntry *FE = SM.getFileEntryForID(SM.getFileID(Loc));
llvm::timeTraceProfilerBegin(
"Source", FE != nullptr ? FE->getName() : StringRef("<unknown>"));
}

IncludeStack.push_back(IncludeLoc);
Expand Down
3 changes: 1 addition & 2 deletions clang/lib/Sema/SemaModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ void Sema::HandleStartOfHeaderUnit() {

StringRef HUName = getLangOpts().CurrentModule;
if (HUName.empty()) {
HUName =
SourceMgr.getFileEntryRefForID(SourceMgr.getMainFileID())->getName();
HUName = SourceMgr.getFileEntryForID(SourceMgr.getMainFileID())->getName();
const_cast<LangOptions &>(getLangOpts()).CurrentModule = HUName.str();
}

Expand Down
27 changes: 13 additions & 14 deletions clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class HTMLDiagnostics : public PathDiagnosticConsumer {
// Add HTML header/footers to file specified by FID
void FinalizeHTML(const PathDiagnostic &D, Rewriter &R,
const SourceManager &SMgr, const PathPieces &path,
FileID FID, FileEntryRef Entry, const char *declName);
FileID FID, const FileEntry *Entry, const char *declName);

// Rewrite the file specified by FID with HTML formatting.
void RewriteFile(Rewriter &R, const PathPieces &path, FileID FID);
Expand Down Expand Up @@ -326,7 +326,7 @@ void HTMLDiagnostics::ReportDiag(const PathDiagnostic& D,
FileID ReportFile =
path.back()->getLocation().asLocation().getExpansionLoc().getFileID();

OptionalFileEntryRef Entry = SMgr.getFileEntryRefForID(ReportFile);
const FileEntry *Entry = SMgr.getFileEntryForID(ReportFile);

FileName << llvm::sys::path::filename(Entry->getName()).str() << "-"
<< declName.c_str() << "-" << offsetDecl << "-";
Expand Down Expand Up @@ -396,7 +396,7 @@ std::string HTMLDiagnostics::GenerateHTML(const PathDiagnostic& D, Rewriter &R,
os << "<div class=FileNav><a href=\"#File" << (I - 1)->getHashValue()
<< "\">&#x2190;</a></div>";

os << "<h4 class=FileName>" << SMgr.getFileEntryRefForID(*I)->getName()
os << "<h4 class=FileName>" << SMgr.getFileEntryForID(*I)->getName()
<< "</h4>\n";

// Right nav arrow
Expand Down Expand Up @@ -429,8 +429,8 @@ std::string HTMLDiagnostics::GenerateHTML(const PathDiagnostic& D, Rewriter &R,
// Add CSS, header, and footer.
FileID FID =
path.back()->getLocation().asLocation().getExpansionLoc().getFileID();
OptionalFileEntryRef Entry = SMgr.getFileEntryRefForID(FID);
FinalizeHTML(D, R, SMgr, path, FileIDs[0], *Entry, declName);
const FileEntry* Entry = SMgr.getFileEntryForID(FID);
FinalizeHTML(D, R, SMgr, path, FileIDs[0], Entry, declName);

std::string file;
llvm::raw_string_ostream os(file);
Expand Down Expand Up @@ -537,17 +537,16 @@ document.addEventListener("DOMContentLoaded", function() {
return s;
}

void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic &D, Rewriter &R,
const SourceManager &SMgr,
const PathPieces &path, FileID FID,
FileEntryRef Entry, const char *declName) {
void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic& D, Rewriter &R,
const SourceManager& SMgr, const PathPieces& path, FileID FID,
const FileEntry *Entry, const char *declName) {
// This is a cludge; basically we want to append either the full
// working directory if we have no directory information. This is
// a work in progress.

llvm::SmallString<0> DirName;

if (llvm::sys::path::is_relative(Entry.getName())) {
if (llvm::sys::path::is_relative(Entry->getName())) {
llvm::sys::fs::current_path(DirName);
DirName += '/';
}
Expand Down Expand Up @@ -576,7 +575,7 @@ void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic &D, Rewriter &R,
<< "<h3>Bug Summary</h3>\n<table class=\"simpletable\">\n"
"<tr><td class=\"rowname\">File:</td><td>"
<< html::EscapeText(DirName)
<< html::EscapeText(Entry.getName())
<< html::EscapeText(Entry->getName())
<< "</td></tr>\n<tr><td class=\"rowname\">Warning:</td><td>"
"<a href=\"#EndPath\">line "
<< LineNumber
Expand Down Expand Up @@ -657,9 +656,9 @@ void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic &D, Rewriter &R,
if (!BugCategory.empty())
os << "\n<!-- BUGCATEGORY " << BugCategory << " -->\n";

os << "\n<!-- BUGFILE " << DirName << Entry.getName() << " -->\n";
os << "\n<!-- BUGFILE " << DirName << Entry->getName() << " -->\n";

os << "\n<!-- FILENAME " << llvm::sys::path::filename(Entry.getName()) << " -->\n";
os << "\n<!-- FILENAME " << llvm::sys::path::filename(Entry->getName()) << " -->\n";

os << "\n<!-- FUNCTIONNAME " << declName << " -->\n";

Expand All @@ -683,7 +682,7 @@ void HTMLDiagnostics::FinalizeHTML(const PathDiagnostic &D, Rewriter &R,
R.InsertTextBefore(SMgr.getLocForStartOfFile(FID), os.str());
}

html::AddHeaderFooterInternalBuiltinCSS(R, FID, Entry.getName());
html::AddHeaderFooterInternalBuiltinCSS(R, FID, Entry->getName());
}

StringRef HTMLDiagnostics::showHelpJavascript() {
Expand Down

0 comments on commit 0a9611f

Please sign in to comment.