[Lldb-commits] [lldb] r304314 - Added a testcase for local/namespaced name conflicts.

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Wed May 31 10:18:11 PDT 2017


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; 
+}




More information about the lldb-commits mailing list