Author: spyffe
Date: Wed May 31 12:18:10 2017
New Revision: 304314

URL: http://llvm.org/viewvc/llvm-project?rev=304314&view=rev
Log:
Added a testcase for local/namespaced name conflicts.

This works on SVN but is a bit fragile on the Swift branch.
I'm adding the test to both, so we have this path covered.

<rdar://problem/32372372>

Added:
    lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/
    
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile
    
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py
    
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp

Added: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile?rev=304314&view=auto
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile 
(added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile 
Wed May 31 12:18:10 2017
@@ -0,0 +1,3 @@
+LEVEL = ../../../make
+CXX_SOURCES := main.cpp
+include $(LEVEL)/Makefile.rules

Added: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py?rev=304314&view=auto
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py
 (added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/TestNamespaceConflicts.py
 Wed May 31 12:18:10 2017
@@ -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")])

Added: 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp?rev=304314&view=auto
==============================================================================
--- 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp 
(added)
+++ 
lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/main.cpp 
Wed May 31 12:18:10 2017
@@ -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; 
+}


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to