Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable additional code checks #29858

Closed
wants to merge 2 commits into from

Commits on May 16, 2020

  1. Enable additional code checks

    performance-faster-string-find:
      Optimize calls to std::string::find() and friends when the needle passed is
      a single character string literal.
    
    performance-for-range-copy:
      Finds C++11 for ranges where the loop variable is copied in each iteration
      but it would suffice to obtain it by const reference.
    
    performance-implicit-conversion-in-loop:
      This warning appears in a range-based loop with a loop variable of const ref
      type where the type of the variable does not match the one returned by the
      iterator. This means that an implicit conversion happens, which can for
      example result in expensive deep copies.
    
    performance-inefficient-algorithm:
      Warns on inefficient use of STL algorithms on associative containers.
    
    performance-inefficient-vector-operation:
      Finds possible inefficient std::vector operations (e.g. push_back, emplace_back)
      that may cause unnecessary memory reallocations.
    
    performance-move-const-arg:
      Warn about inefficient use of std::move, and suggest a fix that removes it.
    
    performance-unnecessary-copy-initialization:
      Finds local variable declarations that are initialized using the copy
      constructor of a non-trivially-copyable type, where it would suffice to
      obtain a const reference.
    
    performance-unnecessary-value-param:
      Flags value parameter declarations of expensive to copy types that are copied
      for each invocation, where it would suffice to pass them by const reference.
    
    modernize-make-unique:
      Finds the creation of std::unique_ptr objects explicitly calling a new
      expression, and replaces it with a call to std::make_unique.
    
    modernize-loop-convert:
      This check converts for(...; ...; ...) loops to use the new range-based loops
      in C++11.
      The MinConfidence option was already set to "reasonable".
    
    modernize-use-auto:
      Use the auto type specifier for variable declarations to improve code
      readability and maintainability.
      The MinTypeNameLength option is set to 16 characters.
    
    modernize-use-emplace:
      The check flags insertions to an STL-style container done by calling the
      push_back method with an explicitly-constructed temporary of the container
      element type. In this case, the corresponding emplace_back method results
      in less verbose and potentially more efficient code.
    fwyzard committed May 16, 2020
    Configuration menu
    Copy the full SHA
    0feced2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a6dc7f View commit details
    Browse the repository at this point in the history