================
@@ -437,3 +439,10 @@ void no_CXXRecordDecl() {
 void checkReference(std::string &s) {
   const char *c = s.c_str();
 }
+
+const char *GH59870(int value) {
+  thread_local std::string retval;
+
+  retval = std::to_string(value);
+  return retval.c_str(); // no-warning
+}
----------------
steakhal wrote:

I'm not convinced that this test tests what it should. It depends on how 
faitful our std::string mock is - which is. The only way to find out is by 
reverting the supposed fix and see if it would fire.
If not, then the test is wrong. If yes, then it's likely good.

Also, the bare `no-warning` probably needs an explanation what not to expect 
here (in other words, what was there and why it's better that its not there).

https://github.com/llvm/llvm-project/pull/241058
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to