diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-01 20:59:29 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-01 20:59:29 +0000 |
commit | aaf9a7aadf355bb6cb3b33631502f4f77ab43e13 (patch) | |
tree | d9c7458697b732067058824db420f1cf7fc192b0 /packages/Python/lldbsuite/test | |
parent | dfe1ca0d7aa4b8df73527e27644f0d97ab1e8306 (diff) |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test')
3 files changed, 39 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile b/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile new file mode 100644 index 0000000000000..99bfa7e03b479 --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile @@ -0,0 +1,3 @@ +LEVEL = ../../../make +CXX_SOURCES := main.cpp +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py b/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py new file mode 100644 index 0000000000000..af362f5be5d77 --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py @@ -0,0 +1,7 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest( + __file__, globals(), [ + decorators.expectedFailureAll( + oslist=["windows"], bugnumber="llvm.org/pr24764")]) diff --git a/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp b/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp new file mode 100644 index 0000000000000..5dfca5b7f9964 --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp @@ -0,0 +1,29 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +namespace n { + struct D { + int i; + static int anInt() { return 2; } + int dump() { return i; } + }; +} + +using namespace n; + +int foo(D* D) { + return D->dump(); //% self.expect("expression -- D->dump()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["int", "2"]) +} + +int main (int argc, char const *argv[]) +{ + D myD { D::anInt() }; + foo(&myD); + return 0; +} |