From 8c68b811f342340219fb2b666d76e2d3a7757ab7 Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Fri, 30 Dec 2011 13:00:14 +0100 Subject: [PATCH] Fix debug message "Scope::checkVariable found variable '%var%' with varid 0." in C# code with 'using %var%;'. --- lib/symboldatabase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 08baf05b1..5a9a4623d 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -1493,6 +1493,9 @@ void Scope::getVariableList() else if (Token::Match(tok, "goto %var% ;")) { tok = tok->tokAt(2); continue; + } else if (check->_tokenizer->isCSharp() && Token::Match(tok, "using %var% ;")) { + tok = tok->tokAt(2); + continue; } tok = checkVariable(tok, varaccess);