Bug 1598069 - make compliant with future clang 10 our clang based static analysis. r=froydnj

With clang 10 and up `getTemporary` has been replaced with the more versatile `getSubExpr`.
The commit that added this behaviour is: b0561b3346

Differential Revision: https://phabricator.services.mozilla.com/D54101

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andi-Bogdan Postelnicu 2019-11-21 14:07:44 +00:00
Родитель 7afdb8487c
Коммит e8a21331ce
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -298,7 +298,13 @@ inline const Stmt *MaybeSkipOneTrivial(const Stmt *s) {
return ewc->getSubExpr();
}
if (auto *mte = dyn_cast<MaterializeTemporaryExpr>(s)) {
// With clang 10 and up `getTemporary` has been replaced with the more
// versatile `getSubExpr`.
#if CLANG_VERSION_FULL >= 1000
return mte->getSubExpr();
#else
return mte->GetTemporaryExpr();
#endif
}
if (auto *bte = dyn_cast<CXXBindTemporaryExpr>(s)) {
return bte->getSubExpr();