[PATCH] D33531: Clang-tidy readability: avoid const value return

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 29 04:42:53 PDT 2017


alexfh added a comment.

> The check ignores returns of const pointers (meaning * const, not const *); while pointless, these are not particularly harmful. It could be made laxer by ignoring all trivially copyable types (on the grounds that they won't have interesting move constructors/assigners anyway), or stricter by ignoring all const returns (on the grounds that, in the best case, it's just pointless verbosity). Or it could be made an option.

I'd prefer an option. It could be `StrictMode`, which is also supported as a global option, for example, by clang-tidy/misc/ArgumentCommentCheck.cpp.


Repository:
  rL LLVM

https://reviews.llvm.org/D33531





More information about the cfe-commits mailing list