C++: Give NamespaceVariables a qualified name

This commit is contained in:
Ian Lynagh
2018-08-31 16:39:21 +01:00
parent d7d8186bbe
commit 3a00e24e89
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ abstract class Declaration extends Locatable, @declaration {
| c = this and
result = c.getDeclaringEnum().getQualifiedName() + "::" + c.getName())
or
exists (GlobalVariable v, string s1, string s2
exists (GlobalOrNamespaceVariable v, string s1, string s2
| v = this and
s2 = v.getNamespace().getQualifiedName() and
s1 = v.getName()

View File

@@ -5,7 +5,7 @@
| file://:0:0:0:0 | (global namespace) | file://:0:0:0:0 | operator= | __va_list_tag::operator= |
| file://:0:0:0:0 | (global namespace) | file://:0:0:0:0 | overflow_arg_area | __va_list_tag::overflow_arg_area |
| file://:0:0:0:0 | (global namespace) | file://:0:0:0:0 | reg_save_area | __va_list_tag::reg_save_area |
| file://:0:0:0:0 | B | namespaces.cpp:32:7:32:7 | x | <none> |
| file://:0:0:0:0 | B | namespaces.cpp:32:7:32:7 | x | B::x |
| namespaces.cpp:11:13:11:13 | C::D | file://:0:0:0:0 | p#0 | <none> |
| namespaces.cpp:11:13:11:13 | C::D | file://:0:0:0:0 | p#0 | <none> |
| namespaces.cpp:11:13:11:13 | C::D | namespaces.cpp:13:17:13:17 | f | C::D::f |