summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/test/unnecessarygetstr.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang/test/unnecessarygetstr.cxx')
-rw-r--r--compilerplugins/clang/test/unnecessarygetstr.cxx8
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: */