[compiler-rt] [compiler-rt][rtsan] adding setlinebuf/setbuffer interception. (PR #122018)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 04:56:37 PST 2025


================
@@ -409,7 +409,7 @@ TEST_F(RtsanFileTest, SetbufDieWhenRealtime) {
   FILE *f = fopen(GetTemporaryFilePath(), "w");
   EXPECT_THAT(f, Ne(nullptr));
 
-  auto Func = [&f, &buffer]() { setbuf(f, buffer); };
+  auto Func = [f, &buffer]() { setbuf(f, buffer); };
----------------
fmayer wrote:

why is this by ref?

https://github.com/llvm/llvm-project/pull/122018


More information about the llvm-commits mailing list