Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 7c50187b 01-Jul-2024 Pascal Jungblut <github@pascalj.de>

[clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (#93827)

Add an option to ignore warnings for cppcoreguidelines
avoid-non-const-global-variables.

Understan

[clang-tidy] Option to ignore anonymous namespaces in avoid-non-const-global-variables (#93827)

Add an option to ignore warnings for cppcoreguidelines
avoid-non-const-global-variables.

Understandably, the core guidelines discourage non const global
variables, even at the TU level (see
https://github.com/isocpp/CppCoreGuidelines/issues/2195). However,
having a small TU with an interface that uses a non const variable from
an anonymous namespace can be a valid choice.

This adds an option that disables the warning just for anonymous
namespaces, i.e. at the file level. The default is still to show a
warning, just as before.

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2
# 3e2ed570 05-Aug-2023 Piotr Zegar <me@piotrzegar.pl>

[clang-tidy] Exclude class/struct scope variables from cppcoreguidelines-avoid-non-const-global-variables

Ignore static variables declared within the scope of class/struct.
Those variables should be

[clang-tidy] Exclude class/struct scope variables from cppcoreguidelines-avoid-non-const-global-variables

Ignore static variables declared within the scope of class/struct.
Those variables should be covered by I.3 rule.

Fixes: #47384

Reviewed By: carlosgalvezp

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

show more ...


Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6
# 89a1d03e 17-Jun-2022 Richard <legalize@xmission.com>

[clang-tidy] Organize test files into subdirectories by module (NFC)

Eliminate clutter by reorganizing the Lit test files for clang-tidy:
- Move checkers/<module>-* to checkers/<module>/*.
- Move mo

[clang-tidy] Organize test files into subdirectories by module (NFC)

Eliminate clutter by reorganizing the Lit test files for clang-tidy:
- Move checkers/<module>-* to checkers/<module>/*.
- Move module specific inputs from Inputs to <module>/Inputs. Remove
any module prefix from the file or subdirectory name as they are no
longer needed.
- Introduce a Lit substitution %clang_tidy_headers for the system
headers in checkers/Inputs/Headers and use this throughout. This
avoids referencing system headers through a relative path to the
parent directory and makes it clear that these fake system headers are
shared among all modules.
- Update add_new_check.py to follow the above conventions when creating
the boiler plate test files for a new check.
- Update Contributing.rst to describe per-module Inputs directory and
fix link to test source code.

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

show more ...