alexfh requested changes to this revision.
alexfh added inline comments.

================
Comment at: test/clang-tidy/android-cloexec-socket.cpp:20
+  // CHECK-MESSAGES: :[[@LINE-1]]:24: warning: 'socket' should use 
SOCK_CLOEXEC where possible [android-cloexec-socket]
+  // CHECK-FIXES: SOCK_STREAM | SOCK_CLOEXEC
+  TEMP_FAILURE_RETRY(socket(0, SOCK_STREAM, 0));
----------------
hokein wrote:
> I'd use the complete statement for checking the fixes here, the same below.
Yes, CHECK-FIXES has fewer context than CHECK-MESSAGES (it doesn't have the 
line number, for example), and there's much more stuff that can go wrong than 
with the static diagnostic messages. So please make CHECK-FIXES as specific, as 
possible. Ideally, they should be unique, so that a wrong line can't be matched 
by a CHECK-FIXES. If needed, add unique comments on identical lines.


Repository:
  rL LLVM

https://reviews.llvm.org/D34913



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

Reply via email to