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

2024-08-08 Thread via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %check_clang_tidy %s readability-use-explicit-namespaces %t + +namespace foo { +void doSomething() {} + +template void doTemplateThing(T &value) { value = value * 2; } + +struct StructTest { + int StructIntMember; +}; + +class ClassTest { +public: + i

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

2024-08-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. Bump. Please rebase. And please remove unnecessary diagnostic, its makes harder to understand what is part of a check, and what isn't https://github.com/llvm/llvm-project/pull/70621 _

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

2024-08-08 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,220 @@ +// RUN: %check_clang_tidy %s readability-use-explicit-namespaces %t + +namespace foo { +void doSomething() {} + +template void doTemplateThing(T &value) { value = value * 2; } + +struct StructTest { + int StructIntMember; +}; + +class ClassTest { +public: + i

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

2024-08-08 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/70621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-04 Thread via cfe-commits
https://github.com/daltairwalter updated https://github.com/llvm/llvm-project/pull/70621 >From f44d7746a990a3bd8e53de047a30baee4da2c790 Mon Sep 17 00:00:00 2001 From: Daniel Walter Date: Mon, 30 Oct 2023 00:08:56 -0500 Subject: [PATCH 1/9] Initial commit of add new check before changes --- ..

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

2023-12-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/70621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-explicit-namespaces + +readability-use-explicit-namespaces +=== + +This check detects and fixes references to members of namespaces where the namespace is not explicity specified in the refe

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %check_clang_tidy %s readability-use-explicit-namespaces %t + daltairwalter wrote: Are there tools or resources for this? I locally have done a lot more testing, but it is very clear how to turn this into test cases. https://github.co

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

2023-10-30 Thread via cfe-commits
https://github.com/daltairwalter updated https://github.com/llvm/llvm-project/pull/70621 >From f44d7746a990a3bd8e53de047a30baee4da2c790 Mon Sep 17 00:00:00 2001 From: Daniel Walter Date: Mon, 30 Oct 2023 00:08:56 -0500 Subject: [PATCH 1/5] Initial commit of add new check before changes --- ..

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

2023-10-30 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. I like an idea, but this check require lot of work. Todo: - Update to LLVM codding standard - https://llvm.org/docs/CodingStandards.html - Remove any custom diagnostic and things (noise) that aren't needed to make check function

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,64 @@ +//===--- UseExplicitNamespacesCheck.h - clang-tidy --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-explicit-namespaces + +readability-use-explicit-namespaces +=== + +This check detects and fixes references to members of namespaces where the namespace is not explicity specified in the refe

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %check_clang_tidy %s readability-use-explicit-namespaces %t + PiotrZSL wrote: Add tests with: - templates - operators - classes - fixes - ... https://github.com/llvm/llvm-project/pull/70621 __

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-explicit-namespaces + +readability-use-explicit-namespaces +=== + +This check detects and fixes references to members of namespaces where the namespace is not explicity specified in the refe

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %check_clang_tidy %s readability-use-explicit-namespaces %t + +namespace foo +{ +void doSomething() +{ +} +} + +void test1() +{ +foo::doSomething(); +} + +using namespace foo; + +void test2() +{ + // CHECK-MESSAGES: :[[@LINE+1]]:2: warning:

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-explicit-namespaces + +readability-use-explicit-namespaces +=== + +This check detects and fixes references to members of namespaces where the namespace is not explicity specified in the refe

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread via cfe-commits
https://github.com/EugeneZelenko edited https://github.com/llvm/llvm-project/pull/70621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,840 @@ +//===--- UseExplicitNamespacesCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

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

2023-10-30 Thread via cfe-commits
@@ -0,0 +1,24 @@ +.. title:: clang-tidy - readability-use-explicit-namespaces + +readability-use-explicit-namespaces +=== + +This check detects and fixes references to members of namespaces where the namespace is not explicity specified in the refe

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

2023-10-30 Thread via cfe-commits
https://github.com/EugeneZelenko requested changes to this pull request. https://github.com/llvm/llvm-project/pull/70621 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-10-30 Thread via cfe-commits
https://github.com/daltairwalter updated https://github.com/llvm/llvm-project/pull/70621 >From f44d7746a990a3bd8e53de047a30baee4da2c790 Mon Sep 17 00:00:00 2001 From: Daniel Walter Date: Mon, 30 Oct 2023 00:08:56 -0500 Subject: [PATCH 1/4] Initial commit of add new check before changes --- ..

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

2023-10-29 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff a8d0c86174b4e7355e250b3eb266e055df224f48 38df6a99730d64eb96945845b69ce7602ce3ddfa --

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

2023-10-29 Thread via cfe-commits
https://github.com/daltairwalter created https://github.com/llvm/llvm-project/pull/70621 What should be done when "using namespace" has been abused or used in header files? This check will update all references to include full namespace qualification. >From f44d7746a990a3bd8e53de047a30baee4d