diff options
Diffstat (limited to 'clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp')
-rw-r--r-- | clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp index e1f68e4..c5c6e90 100644 --- a/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp +++ b/clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp @@ -298,7 +298,7 @@ namespace { // Visitor that builds a map from record prvalues to result objects. // For each result object that it encounters, it propagates the storage location // of the result object to all record prvalues that can initialize it. -class ResultObjectVisitor : public AnalysisASTVisitor<ResultObjectVisitor> { +class ResultObjectVisitor : public AnalysisASTVisitor { public: // `ResultObjectMap` will be filled with a map from record prvalues to result // object. If this visitor will traverse a function that returns a record by @@ -315,7 +315,7 @@ public: // called by `RecursiveASTVisitor`; it should be called manually if we are // analyzing a constructor. `ThisPointeeLoc` is the storage location that // `this` points to. - void TraverseConstructorInits(const CXXConstructorDecl *Ctor, + void traverseConstructorInits(const CXXConstructorDecl *Ctor, RecordStorageLocation *ThisPointeeLoc) { assert(ThisPointeeLoc != nullptr); for (const CXXCtorInitializer *Init : Ctor->inits()) { @@ -339,7 +339,7 @@ public: } } - bool VisitVarDecl(VarDecl *VD) { + bool VisitVarDecl(VarDecl *VD) override { if (VD->getType()->isRecordType() && VD->hasInit()) PropagateResultObject( VD->getInit(), @@ -347,7 +347,7 @@ public: return true; } - bool VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *MTE) { + bool VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *MTE) override { if (MTE->getType()->isRecordType()) PropagateResultObject( MTE->getSubExpr(), @@ -355,7 +355,7 @@ public: return true; } - bool VisitReturnStmt(ReturnStmt *Return) { + bool VisitReturnStmt(ReturnStmt *Return) override { Expr *RetValue = Return->getRetValue(); if (RetValue != nullptr && RetValue->getType()->isRecordType() && RetValue->isPRValue()) @@ -363,7 +363,7 @@ public: return true; } - bool VisitExpr(Expr *E) { + bool VisitExpr(Expr *E) override { // Clang's AST can have record-type prvalues without a result object -- for // example as full-expressions contained in a compound statement or as // arguments of call expressions. We notice this if we get here and a @@ -1211,7 +1211,7 @@ Environment::PrValueToResultObject Environment::buildResultObjectMap( ResultObjectVisitor Visitor(Map, LocForRecordReturnVal, *DACtx); if (const auto *Ctor = dyn_cast<CXXConstructorDecl>(FuncDecl)) - Visitor.TraverseConstructorInits(Ctor, ThisPointeeLoc); + Visitor.traverseConstructorInits(Ctor, ThisPointeeLoc); return Map; } |