[clang-tools-extra] create new clang-tidy check to add namespaces to symbol references (PR #70621)

via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 29 22:49:17 PDT 2023


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff a8d0c86174b4e7355e250b3eb266e055df224f48 38df6a99730d64eb96945845b69ce7602ce3ddfa -- clang-tools-extra/clang-tidy/readability/UseExplicitNamespacesCheck.cpp clang-tools-extra/clang-tidy/readability/UseExplicitNamespacesCheck.h clang-tools-extra/test/clang-tidy/checkers/readability/use-explicit-namespaces.cpp clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang-tools-extra/clang-tidy/readability/UseExplicitNamespacesCheck.cpp b/clang-tools-extra/clang-tidy/readability/UseExplicitNamespacesCheck.cpp
index 2143b392a..776c895c8 100644
--- a/clang-tools-extra/clang-tidy/readability/UseExplicitNamespacesCheck.cpp
+++ b/clang-tools-extra/clang-tidy/readability/UseExplicitNamespacesCheck.cpp
@@ -327,8 +327,8 @@ getDeclContextVector(const DeclContext *context) {
       break;
     case Decl::Namespace:
       namespacesStarted = true;
-      [[fallthrough]] default
-          : if (namespacesStarted && kind != Decl::Namespace) {
+    [[fallthrough]] default:
+      if (namespacesStarted && kind != Decl::Namespace) {
         std::cout << "processing namepsace vector after namespace "
                      "we have "
                   << context->getDeclKindName() << std::endl;

``````````

</details>


https://github.com/llvm/llvm-project/pull/70621


More information about the cfe-commits mailing list