[libcxx-commits] [libcxx] [libc++][Android] Disable fdsan in filebuf close.pass.cpp (PR #102412)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 7 19:00:38 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 89c8d68eb71d6881fde21e49faa38e2b4a7d7233 061580bc8cc06dc0888f3223decd7a104f2eb1a5 --extensions cpp -- libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/close.pass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/close.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/close.pass.cpp
index fa2b3415b3..88ff397a77 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/close.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/close.pass.cpp
@@ -23,8 +23,9 @@
// omit the function declarations from fdsan.h. We might be running on a newer
// API level, though, so declare the API function here using weak.
#if defined(__BIONIC__)
-#include <android/fdsan.h>
-enum android_fdsan_error_level android_fdsan_set_error_level(enum android_fdsan_error_level new_level) __attribute__((weak));
+# include <android/fdsan.h>
+enum android_fdsan_error_level android_fdsan_set_error_level(enum android_fdsan_error_level new_level)
+ __attribute__((weak));
#endif
int main(int, char**)
@@ -45,7 +46,7 @@ int main(int, char**)
// attempts to close a file descriptor belonging to something else. Disable
// fdsan to allow closing the FD belonging to std::filebuf's FILE*.
if (android_fdsan_set_error_level != nullptr)
- android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
+ android_fdsan_set_error_level(ANDROID_FDSAN_ERROR_LEVEL_DISABLED);
#endif
#if defined(__unix__)
{
``````````
</details>
https://github.com/llvm/llvm-project/pull/102412
More information about the libcxx-commits
mailing list