@@ -173,7 +173,7 @@ class CppNameExpr : public CppAtomicExpr, public CppCommonAtomicExprImplBase<Cpp
173173class CppVartypeExpr : public CppAtomicExpr , public CppAtomicExprImplBase <CppAtomicExprType::VARTYPE>
174174{
175175public:
176- CppVartypeExpr (std::unique_ptr<const CppVarType> atom)
176+ CppVartypeExpr (std::unique_ptr<CppVarType> atom)
177177 : CppAtomicExpr(AtomicExprType())
178178 , atom_(std::move(atom))
179179 {
@@ -185,14 +185,14 @@ class CppVartypeExpr : public CppAtomicExpr, public CppAtomicExprImplBase<CppAto
185185 }
186186
187187private:
188- std::unique_ptr<const CppVarType> atom_;
188+ std::unique_ptr<CppVarType> atom_;
189189};
190190
191191// TODO: Eliminate CppLambda by merging to CppLambdaExpr.
192192class CppLambdaExpr : public CppAtomicExpr , public CppAtomicExprImplBase <CppAtomicExprType::LAMBDA>
193193{
194194public:
195- CppLambdaExpr (std::unique_ptr<const CppLambda> lambda)
195+ CppLambdaExpr (std::unique_ptr<CppLambda> lambda)
196196 : CppAtomicExpr(AtomicExprType())
197197 , lambda_(std::move(lambda))
198198 {
@@ -205,7 +205,7 @@ class CppLambdaExpr : public CppAtomicExpr, public CppAtomicExprImplBase<CppAtom
205205 }
206206
207207private:
208- const std::unique_ptr<const CppLambda> lambda_;
208+ std::unique_ptr<CppLambda> lambda_;
209209};
210210
211211class CppMonomialExpr : public CppExpression
@@ -236,8 +236,8 @@ class CppMonomialExpr : public CppExpression
236236 }
237237
238238private:
239- const CppUnaryOperator oper_;
240- const std::unique_ptr<CppExpression> term_;
239+ CppUnaryOperator oper_;
240+ std::unique_ptr<CppExpression> term_;
241241};
242242
243243class CppBinomialExpr : public CppExpression
@@ -250,8 +250,8 @@ class CppBinomialExpr : public CppExpression
250250
251251public:
252252 CppBinomialExpr (CppBinaryOperator oper,
253- std::unique_ptr<const CppExpression> term1,
254- std::unique_ptr<const CppExpression> term2)
253+ std::unique_ptr<CppExpression> term1,
254+ std::unique_ptr<CppExpression> term2)
255255 : CppExpression(ExpressionType())
256256 , oper_(oper)
257257 , term1_(std::move(term1))
@@ -276,9 +276,9 @@ class CppBinomialExpr : public CppExpression
276276 }
277277
278278private:
279- const CppBinaryOperator oper_;
280- const std::unique_ptr<const CppExpression> term1_;
281- const std::unique_ptr<const CppExpression> term2_;
279+ CppBinaryOperator oper_;
280+ std::unique_ptr<CppExpression> term1_;
281+ std::unique_ptr<CppExpression> term2_;
282282};
283283
284284class CppTrinomialExpr : public CppExpression
@@ -324,10 +324,10 @@ class CppTrinomialExpr : public CppExpression
324324 }
325325
326326private:
327- const CppTernaryOperator oper_;
328- const std::unique_ptr<CppExpression> term1_;
329- const std::unique_ptr<CppExpression> term2_;
330- const std::unique_ptr<CppExpression> term3_;
327+ CppTernaryOperator oper_;
328+ std::unique_ptr<CppExpression> term1_;
329+ std::unique_ptr<CppExpression> term2_;
330+ std::unique_ptr<CppExpression> term3_;
331331};
332332
333333class CppFunctionCallExpr : public CppExpression
@@ -339,7 +339,7 @@ class CppFunctionCallExpr : public CppExpression
339339 }
340340
341341public:
342- CppFunctionCallExpr (std::unique_ptr<const CppExpression> func, std::vector<std::unique_ptr<const CppExpression>> args)
342+ CppFunctionCallExpr (std::unique_ptr<CppExpression> func, std::vector<std::unique_ptr<CppExpression>> args)
343343 : CppExpression(ExpressionType())
344344 , function_(std::move(func))
345345 , arguments_(std::move(args))
@@ -363,8 +363,8 @@ class CppFunctionCallExpr : public CppExpression
363363 }
364364
365365private:
366- const std::unique_ptr<const CppExpression> function_;
367- const std::vector<std::unique_ptr<const CppExpression>> arguments_;
366+ std::unique_ptr<CppExpression> function_;
367+ std::vector<std::unique_ptr<CppExpression>> arguments_;
368368};
369369
370370class CppUniformInitializerExpr : public CppExpression
@@ -376,7 +376,7 @@ class CppUniformInitializerExpr : public CppExpression
376376 }
377377
378378public:
379- CppUniformInitializerExpr (std::string name, std::vector<std::unique_ptr<const CppExpression>> args)
379+ CppUniformInitializerExpr (std::string name, std::vector<std::unique_ptr<CppExpression>> args)
380380 : CppExpression(ExpressionType())
381381 , name_(std::move(name))
382382 , arguments_(std::move(args))
@@ -400,8 +400,8 @@ class CppUniformInitializerExpr : public CppExpression
400400 }
401401
402402private:
403- const std::string name_;
404- const std::vector<std::unique_ptr<const CppExpression>> arguments_;
403+ std::string name_;
404+ std::vector<std::unique_ptr<CppExpression>> arguments_;
405405};
406406
407407class CppInitializerListExpr : public CppExpression
@@ -413,7 +413,7 @@ class CppInitializerListExpr : public CppExpression
413413 }
414414
415415public:
416- CppInitializerListExpr (std::vector<std::unique_ptr<const CppExpression>> exprList)
416+ CppInitializerListExpr (std::vector<std::unique_ptr<CppExpression>> exprList)
417417 : CppExpression(ExpressionType())
418418 , exprList_(std::move(exprList))
419419 {
@@ -431,7 +431,7 @@ class CppInitializerListExpr : public CppExpression
431431 }
432432
433433private:
434- const std::vector<std::unique_ptr<const CppExpression>> exprList_;
434+ std::vector<std::unique_ptr<CppExpression>> exprList_;
435435};
436436
437437class CppTypecastExpr : public CppExpression
@@ -461,8 +461,8 @@ class CppTypecastExpr : public CppExpression
461461
462462protected:
463463 CppTypecastExpr (CppTypecastType typecastType,
464- std::unique_ptr<const CppVarType> targetType,
465- std::unique_ptr<const CppExpression> expr)
464+ std::unique_ptr<CppVarType> targetType,
465+ std::unique_ptr<CppExpression> expr)
466466 : CppExpression(ExpressionType())
467467 , castType_(typecastType)
468468 , targetType_(std::move(targetType))
@@ -471,9 +471,9 @@ class CppTypecastExpr : public CppExpression
471471 }
472472
473473private:
474- const CppTypecastType castType_;
475- const std::unique_ptr<const CppVarType> targetType_;
476- const std::unique_ptr<const CppExpression> expr_;
474+ CppTypecastType castType_;
475+ std::unique_ptr<CppVarType> targetType_;
476+ std::unique_ptr<CppExpression> expr_;
477477};
478478
479479template <CppTypecastType _TypecastType>
@@ -491,7 +491,7 @@ class CppTypecastExprImplBase
491491class CppCStyleTypecastExpr : public CppTypecastExpr , public CppTypecastExprImplBase <CppTypecastType::C_STYLE>
492492{
493493public:
494- CppCStyleTypecastExpr (std::unique_ptr<const CppVarType> targetType, std::unique_ptr<const CppExpression> expr)
494+ CppCStyleTypecastExpr (std::unique_ptr<CppVarType> targetType, std::unique_ptr<CppExpression> expr)
495495 : CppTypecastExpr(TypecastType(), std::move(targetType), std::move(expr))
496496 {
497497 }
@@ -501,7 +501,7 @@ class CppFunctionStyleTypecastExpr : public CppTypecastExpr,
501501 public CppTypecastExprImplBase<CppTypecastType::FUNCTION_STYLE>
502502{
503503public:
504- CppFunctionStyleTypecastExpr (std::unique_ptr<const CppVarType> targetType, std::unique_ptr<const CppExpression> expr)
504+ CppFunctionStyleTypecastExpr (std::unique_ptr<CppVarType> targetType, std::unique_ptr<CppExpression> expr)
505505 : CppTypecastExpr(TypecastType(), std::move(targetType), std::move(expr))
506506 {
507507 }
@@ -510,7 +510,7 @@ class CppFunctionStyleTypecastExpr : public CppTypecastExpr,
510510class CppStaticCastExpr : public CppTypecastExpr , public CppTypecastExprImplBase <CppTypecastType::STATIC>
511511{
512512public:
513- CppStaticCastExpr (std::unique_ptr<const CppVarType> targetType, std::unique_ptr<const CppExpression> expr)
513+ CppStaticCastExpr (std::unique_ptr<CppVarType> targetType, std::unique_ptr<CppExpression> expr)
514514 : CppTypecastExpr(TypecastType(), std::move(targetType), std::move(expr))
515515 {
516516 }
@@ -519,7 +519,7 @@ class CppStaticCastExpr : public CppTypecastExpr, public CppTypecastExprImplBase
519519class CppConstCastExpr : public CppTypecastExpr , public CppTypecastExprImplBase <CppTypecastType::CONST>
520520{
521521public:
522- CppConstCastExpr (std::unique_ptr<const CppVarType> targetType, std::unique_ptr<const CppExpression> expr)
522+ CppConstCastExpr (std::unique_ptr<CppVarType> targetType, std::unique_ptr<CppExpression> expr)
523523 : CppTypecastExpr(TypecastType(), std::move(targetType), std::move(expr))
524524 {
525525 }
@@ -528,7 +528,7 @@ class CppConstCastExpr : public CppTypecastExpr, public CppTypecastExprImplBase<
528528class CppDynamiCastExpr : public CppTypecastExpr , public CppTypecastExprImplBase <CppTypecastType::DYNAMIC>
529529{
530530public:
531- CppDynamiCastExpr (std::unique_ptr<const CppVarType> targetType, std::unique_ptr<const CppExpression> expr)
531+ CppDynamiCastExpr (std::unique_ptr<CppVarType> targetType, std::unique_ptr<CppExpression> expr)
532532 : CppTypecastExpr(TypecastType(), std::move(targetType), std::move(expr))
533533 {
534534 }
@@ -537,7 +537,7 @@ class CppDynamiCastExpr : public CppTypecastExpr, public CppTypecastExprImplBase
537537class CppReinterpretCastExpr : public CppTypecastExpr , public CppTypecastExprImplBase <CppTypecastType::REINTERPRET>
538538{
539539public:
540- CppReinterpretCastExpr (std::unique_ptr<const CppVarType> targetType, std::unique_ptr<const CppExpression> expr)
540+ CppReinterpretCastExpr (std::unique_ptr<CppVarType> targetType, std::unique_ptr<CppExpression> expr)
541541 : CppTypecastExpr(TypecastType(), std::move(targetType), std::move(expr))
542542 {
543543 }
0 commit comments