Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run clang-tidy modernize-use-equals-{delete,default} on //sql
modernize-use-equals-delete marks unimplemented and private special member functions with "= delete". This more clearly communicates intent and improves error messages. modernize-use-equals-default rewrites special member functions whose behavior matches the default, with "= default". This: * Greatly simplifies copy and move constructors, and copy assign and move assign operators because the members don't need to be manually written. * In some cases allows classes that were previously non-aggregates or non-trivial to become aggregates or trivial. Explicitly writing an empty body for default constructor disqualifies it from being trivial. Trivial classes and member functions can be better optimized by the compiler and library (via type traits). * Lets the defaulted functions and constructors to be constexpr if the implicit version would have been. * More clearly communicates intent, especially to distinguish member functions that aren't customized against those that are. This change was done using clang-tidy as described here: https://chromium.googlesource.com/chromium/src/+/lkcr/docs/clang_tidy.md In some cases the the tool leaves behind a string of commas where it replaced a member initializer list (https://bugs.llvm.org/show_bug.cgi?id=35051). Clean them up with: git diff --name-only | \ xargs sed -E -i 's/(^\s*|\)\s*):[ ,]*= default/\1 = default/' See the relevant cxx post for more details: https://groups.google.com/a/chromium.org/forum/#!topic/cxx/RkOHzIK6Tq8 BUG=778959,778957 Change-Id: I0fb961bb4ba00befba4da08fa7fc625080b46fee Reviewed-on: https://chromium-review.googlesource.com/790031 Reviewed-by: Victor Costan <pwnall@chromium.org> Commit-Queue: Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#519209}
- Loading branch information