[all-commits] [llvm/llvm-project] e65b36: [clang-tidy] Allow thread-local variables in avoid...

Sirui Mu via All-commits all-commits at lists.llvm.org
Wed Oct 29 08:04:47 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e65b36c640b781be724f587085056c2819c7ad00
      https://github.com/llvm/llvm-project/commit/e65b36c640b781be724f587085056c2819c7ad00
  Author: Sirui Mu <msrlancern at gmail.com>
  Date:   2025-10-29 (Wed, 29 Oct 2025)

  Changed paths:
    M clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp
    M clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.h
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines/avoid-non-const-global-variables.rst
    M clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/avoid-non-const-global-variables.cpp

  Log Message:
  -----------
  [clang-tidy] Allow thread-local variables in avoid-non-const-global-variables (#164442)

This patch adds an option named `AllowThreadLocal` to the
`cppcoreguidelines-avoid-non-const-global-variables` check. When set to
true, the option suppresses warnings generated for non-const global
variables with thread-local storage duration. By default, the option is
set to false.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list