=?utf-8?q?Ondřej_Štorc?= <[email protected]>,Ondrej Storc <[email protected]>,Ondrej Storc <[email protected]>,Ondrej Storc <[email protected]>,Ondrej Storc <[email protected]> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================ @@ -0,0 +1,10 @@ +.. title:: clang-tidy - anonymous-namespace-in-header + +anonymous-namespace-in-header +============================= + +Finds anonymous namespaces in headers. Anonymous namespaces in headers can lead to +ODR (One Definition Rule) violations, as each translation unit including the header +will have its own unique version of the entities declared within the anonymous +namespace. This can cause issues when linking, as the linker may see multiple +definitions of the same entity, leading to unexpected behavior or linker errors. ---------------- zeyi2 wrote: In other alias documentation, we use `References` which looks like [this](https://github.com/llvm/llvm-project/blob/ec1ea0a4ca02451731036ce04915e30aad0c81dd/clang-tools-extra/docs/clang-tidy/checks/misc/predictable-rand.rst?plain=1#L13), so it may be a good idea to also add them here. ```suggestion References ---------- https://google.github.io/styleguide/cppguide.html#Namespaces Corresponding cpplint.py check name: `build/namespaces`. ``` But will be a good idea to wait for other reviewers to verify this :) https://github.com/llvm/llvm-project/pull/170986 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
