Skip to content

Commit 3dd0368

Browse files
Barnabás Domozimcserep
authored andcommitted
Upgrade LLVM to v19.
1 parent 916d987 commit 3dd0368

File tree

8 files changed

+26
-23
lines changed

8 files changed

+26
-23
lines changed

plugins/cpp/parser/include/cppparser/filelocutil.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class FileLocUtil
9191
if (fid.isInvalid())
9292
return std::string();
9393

94-
const clang::FileEntry* fileEntry = _clangSrcMan.getFileEntryForID(fid);
94+
const clang::OptionalFileEntryRef fileEntry = _clangSrcMan.getFileEntryRefForID(fid);
9595
if (!fileEntry)
9696
return std::string();
9797

plugins/cpp/parser/src/cppparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ model::BuildActionPtr CppParser::addBuildAction(
232232

233233
model::BuildActionPtr buildAction(new model::BuildAction);
234234

235-
std::string extension = fs::extension(command_.Filename);
235+
std::string extension = fs::path(command_.Filename).extension().string();
236236

237237
buildAction->command = boost::algorithm::join(command_.CommandLine, " ");
238238
buildAction->type

plugins/cpp/parser/src/doccommentformatter.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ FullCommentParts::FullCommentParts(
5858

5959
switch (child->getCommentKind())
6060
{
61-
case Comment::NoCommentKind:
61+
case CommentKind::None:
6262
continue;
6363

64-
case Comment::ParagraphCommentKind:
64+
case CommentKind::ParagraphComment:
6565
{
6666
const ParagraphComment* pc = llvm::cast<ParagraphComment>(child);
6767

@@ -75,7 +75,7 @@ FullCommentParts::FullCommentParts(
7575
break;
7676
}
7777

78-
case Comment::BlockCommandCommentKind:
78+
case CommentKind::BlockCommandComment:
7979
{
8080
const BlockCommandComment* bcc = llvm::cast<BlockCommandComment>(child);
8181
const CommandInfo* Info = traits_.getCommandInfo(bcc->getCommandID());
@@ -94,7 +94,7 @@ FullCommentParts::FullCommentParts(
9494
break;
9595
}
9696

97-
case Comment::ParamCommandCommentKind:
97+
case CommentKind::ParamCommandComment:
9898
{
9999
const ParamCommandComment* pcc = llvm::cast<ParamCommandComment>(child);
100100

@@ -108,7 +108,7 @@ FullCommentParts::FullCommentParts(
108108
break;
109109
}
110110

111-
case Comment::TParamCommandCommentKind:
111+
case CommentKind::TParamCommandComment:
112112
{
113113
const TParamCommandComment* tpcc
114114
= llvm::cast<TParamCommandComment>(child);
@@ -123,11 +123,11 @@ FullCommentParts::FullCommentParts(
123123
break;
124124
}
125125

126-
case Comment::VerbatimBlockCommentKind:
126+
case CommentKind::VerbatimBlockComment:
127127
_miscBlocks.push_back(cast<BlockCommandComment>(child));
128128
break;
129129

130-
case Comment::VerbatimLineCommentKind:
130+
case CommentKind::VerbatimLineComment:
131131
{
132132
const VerbatimLineComment* vlc = llvm::cast<VerbatimLineComment>(child);
133133
const CommandInfo* Info = traits_.getCommandInfo(vlc->getCommandID());
@@ -251,22 +251,22 @@ void CommentToMarkdownConverter::visitInlineCommandComment(
251251

252252
switch (c_->getRenderKind())
253253
{
254-
case InlineCommandComment::RenderNormal:
254+
case InlineCommandRenderKind::Normal:
255255
for (unsigned i = 0, e = c_->getNumArgs(); i != e; ++i)
256256
_res << c_->getArgText(i).str() << ' ';
257257
return;
258258

259-
case InlineCommandComment::RenderBold:
259+
case InlineCommandRenderKind::Bold:
260260
assert(c_->getNumArgs() == 1);
261261
_res << "**" << arg0.str() << "**";
262262
return;
263263

264-
case InlineCommandComment::RenderMonospaced:
264+
case InlineCommandRenderKind::Monospaced:
265265
assert(c_->getNumArgs() == 1);
266266
_res << '`' << arg0.str() << '`';
267267
return;
268268

269-
case InlineCommandComment::RenderEmphasized:
269+
case InlineCommandRenderKind::Emphasized:
270270
assert(c_->getNumArgs() == 1);
271271
_res << '*' << arg0.str() << '*';
272272
return;
@@ -336,9 +336,9 @@ void CommentToMarkdownConverter::visitParamCommandComment(
336336
{
337337
switch (c_->getDirection())
338338
{
339-
case ParamCommandComment::In: _res << "- *in*: "; break;
340-
case ParamCommandComment::Out: _res << "- *out*: "; break;
341-
case ParamCommandComment::InOut: _res << "- *in,out*: "; break;
339+
case ParamCommandPassDirection::In: _res << "- *in*: "; break;
340+
case ParamCommandPassDirection::Out: _res << "- *out*: "; break;
341+
case ParamCommandPassDirection::InOut: _res << "- *in,out*: "; break;
342342
}
343343

344344
_res << "**" << (c_->isParamIndexValid()

plugins/cpp/parser/src/ppincludecallback.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ void PPIncludeCallback::InclusionDirective(
6161
clang::StringRef fileName_,
6262
bool,
6363
clang::CharSourceRange filenameRange_,
64-
clang::Optional<clang::FileEntryRef>,
64+
clang::OptionalFileEntryRef,
6565
clang::StringRef searchPath_,
6666
clang::StringRef,
6767
const clang::Module*,
68+
bool,
6869
clang::SrcMgr::CharacteristicKind)
6970
{
7071
if (searchPath_.empty())

plugins/cpp/parser/src/ppincludecallback.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ class PPIncludeCallback : public clang::PPCallbacks
3838
clang::StringRef FileName,
3939
bool IsAngled,
4040
clang::CharSourceRange FilenameRange,
41-
clang::Optional<clang::FileEntryRef> File,
41+
clang::OptionalFileEntryRef File,
4242
clang::StringRef SearchPath,
4343
clang::StringRef RelativePath,
4444
const clang::Module *Imported,
45+
bool ModuleImported,
4546
clang::SrcMgr::CharacteristicKind FileType) override;
4647

4748
private:

plugins/dummy/parser/src/dummyparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DummyParser::DummyParser(ParserContext& ctx_): AbstractParser(ctx_)
1717

1818
bool DummyParser::accept(const std::string& path_)
1919
{
20-
std::string ext = boost::filesystem::extension(path_);
20+
std::string ext = boost::filesystem::path(path_).string();
2121
return ext == ".dummy";
2222
}
2323

service/workspace/src/workspaceservice.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <boost/filesystem.hpp>
22
#include <workspaceservice/workspaceservice.h>
3+
#include <algorithm>
34

45
namespace cc
56
{

util/include/util/hash.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,18 @@ inline std::string sha1Hash(const std::string& data_)
3636
using namespace boost::uuids::detail;
3737

3838
sha1 hasher;
39-
unsigned int digest[5];
39+
unsigned char digest[20];
4040

4141
hasher.process_bytes(data_.c_str(), data_.size());
4242
hasher.get_digest(digest);
4343

4444
std::stringstream ss;
4545
ss.setf(std::ios::hex, std::ios::basefield);
46-
ss.width(8);
46+
ss.width(2);
4747
ss.fill('0');
4848

49-
for (int i = 0; i < 5; ++i)
50-
ss << digest[i];
49+
for (int i = 0; i < 20; ++i)
50+
ss << (int)digest[i];
5151

5252
return ss.str();
5353
}

0 commit comments

Comments
 (0)