[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-16 Thread Takuya Shimizu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64083172eea2: [clang][Sema] Provide source range to several Wunused warnings (authored by hazohelet). Changed prior to commit: https://reviews.llvm.org/D152707?vs=531266&id=532079#toc Repository: rG

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-14 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 531266. hazohelet added a comment. Added an additional null check that I mentioned earlier CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaDecl.cpp

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-14 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1386 +if (const auto *VTSD = dyn_cast(DiagD)) + DiagRange.setEnd(VTSD->getTemplateArgsInfo()->RAngleLoc); if (DiagD->isReferenced()) { It looks like `VarTemplateSpecial

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet marked 3 inline comments as done. hazohelet added a comment. Thanks for the review. I'll check the pre-commit CI result before landing this just in case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 ___

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 530912. hazohelet added a comment. Address review comments - Move the test header to `Inputs` folder - Remove explicit constructor call of `SourceRange` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 F

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LG aside from the few suggested changes and moving the header to the Inputs directory. Comment at: clang/lib/Sema/Sema.cpp:1350 continue; // Deleted

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1350 continue; // Deleted functions are supposed to be unused. +SourceRange DiagRange = SourceRange(DiagD->getLocation()); +if (const ASTTemplateArgumentListInfo *ASTTAL =

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1350 continue; // Deleted functions are supposed to be unused. +SourceRange DiagRange = SourceRange(DiagD->getLocation()); +if (const ASTTemplateArgumentListInfo *ASTTAL =

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet updated this revision to Diff 530834. hazohelet added a comment. - Change `%clang` to `%clang_cc1 -fcxx-exceptions` in the test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaDec

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-13 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet added a comment. In D152707#4413899 , @tbaeder wrote: > Precommit-CI also found some problems on Windows It's a littile surprising to me that clang outputs different diagnostics on windows. I suspect it might be related to the clang driver, so

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/Misc/diag-unused-source-ranges.h:1 +static void thing(void) {} Moving this file to `Inputs/` would make sense I think. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Precommit-CI also found some problems on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152707/new/ https://reviews.llvm.org/D152707 ___ cfe-commits mailing list cfe-commi

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/test/Misc/diag-unused-source-ranges.cpp:1 +// RUN: %clang -fsyntax-only -Wunused -Wunused-template -Wunused-exception-parameter -Wunused-member-function -fdiagnostics-print-source-range-info %s 2>&1 | FileCheck %s --strict-whites

[PATCH] D152707: [clang][Sema] Provide source range to several Wunused warnings

2023-06-12 Thread Takuya Shimizu via Phabricator via cfe-commits
hazohelet created this revision. hazohelet added reviewers: aaron.ballman, cjdb, tbaeder. Herald added a project: All. hazohelet requested review of this revision. Herald added a project: clang. When the diagnosed function/variable is a template specialization, the source range covers the special