Commit 6178a44f authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Warning for using-directive in class scope.

parent 7e10664e
......@@ -389,6 +389,11 @@ bool CheckDeclaration::visit(UsingDirectiveAST *ast)
UsingNamespaceDirective *u = control()->newUsingNamespaceDirective(ast->firstToken(), name);
ast->symbol = u;
if (! (_scope->isBlockScope() || _scope->isNamespaceScope()))
"using-directive not within namespace or block scope");
return false;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment