cpplearner added a comment.

(I am ensadc at bugzilla)

Does this cause regression in the following case?

  template<int *N>
  void f() {
      switch (N) case 0:; // should be diagnosed
      switch (0) case N:; // should be diagnosed
  }

Currently clang diagnoses these `switch` statements even if the template is not 
instantiated, GCC does not.

AFAIK both compilers are correct under [temp.res]/8, but clang's current 
behavior seems more helpful.


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

https://reviews.llvm.org/D61027



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

Reply via email to