Clang import; Set function pointer properly

This commit is contained in:
Daniel Marjamäki 2020-01-12 15:15:21 +01:00
parent fd1809590c
commit 47e186864b
1 changed files with 4 additions and 2 deletions

View File

@ -127,8 +127,10 @@ namespace clangimport {
Decl(Token *def, Variable *var) : def(def), function(nullptr), var(var) {}
Decl(Token *def, Function *function) : def(def), function(function), var(nullptr) {}
void ref(Token *tok) {
if (function)
tok->function(function);
tok->varId(var ? var->declarationId() : 0);
if (var)
tok->variable(var);
}
Token *def;