[llvm] [lldb] [mlir] [libc] [libcxx] [openmp] [libunwind] [clang-tools-extra] [flang] [libcxxabi] [lld] [clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-12-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. I like the behavior of this and the changes LGTM, but please give @ErichKeane a chance to weigh in as templates code owner before landing. https://github.com/llvm/llvm-project/pull/71264 ___

[clang-tools-extra] [llvm] [clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-29 Thread Justin Bogner via cfe-commits
bogner wrote: > I agree that "is declared here" is useless when "here" is... nowhere. But the > point to the note is to help the user to see what the actual declaration is > to help them repair the issue. Losing the note entirely isn't the worst > thing, but I wonder if it would be better for

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-29 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > ping. @AaronBallman Does this look like a reasonable thing to do to you? Sorry for the delay on the review! I agree that "is declared here" is useless when "here" is... nowhere. But the point to the note is to help the user to see what the actual declaration is to help

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-28 Thread via cfe-commits
cor3ntin wrote: That's a lot of repeated code. Should we have a "NoteTemplateLocation" function(s) of some sort that would do the check and the diag as appropriate? https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-17 Thread Justin Bogner via cfe-commits
bogner wrote: ping. https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-09 Thread Justin Bogner via cfe-commits
bogner wrote: ping. @AaronBallman Does this look like a reasonable thing to do to you? https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Justin Bogner (bogner) Changes If a template is defined via an external AST source, it won't have a location. When we emit warnings about misusing such templates we shouldn't emit a "template is declared here" warning with no location, as