[llvm-branch-commits] [clang] [clang] Implement instantiation context note for checking template parameters (PR #126088)
Vlad Serebrennikov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Feb 6 09:49:31 PST 2025
================
@@ -83,6 +83,7 @@ namespace cwg603 { // cwg603: 3.1
typedef S<'\001'> S1;
typedef S<(1ul << __CHAR_BIT__) + 1> S1;
// since-cxx11-error at -1 {{non-type template argument evaluates to 257, which cannot be narrowed to type 'unsigned char'}}
+ // since-cxx11-note at -4 {{template parameter is declared here}}
----------------
Endilll wrote:
Use a label instead of `-4`, readers shouldn't have to count lines to understand which line the note is emitted for.
https://github.com/llvm/llvm-project/pull/126088
More information about the llvm-branch-commits
mailing list