================

----------------
5chmidti wrote:

FYI: You could remove the explicit check-nots here:

```c++
// RUN: %check_clang_tidy %s -check-suffixes=,INTERNAL-LINKAGE 
cppcoreguidelines-avoid-non-const-global-variables %t
// RUN: %check_clang_tidy %s cppcoreguidelines-avoid-non-const-global-variables 
%t -- \
// RUN: -config="{CheckOptions: 
{cppcoreguidelines-avoid-non-const-global-variables.AllowInternalLinkage : 
'true'}}"


namespace {
int nonConstAnonymousNamespaceInt = 0;
// CHECK-MESSAGES-INTERNAL-LINKAGE: :[[@LINE-1]]:5: warning: variable 
'nonConstAnonymousNamespaceInt' is non-const and globally accessible, consider 
making it const [cppcoreguidelines-avoid-non-const-global-variables]
} // namespace
```

(There are also two check-nots where the line is off by one)

https://github.com/llvm/llvm-project/pull/93827
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to