Skip to content

Commit

Permalink
Merge pull request #38576 from smuzaffar/llvm14-fix
Browse files Browse the repository at this point in the history
[llvm14] Changes needed for llvm 13 and above
  • Loading branch information
cmsbuild authored Jul 4, 2022
2 parents c1be270 + 39b261a commit 36d3f6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Utilities/StaticAnalyzers/src/EDMPluginDumper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ namespace clangcms {
for (unsigned J = 0, F = I->getTemplateArgs().size(); J != F; ++J) {
llvm::SmallString<100> buf;
llvm::raw_svector_ostream os(buf);
#if LLVM_VERSION_MAJOR >= 13
I->getTemplateArgs().get(J).print(mgr.getASTContext().getPrintingPolicy(), os, false);
#else
I->getTemplateArgs().get(J).print(mgr.getASTContext().getPrintingPolicy(), os);
#endif
std::string rname = os.str().str();
std::string fname("plugins.txt.unsorted");
std::string ostring = rname + "\n";
Expand Down
8 changes: 8 additions & 0 deletions Utilities/StaticAnalyzers/src/getByChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ namespace clangcms {
os << rname << " ";
const ClassTemplateSpecializationDecl *SD = dyn_cast<ClassTemplateSpecializationDecl>(RD);
for (unsigned J = 0, F = SD->getTemplateArgs().size(); J != F; ++J) {
#if LLVM_VERSION_MAJOR >= 13
SD->getTemplateArgs().data()[J].print(Policy, os, false);
#else
SD->getTemplateArgs().data()[J].print(Policy, os);
#endif
os << ", ";
}
} else {
Expand All @@ -94,7 +98,11 @@ namespace clangcms {
os << SRD->getQualifiedNameAsString() << " ";
const ClassTemplateSpecializationDecl *SVD = dyn_cast<ClassTemplateSpecializationDecl>(SRD);
for (unsigned J = 0, F = SVD->getTemplateArgs().size(); J != F; ++J) {
#if LLVM_VERSION_MAJOR >= 13
SVD->getTemplateArgs().data()[J].print(Policy, os, false);
#else
SVD->getTemplateArgs().data()[J].print(Policy, os);
#endif
os << ", ";
}
}
Expand Down

0 comments on commit 36d3f6f

Please sign in to comment.