JonasToth added inline comments.

================
Comment at: test/clang-tidy/bugprone-too-small-loop-variable.cpp:138
+  bool cond = false;
+  for (short i = 0; i < (cond ? 0 : size); ++i) {
+    // CHECK-MESSAGES: :[[@LINE-1]]:21: warning: loop variable has narrower 
type 'short' than iteration's upper bound 'int' 
[bugprone-too-small-loop-variable]
----------------
Could you please add a test  
```
for (short i = 0; i < (!cond ? size : 0); ++i) {
}
```
as well. Just to make sure the analysis does not depent on the type of the LHS. 
If it does, add a FIXME for later.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D53974



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

Reply via email to