diff options
author | Eugene Leviant <evgeny.leviant@gmail.com> | 2015-11-13 11:00:10 +0000 |
---|---|---|
committer | Eugene Leviant <evgeny.leviant@gmail.com> | 2015-11-13 11:00:10 +0000 |
commit | c1ba9fcb2790e07a478700ce78fb08283839634c (patch) | |
tree | 6be8b8ba8e93e67de6900a11fd3fbf09075894c3 /lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp | |
parent | 2e31ce1ea7ce3a16202bb55130d552b753282a33 (diff) | |
download | bcm5719-llvm-c1ba9fcb2790e07a478700ce78fb08283839634c.tar.gz bcm5719-llvm-c1ba9fcb2790e07a478700ce78fb08283839634c.zip |
Fix multiple symbol lookup in the same namespace
llvm-svn: 253028
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp index 4dec275c2c5..4de7a1ada8d 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/main.cpp @@ -72,9 +72,31 @@ namespace A { } } +namespace ns1 { + int value = 100; +} + +namespace ns2 { + int value = 200; +} + #include <stdio.h> +void test_namespace_scopes() { + do { + using namespace ns1; + printf("ns1::value = %d\n", value); // Evaluate ns1::value + } while(0); + + do { + using namespace ns2; + printf("ns2::value = %d\n", value); // Evaluate ns2::value + } while(0); +} + int Foo::myfunc(int a) { + test_namespace_scopes(); + ::my_uint_t anon_uint = 0; A::uint_t a_uint = 1; B::uint_t b_uint = 2; |