diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index b616b659c..b011c5a66 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -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) { diff --git a/test/testclangimport.cpp b/test/testclangimport.cpp index 4c0e86839..b9c3d6357 100644 --- a/test/testclangimport.cpp +++ b/test/testclangimport.cpp @@ -1091,6 +1091,7 @@ private: GET_SYMBOL_DB(clang); const Variable *refVar = db->variableList().back(); + ASSERT(refVar->isReference()); ASSERT(refVar->isRValueReference()); }