diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-06-02 08:56:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-08 15:31:57 +0200 |
commit | dddbb8a219f13344213b0ef6183529922bca7d50 (patch) | |
tree | 9d50c2053f6b4fc69637f090bb5374093196885c /compilerplugins/clang/test | |
parent | a9b19f78f3cdcbf5c949a85b45877e903114cc54 (diff) |
loplugin:unnecessarygetstr fix false +
encountering when we need to pass a std::string to an OString
Change-Id: I91d2aa1f20e7c2407c708c9ce4ae82fb52934c85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/test')
-rw-r--r-- | compilerplugins/clang/test/unnecessarygetstr.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compilerplugins/clang/test/unnecessarygetstr.cxx b/compilerplugins/clang/test/unnecessarygetstr.cxx index bb5fcc20d2ef..c0960557a89b 100644 --- a/compilerplugins/clang/test/unnecessarygetstr.cxx +++ b/compilerplugins/clang/test/unnecessarygetstr.cxx @@ -11,6 +11,7 @@ #include <ostream> #include <string_view> +#include <string> #include <rtl/strbuf.hxx> #include <rtl/string.hxx> @@ -120,4 +121,11 @@ void test(std::string v, OString o) } } +// no warning expected +namespace test6 +{ +void foo(const OString&); +void test(std::string v) { foo(v.c_str()); } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |