Skip to content

Commit

Permalink
Disable misc-use-anonymous-namespace (#19831)
Browse files Browse the repository at this point in the history
[misc-use-anonymous-namespace](https://clang.llvm.org/extra/clang-tidy/checks/misc/use-anonymous-namespace.html)
suggests moving static variables and functions into anonymous namespaces
(doesn't appear to effect classes). This conflicts with
https://llvm.org/docs/CodingStandards.html#anonymous-namespaces (see
#18764 (comment)):

>Because of this, we have a simple guideline: make anonymous namespaces
as small as possible, and only use them for class declarations.

It also clutters LSP warnings/errors.

Signed-off-by: Ian Wood <[email protected]>
  • Loading branch information
IanWood1 authored Jan 29, 2025
1 parent 9cca17a commit 60f3cc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/.clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Checks: >
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
-misc-unused-using-decls,
-misc-use-anonymous-namespace,
-llvm-else-after-return,
-llvm-include-order,
-llvm-qualified-auto

0 comments on commit 60f3cc6

Please sign in to comment.