Clang import: Variable::isReference() should return true for r-value references also

This commit is contained in:
Daniel Marjamäki 2020-11-09 21:00:48 +01:00
parent 5cfe2e319c
commit bd5b2133ab
2 changed files with 4 additions and 1 deletions

View File

@ -1848,8 +1848,10 @@ Variable::Variable(const Token *name_, const std::string &clangType, const Token
if (endsWith(clangType, " &", 2))
setFlag(fIsReference, true);
else if (endsWith(clangType, " &&", 3))
else if (endsWith(clangType, " &&", 3)) {
setFlag(fIsReference, true);
setFlag(fIsRValueRef, true);
}
std::string::size_type pos = clangType.find("[");
if (pos != std::string::npos) {

View File

@ -1091,6 +1091,7 @@ private:
GET_SYMBOL_DB(clang);
const Variable *refVar = db->variableList().back();
ASSERT(refVar->isReference());
ASSERT(refVar->isRValueReference());
}