From 9e3ee13a1cc91152ae0c6880f1f2866c50275a10 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 10 Jun 2016 20:56:09 +0000 Subject: Fixed C++ template integer parameter types to work correctly when the integer type is signed. Prior to this we would display the typename for "TestObj<-1>" as "TestObj<4294967295>" when we showed the type. Expression parsing could also fail because we would fail to find the mangled name when evaluating expressions. The issue was we were losing the signed'ness of the template integer parameter in DWARFASTParserClang.cpp. llvm-svn: 272434 --- .../lldbsuite/test/lang/cpp/template/main.cpp | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp (limited to 'lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp') diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp b/lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp new file mode 100644 index 00000000000..10a4bec62e9 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/template/main.cpp @@ -0,0 +1,25 @@ +//===-- main.cpp ------------------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +template +class TestObj +{ +public: + int getArg() + { + return Arg; + } +}; + +int main(int argc, char **argv) +{ + TestObj<1> testpos; + TestObj<-1> testneg; + return testpos.getArg() - testneg.getArg(); // Breakpoint 1 +} -- cgit v1.2.3