diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
3 files changed, 35 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile new file mode 100644 index 00000000000..52a92c0b61a --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile @@ -0,0 +1,8 @@ +LEVEL = ../../../make +CXX_SOURCES := main.cpp +CXXFLAGS += -std=c++11 +include $(LEVEL)/Makefile.rules + +cleanup: + rm -f Makefile *.d + diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py new file mode 100644 index 00000000000..2249a8c9b16 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/TestConstThis.py @@ -0,0 +1,4 @@ +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/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp new file mode 100644 index 00000000000..7614977b245 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp @@ -0,0 +1,23 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include <stdio.h> + +class foo { +public: + template <class T> T func(T x) const { + return x+2; //% self.expect("expr 2+3", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["5"]) + } +}; + +int i; + +int main() { + return foo().func(i); +} |