diff --git a/src/shared/cplusplus/Symbols.cpp b/src/shared/cplusplus/Symbols.cpp index 8f2400976d9..e97f13d3633 100644 --- a/src/shared/cplusplus/Symbols.cpp +++ b/src/shared/cplusplus/Symbols.cpp @@ -289,7 +289,12 @@ bool Function::matchType0(const Type *otherType, TypeMatcher *matcher) const } FullySpecifiedType Function::type() const -{ return FullySpecifiedType(const_cast(this)); } +{ + FullySpecifiedType ty(const_cast(this)); + ty.setConst(isConst()); + ty.setVolatile(isVolatile()); + return ty; +} FullySpecifiedType Function::returnType() const { return _returnType; }