[all-commits] [llvm/llvm-project] 2c9cf9: [clang-tidy] New check: bugprone-suspicious-include

Jon Roelofs via All-commits all-commits at lists.llvm.org
Thu Mar 12 09:01:44 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2c9cf9f4ddd01ae9eb47522266a6343104f9d0b5
      https://github.com/llvm/llvm-project/commit/2c9cf9f4ddd01ae9eb47522266a6343104f9d0b5
  Author: Jonathan Roelofs <jroelofs at jroelofs.com>
  Date:   2020-03-12 (Thu, 12 Mar 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/SuspiciousIncludeCheck.cpp
    A clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.h
    M clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.cpp
    M clang-tools-extra/clang-tidy/utils/FileExtensionsUtils.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    A clang-tools-extra/docs/clang-tidy/checks/bugprone-suspicious-include.rst
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/a
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/a.cpp
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/a.hpp
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/c.c
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/c.cc
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/c.cxx
    A clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/i.cpp
    A clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-include.cpp

  Log Message:
  -----------
  [clang-tidy] New check: bugprone-suspicious-include

Detects and fixes suspicious code like: `#include "foo.cpp"`.

Inspired by: https://twitter.com/lefticus/status/1228458240364687360?s=20

https://reviews.llvm.org/D74669




More information about the All-commits mailing list