alexfh added a comment.

Serge, this diagnostic doesn't handle non-type template parameters correctly in 
some cases. Here's an example derived from a real code: 
https://gcc.godbolt.org/z/cvP8od5c6

  template<int K>
  struct T {
    static void F(int a[8 * K]);
  };
  template<int K>
  void T<K>::F(int a[8 * K]) {}



  <source>:6:18: warning: argument 'a' of type 'int[8 * K]' with mismatched 
bound [-Warray-parameter]
  void T<K>::F(int a[8 * K]) {}
                   ^
  <source>:3:21: note: previously declared as 'int[8 * K]' here
    static void F(int a[8 * K]);
                      ^

Do you see an obvious fix? If not, please revert while investigating.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128449/new/

https://reviews.llvm.org/D128449

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to