diff options
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp')
-rw-r--r-- | packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp b/packages/Python/lldbsuite/test/lang/cpp/const_this/main.cpp new file mode 100644 index 000000000000..7614977b245f --- /dev/null +++ b/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); +} |