diff --git a/src/sksl/SkSLAnalysis.cpp b/src/sksl/SkSLAnalysis.cpp index e42f65ce6c276..6afa3671e1243 100644 --- a/src/sksl/SkSLAnalysis.cpp +++ b/src/sksl/SkSLAnalysis.cpp @@ -78,7 +78,7 @@ class MergeSampleUsageVisitor : public ProgramVisitor { SampleUsage visit(const Program& program) { fUsage = SampleUsage(); // reset to none - this->INHERITED::visit(program); + INHERITED::visit(program); return fUsage; } @@ -125,7 +125,7 @@ class MergeSampleUsageVisitor : public ProgramVisitor { } } - return this->INHERITED::visitExpression(e); + return INHERITED::visitExpression(e); } using INHERITED = ProgramVisitor; @@ -141,7 +141,7 @@ class BuiltinVariableVisitor : public ProgramVisitor { const VariableReference& var = e.as(); return var.fVariable->fModifiers.fLayout.fBuiltin == fBuiltin; } - return this->INHERITED::visitExpression(e); + return INHERITED::visitExpression(e); } int fBuiltin; @@ -160,17 +160,17 @@ class NodeCountVisitor : public ProgramVisitor { bool visitExpression(const Expression& e) override { ++fCount; - return this->INHERITED::visitExpression(e); + return INHERITED::visitExpression(e); } bool visitProgramElement(const ProgramElement& p) override { ++fCount; - return this->INHERITED::visitProgramElement(p); + return INHERITED::visitProgramElement(p); } bool visitStatement(const Statement& s) override { ++fCount; - return this->INHERITED::visitStatement(s); + return INHERITED::visitStatement(s); } private: @@ -197,7 +197,7 @@ class VariableWriteVisitor : public ProgramVisitor { return true; } } - return this->INHERITED::visitExpression(e); + return INHERITED::visitExpression(e); } private: @@ -254,7 +254,6 @@ bool ProgramVisitor::visitExpression(const Expression& e) { case Expression::Kind::kBoolLiteral: case Expression::Kind::kDefined: case Expression::Kind::kExternalValue: - case Expression::Kind::kFieldAccess: case Expression::Kind::kFloatLiteral: case Expression::Kind::kFunctionReference: case Expression::Kind::kIntLiteral: @@ -279,6 +278,8 @@ bool ProgramVisitor::visitExpression(const Expression& e) { if (this->visitExpression(*arg)) { return true; } } return false; } + case Expression::Kind::kFieldAccess: + return this->visitExpression(*e.as().fBase); case Expression::Kind::kFunctionCall: { const FunctionCall& c = e.as(); for (const auto& arg : c.fArguments) {