================
@@ -156,6 +156,8 @@ void safe_examples(std::string s1, int *p) {
snprintf(a, 10, "%s%d%s%p%s", __PRETTY_FUNCTION__, *p, "hello", s1.c_str());
// no warn
snprintf(&c, 1, "%s%d%s%p%s", __PRETTY_FUNCTION__, *p, "hello", s1.c_str());
// no warn
snprintf(nullptr, 0, "%s%d%s%p%s", __PRETTY_FUNCTION__, *p, "hello",
s1.c_str()); // no warn
+
+ strlen(s1.c_str());
----------------
ziqingluo-90 wrote:
Test for the upstreaming code.
https://github.com/llvm/llvm-project/pull/172091
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits