Extra Clang Tools 4.0.0 Release Notes — Extra Clang Tools 4 documentation

# Extra Clang Tools 4 documentation

## Extra Clang Tools 4.0.0 Release Notes

- Introduction
- What’s New in Extra Clang Tools 4.0.0?
  - Improvements to clang-tidy
  - Improvements to include-fixer

Written by the LLVM Team

## Introduction

This document contains the release notes for the Extra Clang Tools, part of the Clang release 4.0.0. Here we describe the status of the Extra Clang Tools in some detail, including major improvements from the previous release and new feature work. All LLVM releases may be downloaded from the LLVM releases web site.

For more information about Clang or LLVM, including information about the latest release, please see the Clang Web Site or the LLVM Web Site.

## What’s New in Extra Clang Tools 4.0.0?

Some of the major new features and improvements to Extra Clang Tools are listed here.

### Improvements to clang-tidy

- New cppcoreguidelines-slicing check

  Flags slicing of member variables or vtable.

- New cppcoreguidelines-special-member-functions check

  Flags classes where some, but not all, special member functions are user-defined.

- The UseCERTSemantics option for the misc-move-constructor-init check has been removed as it duplicated the modernize-pass-by-value check.

- New misc-move-forwarding-reference check

  Warns when `std::move` is applied to a forwarding reference instead of `std::forward`.

- misc-pointer-and-integral-operation check was removed.

- New misc-string-compare check

  Warns about using `compare` to test for string equality or inequality.

- New misc-use-after-move check

  Warns if an object is used after it has been moved, without an intervening reinitialization.

- New cppcoreguidelines-no-malloc check warns if C-style memory management is used and suggests the use of RAII.

- modernize-make-unique and modernize-make-shared now handle calls to the smart pointer’s `reset()` method.

- The modernize-pass-by-value check now has a ValuesOnly option to only warn about parameters that are passed by value but not moved.

- The modernize-use-auto check now warns about variable declarations that are initialized with a cast, or by calling a templated function that behaves as a cast.

- The modernize-use-default check has been renamed to modernize-use-equals-default.

- New modernize-use-default-member-init check

  Converts a default constructor’s member initializers into default member initializers. Removes member initializers that are the same as a default member initializer.

- New modernize-use-equals-delete check

  Adds `= delete` to unimplemented private special member functions.

- New modernize-use-transparent-functors check

  Replaces uses of non-transparent functors with transparent ones where applicable.

- New mpi-buffer-deref check

  Flags buffers which are insufficiently dereferenced when passed to an MPI function call.

- New mpi-type-mismatch check

  Flags MPI function calls with a buffer type and MPI data type mismatch.

- New performance-inefficient-string-concatenation check

  Warns about the performance overhead arising from concatenating strings using the `operator+`, instead of `operator+=`.

- New performance-type-promotion-in-math-fn check

  Replaces uses of C-style standard math functions with double parameters and float arguments with an equivalent function that takes a float parameter.

- readability-container-size-empty check supports arbitrary containers with with suitable `empty()` and `size()` methods.

- New readability-misplaced-array-index check

  Warns when there is array index before the [] instead of inside it.

- New readability-non-const-parameter check

  Flags function parameters of a pointer type that could be changed to point to a constant type instead.

- New readability-redundant-declaration check

  Finds redundant variable and function declarations.

- New readability-redundant-function-ptr-dereference check

  Finds redundant function pointer dereferences.

- New readability-redundant-member-init check

  Flags member initializations that are unnecessary because the same default constructor would be called if they were not present.

- The readability-redundant-string-cstr check now warns about redundant calls to data() too.

- The google-explicit-constructor check now warns about conversion operators not marked explicit.

Fixed bugs:

- modernize-make-unique and modernize-make-shared Calling `make_{unique|shared}` from within a member function of a type with a private or protected constructor would be ill-formed.

### Improvements to include-fixer

- Emacs integration was added.