diff --git a/lldb/test/Shell/Settings/Inputs/names.cpp b/lldb/test/Shell/Settings/Inputs/names.cpp index 461c6d091a0f4..cf6982abb8f35 100644 --- a/lldb/test/Shell/Settings/Inputs/names.cpp +++ b/lldb/test/Shell/Settings/Inputs/names.cpp @@ -1,5 +1,3 @@ -#include - namespace detail { template struct Quux {}; } // namespace detail @@ -7,15 +5,16 @@ template struct Quux {}; using FuncPtr = detail::Quux (*(*)(int))(float); struct Foo { - template void foo(T const &t) const noexcept(true) {} + template void foo(T arg) const noexcept(true) {} - template void operator<<(size_t) {} + template void operator<<(int) {} template FuncPtr returns_func_ptr(detail::Quux &&) const noexcept(false) { return nullptr; } }; namespace ns { -template int foo(T const &t) noexcept(false) { return 0; } +template int foo(char const *str) noexcept(false) { return 0; } +template int foo(T t) { return 1; } template FuncPtr returns_func_ptr(detail::Quux &&) { return nullptr; } } // namespace ns @@ -24,20 +23,20 @@ int bar() { return 1; } namespace { int anon_bar() { return 1; } -auto anon_lambda = [](std::function) mutable {}; +auto anon_lambda = [] {}; } // namespace int main() { - ns::foo(bar); - ns::foo(std::function{bar}); + ns::foo(bar); + ns::foo("bar"); ns::foo(anon_lambda); - ns::foo(std::function{anon_bar}); - ns::foo(&Foo::foo>); + ns::foo(anon_bar); + ns::foo)>("method"); ns::returns_func_ptr(detail::Quux{}); Foo f; - f.foo(std::function{bar}); - f.foo(std::function{anon_bar}); + f.foo(anon_bar); f.operator<< <(2 > 1)>(0); f.returns_func_ptr(detail::Quux{}); + return 0; } diff --git a/lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test b/lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test index d990114f57845..dc4dedadee80a 100644 --- a/lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test +++ b/lldb/test/Shell/Settings/TestFrameFormatNameWithArgs.test @@ -1,4 +1,4 @@ -# REQUIRES: system-darwin +# UNSUPPORTED: system-windows # RUN: %clangxx_host -g -O0 %S/Inputs/names.cpp -std=c++17 -o %t.out # RUN: %lldb -b -s %s %t.out | FileCheck %s settings set -f frame-format "frame ${function.name-with-args}\n" @@ -8,21 +8,19 @@ break set -n returns_func_ptr run # CHECK: frame int ns::foo(t={{.*}}) c -# CHECK: frame int ns::foo>(t= Function = bar() ) +# CHECK: frame int ns::foo(str="bar") c -# CHECK: frame int ns::foo<(anonymous namespace)::$_0>(t={{.*}}) +# CHECK: frame int ns::foo<(anonymous namespace)::$_0>(t=(anonymous namespace)::(unnamed class) @ {{.*}}) c -# CHECK: frame int ns::foo>(t= Function = (anonymous namespace)::anon_bar() ) +# CHECK: frame int ns::foo(t=({{.*}}`(anonymous namespace)::anon_bar() at {{.*}})) c -# CHECK: frame int ns::foo const&) const noexcept>(t={{.*}}) +# CHECK: frame int ns::foo(str="method") c # CHECK: frame ns::returns_func_ptr((null)={{.*}}) c -# CHECK: frame void Foo::foo>(this={{.*}}, t= Function = bar() ) const +# CHECK: frame void Foo::foo(this={{.*}}, arg=({{.*}}`(anonymous namespace)::anon_bar() at {{.*}})) c -# CHECK: frame void Foo::foo>(this={{.*}}, t= Function = (anonymous namespace)::anon_bar() ) const -c -# CHECK: frame void Foo::operator<<<1ul>(this={{.*}}, (null)=0) +# CHECK: frame void Foo::operator<<<1>(this={{.*}}, (null)=0) c # CHECK: frame Foo::returns_func_ptr(this={{.*}}, (null)={{.*}}) q