Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[llvm14] Changes needed for llvm 13 and above #38576

Merged
merged 2 commits into from Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions Utilities/StaticAnalyzers/src/EDMPluginDumper.cc
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
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