From b76161e41bc2c07cd47f9c61f875d1be95e26d10 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 16 May 2017 19:47:58 +0000 Subject: Vendor import of lldb trunk r303197: https://llvm.org/svn/llvm-project/lldb/trunk@303197 --- .../cpp/function-template-parameter-pack/Makefile | 3 +++ .../TestFunctionTemplateParameterPack.py | 6 ++++++ .../cpp/function-template-parameter-pack/main.cpp | 24 ++++++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile create mode 100644 packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py create mode 100644 packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp (limited to 'packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack') diff --git a/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile b/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile new file mode 100644 index 000000000000..99bfa7e03b47 --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile @@ -0,0 +1,3 @@ +LEVEL = ../../../make +CXX_SOURCES := main.cpp +include $(LEVEL)/Makefile.rules diff --git a/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py b/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py new file mode 100644 index 000000000000..810aefee0f07 --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/TestFunctionTemplateParameterPack.py @@ -0,0 +1,6 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest( + __file__, globals(), [ + decorators.expectedFailureAll(bugnumber="rdar://problem/32096064")]) diff --git a/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp b/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp new file mode 100644 index 000000000000..e802d40e5f8b --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/main.cpp @@ -0,0 +1,24 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LIDENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +template int staticSizeof() { + return sizeof(T); +} + +template int staticSizeof() { + return staticSizeof() + sizeof(T1); +} + +int main (int argc, char const *argv[]) +{ + int sz = staticSizeof(); + return staticSizeof() != sz; //% self.expect("expression -- sz == staticSizeof()", "staticSizeof worked", substrs = ["true"]) + //% self.expect("expression -- sz == staticSizeof() + sizeof(char)", "staticSizeof worked", substrs = ["true"]) + //% self.expect("expression -- sz == staticSizeof() + sizeof(int) + sizeof(char)", "staticSizeof worked", substrs = ["true"]) +} -- cgit v1.2.3