Issue 135012
Summary Emitting attribute diagnostics twice in some template instantiations
Labels c++, clang:frontend, quality-of-implementation
Assignees
Reporter AaronBallman
    Consider the following:
```
template <class T>
void f(T __attribute__((align_value(4))) x) {} // expected-warning 2 {{'align_value' attribute only applies to a pointer or reference ('int' is invalid)}}

void foo() {
  f<int>(0); // expected-note {{while substituting explicitly-specified template arguments into function template 'f'}} \
 expected-note {{while substituting deduced template arguments into function template 'f' [with T = int]}}
}
```
It would be ideal to only diagnose once rather than twice. We get one diagnostic from explicit template arguments and another one for deduced template arguments, which seems silly.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to