JonasToth added inline comments.

================
Comment at: test/clang-tidy/misc-terminating-continue.cpp:7
+    // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: terminating 'continue' 
[misc-terminating-continue]
+  } while(false);
+
----------------
Quuxplusone wrote:
> I initially expected to see tests also for
> 
>     goto L1;
>     while (false) {
>         L1:
>         continue;  // 'continue' is equivalent to 'break'
>     }
> 
>     int v = 0;
>     goto L1;
>     for (; false; ++v) {
>         L1:
>         continue;  // 'continue' is NOT equivalent to 'break'
>     }
> 
> although I assume your current patch doesn't actually diagnose the former, 
> and that's probably fine.
I think both of your examples are out of scope for this check and are they 
realistic?

The usage of `goto` is addressed in `cppcoreguidelines-avoid-goto`


https://reviews.llvm.org/D33844



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

Reply via email to