diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-04-17 09:09:14 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-04-17 10:48:52 +0200 |
commit | 856fc80439c23d4473930b92e201ebd33b20fc8b (patch) | |
tree | d2c9f36f787177dfb85d51a25ec40b4113e05038 /compilerplugins/clang/test/stringadd.cxx | |
parent | 5955a453165f6d8117b44e8ad37fb5ca0134add4 (diff) |
loplugin:stringadd: Adapt O[U]StringBuffer ctor detection for Windows
...where sal_Int32 is not int, so a literal argument like 16 actually calls the
O[U]StringBuffer(T length, std::enable_if_t<std::is_integral_v<T>, int> = 0)
overload
Change-Id: I1d151efbc723cbfa76690e02491b05a9a4147e91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150473
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/test/stringadd.cxx')
-rw-r--r-- | compilerplugins/clang/test/stringadd.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/stringadd.cxx b/compilerplugins/clang/test/stringadd.cxx index 3ac2bb60ebe8..7c1193643303 100644 --- a/compilerplugins/clang/test/stringadd.cxx +++ b/compilerplugins/clang/test/stringadd.cxx @@ -297,4 +297,19 @@ void f1() } } +namespace test14 +{ +void f1() +{ + OUStringBuffer b(16); + b.append("..."); +} + +void f2(long long n) +{ + OUStringBuffer b(n); + b.append("..."); +} +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |