gribozavr accepted this revision.
gribozavr added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/android-posix-return.rst:21
+  int ret = posix_fadvise(...);
+  if (ret != 0) ...
----------------
why not `if (posix_fadvise() != 0)` ?

Otherwise it looks like adding a variable is necessary for a fix.


================
Comment at: clang-tools-extra/test/clang-tidy/android-posix-return.cpp:8
+typedef long off_t;
+typedef int size_t;
+typedef int pid_t;
----------------
`typedef decltype(sizeof(char)) size_t;`


================
Comment at: clang-tools-extra/test/clang-tidy/android-posix-return.cpp:67
+  if (posix_openpt(0) == -1) {}
+  if (posix_fadvise(0, 0, 0, 0) >= 0) {}
+  if (posix_fadvise(0, 0, 0, 0) == 1) {}
----------------
What about

```
if (posix_fadvise() >= 0) { ... } else { ... }
```

?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63623/new/

https://reviews.llvm.org/D63623



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to