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/main.cpp | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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/main.cpp') 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