[all-commits] [llvm/llvm-project] 275539: [clang-tidy] Add support for diagnostics with no l...

Nathan James via All-commits all-commits at lists.llvm.org
Tue Dec 8 12:35:13 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 27553933a8693d508eb7f7c24a14f66b3d006d2c
      https://github.com/llvm/llvm-project/commit/27553933a8693d508eb7f7c24a14f66b3d006d2c
  Author: Nathan James <n.james93 at hotmail.co.uk>
  Date:   2020-12-08 (Tue, 08 Dec 2020)

  Changed paths:
    M clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
    M clang-tools-extra/clang-tidy/ClangTidyCheck.h
    M clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
    M clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
    M clang-tools-extra/clang-tidy/bugprone/DynamicStaticInitializersCheck.cpp
    M clang-tools-extra/clang-tidy/bugprone/SuspiciousIncludeCheck.cpp
    M clang-tools-extra/clang-tidy/cppcoreguidelines/PreferMemberInitializerCheck.cpp
    M clang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.cpp
    M clang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.cpp
    M clang-tools-extra/clang-tidy/misc/DefinitionsInHeadersCheck.cpp
    M clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.cpp
    M clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp
    M clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-case-violation.cpp
    M clang-tools-extra/unittests/clang-tidy/ClangTidyDiagnosticConsumerTest.cpp
    M clang-tools-extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp

  Log Message:
  -----------
  [clang-tidy] Add support for diagnostics with no location

Add methods for emitting diagnostics with no location as well as a special diagnostic for configuration errors.
These show up in the errors as [clang-tidy-config].
The reason to use a custom name rather than the check name is to distinguish the error isn't the same category as the check that reported it.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D91885




More information about the All-commits mailing list