summaryrefslogtreecommitdiff
path: root/test/lld/reserved_func_ptr.cpp
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-09-29 11:23:09 -0700
committerGitHub <noreply@github.com>2021-09-29 11:23:09 -0700
commit6b80ef6cccfd14b9b6620c5d41a148024d78576c (patch)
tree27f1a0cc96a512d6ed80f3f5b40e83de98e2e9f9 /test/lld/reserved_func_ptr.cpp
parent414d54a28b749af6abcaec6b85c99cc69de6b7dd (diff)
downloadbinaryen-6b80ef6cccfd14b9b6620c5d41a148024d78576c.tar.gz
binaryen-6b80ef6cccfd14b9b6620c5d41a148024d78576c.tar.bz2
binaryen-6b80ef6cccfd14b9b6620c5d41a148024d78576c.zip
Clang-format c/cpp files in test directory (#4192)
This clang-formats c/cpp files in test/ directory, and updates clang-format-diff.sh so that it does not ignore test/ directory anymore. bigswitch.cpp is excluded from formatting, because there are big commented-out code blocks, and apparently clang-format messes up formatting in them. Also to make matters worse, different clang-format versions do different things on those commented-out code blocks.
Diffstat (limited to 'test/lld/reserved_func_ptr.cpp')
-rw-r--r--test/lld/reserved_func_ptr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/lld/reserved_func_ptr.cpp b/test/lld/reserved_func_ptr.cpp
index f40613ea0..31ee08ada 100644
--- a/test/lld/reserved_func_ptr.cpp
+++ b/test/lld/reserved_func_ptr.cpp
@@ -1,9 +1,9 @@
-int atoi(const char *nptr);
+int atoi(const char* nptr);
void address_taken_func(int a, int b, int c) {}
void address_taken_func2(int a, int b, int c) {}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
int fp_v = atoi(argv[1]);
int fp_vi = atoi(argv[2]);
int fp_iii = atoi(argv[3]);
@@ -20,9 +20,9 @@ int main(int argc, char **argv) {
void (*f_vi)(int) = reinterpret_cast<void (*)(int)>(fp_vi);
int (*f_iii)(int, int) = reinterpret_cast<int (*)(int, int)>(fp_iii);
float (*f_fffi)(float, float, int) =
- reinterpret_cast<float (*)(float, float, int)>(fp_fffi);
+ reinterpret_cast<float (*)(float, float, int)>(fp_fffi);
double (*f_ddi)(double, int) =
- reinterpret_cast<double (*)(double, int)>(fp_ddi);
+ reinterpret_cast<double (*)(double, int)>(fp_ddi);
f_v();
f_vi(3);