diff options
Diffstat (limited to 'src/shared/cplusplus/CheckDeclarator.cpp')
-rw-r--r-- | src/shared/cplusplus/CheckDeclarator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/cplusplus/CheckDeclarator.cpp b/src/shared/cplusplus/CheckDeclarator.cpp index 5a3044051b..86e3541d56 100644 --- a/src/shared/cplusplus/CheckDeclarator.cpp +++ b/src/shared/cplusplus/CheckDeclarator.cpp @@ -237,9 +237,11 @@ bool CheckDeclarator::visit(PointerAST *ast) return false; } -bool CheckDeclarator::visit(ReferenceAST *) +bool CheckDeclarator::visit(ReferenceAST *ast) { - ReferenceType *refTy = control()->referenceType(_fullySpecifiedType); + const bool rvalueRef = (tokenKind(ast->reference_token) == T_AMPER_AMPER); + + ReferenceType *refTy = control()->referenceType(_fullySpecifiedType, rvalueRef); FullySpecifiedType ty(refTy); _fullySpecifiedType = ty; return false; |