Extra Clang Tools 7.0.0 Release Notes¶
Written by the LLVM Team
Introduction¶
This document contains the release notes for the Extra Clang Tools, part of the Clang release 7.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 7.0.0?¶
Some of the major new features and improvements to Extra Clang Tools are listed here. Generic improvements to Extra Clang Tools as a whole or to its underlying infrastructure are described first, followed by tool-specific sections.
Improvements to clang-tidy¶
- The checks profiling info can now be stored as JSON files for futher post-processing and analysis. 
- New module abseil for checks related to the Abseil library. 
- New module - portability.
- New module - zirconfor checks related to Fuchsia’s Zircon kernel.
- New abseil-string-find-startswith check. - Checks whether a - std::string::find()result is compared with 0, and suggests replacing with- absl::StartsWith().
- New android-comparison-in-temp-failure-retry check. - Diagnoses comparisons that appear to be incorrectly placed in the argument to the - TEMP_FAILURE_RETRYmacro.
- New bugprone-exception-escape check - Finds functions which may throw an exception directly or indirectly, but they should not. 
- New bugprone-parent-virtual-call check. - Detects and fixes calls to grand-…parent virtual methods instead of calls to overridden parent’s virtual methods. 
- New bugprone-terminating-continue check - Checks if a - continuestatement terminates the loop.
- New bugprone-throw-keyword-missing check. - Diagnoses when a temporary object that appears to be an exception is constructed but not thrown. 
- New bugprone-unused-return-value check. - Warns on unused function return values. 
- New cert-msc32-c check - Detects inappropriate seeding of - srand()function.
- New cert-msc51-cpp check - Detects inappropriate seeding of C++ random generators and C - srand()function.
- New cppcoreguidelines-avoid-goto check. - The usage of - gotofor control flow is error prone and should be replaced with looping constructs. Every backward jump is rejected. Forward jumps are only allowed in nested loops.
- New cppcoreguidelines-narrowing-conversions check - Checks for narrowing conversions, e.g. - int i = 0; i += 0.1;.
- New fuchsia-multiple-inheritance check. - Warns if a class inherits from multiple classes that are not pure virtual. 
- New fuchsia-restrict-system-includes check - Checks for allowed system includes and suggests removal of any others. 
- New fuchsia-statically-constructed-objects check - Warns if global, non-trivial objects with static storage are constructed, unless the object is statically initialized with a - constexprconstructor or has no explicit constructor.
- New fuchsia-trailing-return check. - Functions that have trailing returns are disallowed, except for those using - decltypespecifiers and lambda with otherwise unutterable return types.
- New hicpp-multiway-paths-covered check. - Checks on - switchand- if-- else ifconstructs that do not cover all possible code paths.
- New modernize-use-uncaught-exceptions check. - Finds and replaces deprecated uses of - std::uncaught_exceptionto- std::uncaught_exceptions.
- New portability-simd-intrinsics check. - Warns or suggests alternatives if SIMD intrinsics are used which can be replaced by - std::experimental::simdoperations.
- New readability-simplify-subscript-expr check. - Simplifies subscript expressions like - s.data()[i]into- s[i].
- New zircon-temporary-objects check. - Warns on construction of specific temporary objects in the Zircon kernel. 
- Added the missing bitwise assignment operations to hicpp-signed-bitwise. 
- New option MinTypeNameLength for modernize-use-auto check to limit the minimal length of type names to be replaced with - auto. Use to skip replacing short type names like- int/- boolwith- auto. Default value is 5 which means replace types with the name length >= 5 letters only (ex.- double,- unsigned).
- Add VariableThreshold option to readability-function-size check. - Flags functions that have more than a specified number of variables declared in the body. 
- The AnalyzeTemporaryDtors option was removed, since the corresponding cfg-temporary-dtors option of the Static Analyzer now defaults to true. 
- New alias fuchsia-header-anon-namespaces to google-build-namespaces added. 
- New alias hicpp-avoid-goto to cppcoreguidelines-avoid-goto added. 
- Removed the google-readability-redundant-smartptr-get alias of the readability-redundant-smartptr-get check. 
- The ‘misc-forwarding-reference-overload’ check was renamed to bugprone-forwarding-reference-overload 
- The ‘misc-incorrect-roundings’ check was renamed to bugprone-incorrect-roundings 
- The ‘misc-lambda-function-name’ check was renamed to bugprone-lambda-function-name 
- The ‘misc-macro-parentheses’ check was renamed to bugprone-macro-parentheses 
- The ‘misc-macro-repeated-side-effects’ check was renamed to bugprone-macro-repeated-side-effects 
- The ‘misc-misplaced-widening-cast’ check was renamed to bugprone-misplaced-widening-cast 
- The ‘misc-sizeof-container’ check was renamed to bugprone-sizeof-container 
- The ‘misc-sizeof-expression’ check was renamed to bugprone-sizeof-expression 
- The ‘misc-string-compare’ check was renamed to readability-string-compare 
- The ‘misc-string-integer-assignment’ check was renamed to bugprone-string-integer-assignment 
- The ‘misc-string-literal-with-embedded-nul’ check was renamed to bugprone-string-literal-with-embedded-nul 
- The ‘misc-suspicious-enum-usage’ check was renamed to bugprone-suspicious-enum-usage 
- The ‘misc-suspicious-missing-comma’ check was renamed to bugprone-suspicious-missing-comma 
- The ‘misc-suspicious-semicolon’ check was renamed to bugprone-suspicious-semicolon 
- The ‘misc-suspicious-string-compare’ check was renamed to bugprone-suspicious-string-compare 
- The ‘misc-swapped-arguments’ check was renamed to bugprone-swapped-arguments 
- The ‘misc-undelegated-constructor’ check was renamed to bugprone-undelegated-constructor 
- The ‘misc-unused-raii’ check was renamed to bugprone-unused-raii 
- The ‘google-runtime-member-string-references’ check was removed.