[all-commits] [llvm/llvm-project] 42a035: Add `bugprone-reserved-identifier`

kepler-5 via All-commits all-commits at lists.llvm.org
Fri Jan 17 05:44:43 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 42a0355816d3bc125d59cbd07052c8886e78ca86
      https://github.com/llvm/llvm-project/commit/42a0355816d3bc125d59cbd07052c8886e78ca86
  Author: Logan Smith <logan.r.smith0 at gmail.com>
  Date:   2020-01-17 (Fri, 17 Jan 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
    M clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
    A clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp
    A clang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.h
    M clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/docs/clang-tidy/checks/bugprone-reserved-identifier.rst
    A clang-tools-extra/docs/clang-tidy/checks/cert-dcl37-c.rst
    A clang-tools-extra/docs/clang-tidy/checks/cert-dcl51-cpp.rst
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/bugprone-reserved-identifier/system/system-header.h
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/bugprone-reserved-identifier/user-header.h
    A clang-tools-extra/test/clang-tidy/checkers/bugprone-reserved-identifier-c.c
    A clang-tools-extra/test/clang-tidy/checkers/bugprone-reserved-identifier-invert.cpp
    A clang-tools-extra/test/clang-tidy/checkers/bugprone-reserved-identifier.cpp

  Log Message:
  -----------
  Add `bugprone-reserved-identifier`

This patch adds bugprone-reserved-identifier, which flags uses of __names _Like
::_this, which are reserved for the implementation. The check can optionally be
inverted, i.e. configured to flag any names that are _not_ reserved, which may
be useful for e.g. standard library implementors.




More information about the All-commits mailing list