summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/constfields.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/constfields.cxx')
-rw-r--r--compilerplugins/clang/constfields.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/constfields.cxx b/compilerplugins/clang/constfields.cxx
index 635774810717..b06773c55047 100644
--- a/compilerplugins/clang/constfields.cxx
+++ b/compilerplugins/clang/constfields.cxx
@@ -360,7 +360,7 @@ bool ConstFields::VisitMemberExpr(const MemberExpr* memberExpr)
void ConstFields::check(const FieldDecl* fieldDecl, const Expr* memberExpr)
{
- auto parentsRange = compiler.getASTContext().getParents(*memberExpr);
+ auto parentsRange = getParents(*memberExpr);
const Stmt* child = memberExpr;
const Stmt* parent
= parentsRange.begin() == parentsRange.end() ? nullptr : parentsRange.begin()->get<Stmt>();
@@ -369,7 +369,7 @@ void ConstFields::check(const FieldDecl* fieldDecl, const Expr* memberExpr)
bool bDump = false;
auto walkUp = [&]() {
child = parent;
- auto parentsRange = compiler.getASTContext().getParents(*parent);
+ auto parentsRange = getParents(*parent);
parent = parentsRange.begin() == parentsRange.end() ? nullptr
: parentsRange.begin()->get<Stmt>();
};
@@ -379,7 +379,7 @@ void ConstFields::check(const FieldDecl* fieldDecl, const Expr* memberExpr)
{
// check if we have an expression like
// int& r = m_field;
- auto parentsRange = compiler.getASTContext().getParents(*child);
+ auto parentsRange = getParents(*child);
if (parentsRange.begin() != parentsRange.end())
{
auto varDecl = dyn_cast_or_null<VarDecl>(parentsRange.begin()->get<Decl>());