aaron.ballman added inline comments.

================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/readability-container-size-empty.cpp:480-482
-// CHECK-MESSAGES: :[[@LINE-1]]:24: warning: the 'empty' method should be used
-// CHECK-MESSAGES: :101:18: note: method 'Lazy'::empty() defined here
-// CHECK-FIXES: {{^  }}void func() noexcept(!L.empty());
----------------
alexfh wrote:
> Wait, is losing these diagnostics necessary?
I think it's an improvement. The `noexcept`-ness of `size()` need not relate to 
the `noexcept`-ness of `empty()` (notionally it should, but it's not a 
requirement users must follow), so there's no guarantee that the change will 
have the same semantic effect on the declaration of `func()`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91303

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D91303: [clang-tidy]... Aaron Ballman via Phabricator via cfe-commits

Reply via email to