diff options
author | Johannes Ziegenbalg <Johannes.Ziegenbalg@tu-dresden.de> | 2020-03-27 14:18:32 +0100 |
---|---|---|
committer | Sergio Martins <smartins@kde.org> | 2020-03-28 15:35:57 +0000 |
commit | df41bd29433937111edca3654a7beb11ec765029 (patch) | |
tree | df31574f7af8f6a407ae5a152171a992a06a1862 /src | |
parent | c6b4e029ddec792de96050d0fa76c5b2e900e252 (diff) |
Fix build issues using llvm 10.0.0
Diffstat (limited to 'src')
-rw-r--r-- | src/ClazyStandaloneMain.cpp | 10 | ||||
-rw-r--r-- | src/checks/level0/qstring-ref.cpp | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/ClazyStandaloneMain.cpp b/src/ClazyStandaloneMain.cpp index aada1895..6baae329 100644 --- a/src/ClazyStandaloneMain.cpp +++ b/src/ClazyStandaloneMain.cpp @@ -93,7 +93,11 @@ public: { } +#if LLVM_VERSION_MAJOR >= 10 + std::unique_ptr<FrontendAction> create() override +#else FrontendAction *create() override +#endif { ClazyContext::ClazyOptions options = ClazyContext::ClazyOption_None; @@ -116,9 +120,15 @@ public: options |= ClazyContext::ClazyOption_IgnoreIncludedFiles; // TODO: We need to agregate the fixes with previous run +#if LLVM_VERSION_MAJOR >= 10 + return std::make_unique<ClazyStandaloneASTAction>(s_checks.getValue(), s_headerFilter.getValue(), + s_ignoreDirs.getValue(), s_exportFixes.getValue(), + m_paths, options); +#else return new ClazyStandaloneASTAction(s_checks.getValue(), s_headerFilter.getValue(), s_ignoreDirs.getValue(), s_exportFixes.getValue(), m_paths, options); +#endif } std::vector<std::string> m_paths; }; diff --git a/src/checks/level0/qstring-ref.cpp b/src/checks/level0/qstring-ref.cpp index d1d8a4ea..ec9e8901 100644 --- a/src/checks/level0/qstring-ref.cpp +++ b/src/checks/level0/qstring-ref.cpp @@ -117,7 +117,11 @@ static bool containsChild(Stmt *s, Stmt *target) return true; if (auto mte = dyn_cast<MaterializeTemporaryExpr>(s)) { +#if LLVM_VERSION_MAJOR >= 10 + return containsChild(mte->getSubExpr(), target); +#else return containsChild(mte->getTemporary(), target); +#endif } else if (auto ice = dyn_cast<ImplicitCastExpr>(s)) { return containsChild(ice->getSubExpr(), target); } else if (auto bte = dyn_cast<CXXBindTemporaryExpr>(s)) { |