Clang import: Variable::isReference() should return true for r-value references also
This commit is contained in:
parent
5cfe2e319c
commit
bd5b2133ab
|
@ -1848,8 +1848,10 @@ Variable::Variable(const Token *name_, const std::string &clangType, const Token
|
||||||
|
|
||||||
if (endsWith(clangType, " &", 2))
|
if (endsWith(clangType, " &", 2))
|
||||||
setFlag(fIsReference, true);
|
setFlag(fIsReference, true);
|
||||||
else if (endsWith(clangType, " &&", 3))
|
else if (endsWith(clangType, " &&", 3)) {
|
||||||
|
setFlag(fIsReference, true);
|
||||||
setFlag(fIsRValueRef, true);
|
setFlag(fIsRValueRef, true);
|
||||||
|
}
|
||||||
|
|
||||||
std::string::size_type pos = clangType.find("[");
|
std::string::size_type pos = clangType.find("[");
|
||||||
if (pos != std::string::npos) {
|
if (pos != std::string::npos) {
|
||||||
|
|
|
@ -1091,6 +1091,7 @@ private:
|
||||||
|
|
||||||
GET_SYMBOL_DB(clang);
|
GET_SYMBOL_DB(clang);
|
||||||
const Variable *refVar = db->variableList().back();
|
const Variable *refVar = db->variableList().back();
|
||||||
|
ASSERT(refVar->isReference());
|
||||||
ASSERT(refVar->isRValueReference());
|
ASSERT(refVar->isRValueReference());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue