[PATCH] D143524: Make the -Wunused-template default.

2023-09-08 Thread Louis Dionne via Phabricator via cfe-commits
ldionne removed reviewers: ldionne, libc++. ldionne added a comment. Herald added a subscriber: wangpc. [Github PR transition cleanup] Dropping libc++ since this shouldn't affect libc++ since D144667 . Repository: rC Clang CHANGES SINCE LAST ACTION https:

[PATCH] D143524: Make the -Wunused-template default.

2023-02-28 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev planned changes to this revision. v.g.vassilev added inline comments. Comment at: clang/test/SemaCXX/warn-func-not-needed.cpp:13 namespace test1_template { -template static void f() {} +template static void f() {} // expected-warning {{unused function template}}

[PATCH] D143524: Make the -Wunused-template default.

2023-02-27 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: clang/test/SemaCXX/warn-func-not-needed.cpp:13 namespace test1_template { -template static void f() {} +template static void f() {} // expected-warning {{unused function template}} template <> void f() {} // expected-warning {{funct

[PATCH] D143524: Make the -Wunused-template default.

2023-02-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143524#4150289 , @v.g.vassilev wrote: > In D143524#4150286 , @aaron.ballman > wrote: > >> In D143524#4148024 , @v.g.vassilev >> wrote

[PATCH] D143524: Make the -Wunused-template default.

2023-02-24 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D143524#4150286 , @aaron.ballman wrote: > In D143524#4148024 , @v.g.vassilev > wrote: > >> Indeed the warning is noisy but it will potentially fix broken code which >> were unab

[PATCH] D143524: Make the -Wunused-template default.

2023-02-24 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D143524#4148024 , @v.g.vassilev wrote: > Indeed the warning is noisy but it will potentially fix broken code which > were unable to diagnose before. Especially that in some cases where static > templates in header file

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D143524#4148344 , @v.g.vassilev wrote: > In D143524#4148271 , @philnik wrote: > >> It looks like this warning is incompatible with `-Wctad-maybe-unsupported`. >> It warns that the ded

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D143524#4148271 , @philnik wrote: > It looks like this warning is incompatible with `-Wctad-maybe-unsupported`. > It warns that the deduction guide is unused, but the deduction guide is > required suppress `-Wctad-maybe-

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. It looks like this warning is incompatible with `-Wctad-maybe-unsupported`. It warns that the deduction guide is unused, but the deduction guide is required suppress `-Wctad-maybe-unsupported`. https://godbolt.org/z/G8bMjYsbn Repository: rC Clang CHANGES SINCE LAST

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev marked an inline comment as done. v.g.vassilev added a comment. In D143524#4148039 , @philnik wrote: > In D143524#4148024 , @v.g.vassilev > wrote: > >> In D143524#4148006

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. In D143524#4148024 , @v.g.vassilev wrote: > In D143524#4148006 , @philnik wrote: > >> The emitted warnings from the libc++ CI look like a false-positive to me. >> While the functions are

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev marked an inline comment as done. v.g.vassilev added inline comments. Comment at: clang/test/SemaCXX/warn-func-not-needed.cpp:13 namespace test1_template { -template static void f() {} +template static void f() {} // expected-warning {{unused function template}}

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D143524#4148006 , @philnik wrote: > The emitted warnings from the libc++ CI look like a false-positive to me. > While the functions are never called, they are used in an unevaluated > context. I would expect `-Wunused` w

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. The emitted warnings from the libc++ CI look like a false-positive to me. While the functions are never called, they are used in an unevaluated context. I would expect `-Wunused` warnings to only be emitted when I can just remove the code without problems, which doesn't

[PATCH] D143524: Make the -Wunused-template default.

2023-02-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: libc++. aaron.ballman added a comment. Precommit CI shows issues with the libc++ tests that need to be addressed. This should also come with a release note. Comment at: clang/test/SemaCXX/warn-func-not-needed.cpp:13 namespace test1_template { -

[PATCH] D143524: Make the -Wunused-template default.

2023-02-07 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. v.g.vassilev added reviewers: aaron.ballman, ldionne. Herald added a project: All. v.g.vassilev requested review of this revision. https://reviews.llvm.org/D29877 implements a useful -Wunused-template diagnostic detects unused internal linkage templates. This h