Replace every \c VarDecl with the given variable name. This cover init captures which introduce a new name. However, it means that _all_ VarDecl's will be changed. TODO: Check if it is really good to replace all VarDecl's
| 213 | /// However, it means that _all_ VarDecl's will be changed. |
| 214 | /// TODO: Check if it is really good to replace all VarDecl's |
| 215 | void InsertArg(const DeclRefExpr* stmt) override |
| 216 | { |
| 217 | if(isa<VarDecl>(stmt->getDecl())) { |
| 218 | mOutputFormatHelper.Append("_"sv, mVarName); |
| 219 | |
| 220 | } else { |
| 221 | |
| 222 | CodeGenerator::InsertArg(stmt); |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | private: |
| 227 | std::string_view mVarName; ///< The name of the variable that needs to be prefixed with _. |