george.burgess.iv added inline comments.

================
Comment at: clang-tidy/bugprone/ComparisonInTempFailureRetryCheck.cpp:78
+
+  diag(RHS.getOperatorLoc(),
+       "Top-level comparisons should be moved out of TEMP_FAILURE_RETRY");
----------------
JonasToth wrote:
> You could even provide a fixit to do this. But this can be done in later 
> patches, too.
I initially tried this, but a complete solution appears to be nontrivial when 
nested macros start to happen. Added a FIXME nonetheless. :)


================
Comment at: test/clang-tidy/bugprone-comparison-in-temp-failure-retry.c:1
+// RUN: %check_clang_tidy %s bugprone-comparison-in-temp-failure-retry %t
+
----------------
JonasToth wrote:
> Could you please add a test with control structures, like loops you used in 
> your example?
Added the `control_flow` function


================
Comment at: test/clang-tidy/bugprone-comparison-in-temp-failure-retry.c:5
+  ({                                                                           
\
+    typeof(x) __z;                                                             
\
+    do                                                                         
\
----------------
JonasToth wrote:
> I think you could add one test, that shows using `long int` instead of 
> `typeof` is diagnosed, given glibc uses this approach (or even copy there 
> macro)
Added a variant with `long int` near the bottom.


https://reviews.llvm.org/D45059



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

Reply via email to