ilya-biryukov added a comment. @erichkeane please let me know if you're the right person to review this.
================ Comment at: clang/lib/Sema/SemaTemplate.cpp:8674 auto *Old = Previous.getRepresentativeDecl(); Diag(NameLoc, isa<ConceptDecl>(Old) ? diag::err_redefinition : diag::err_redefinition_different_kind) << NewDecl->getDeclName(); ---------------- Not sure if reporting the redefinition if `isSameEntity` returns false is the right approach here. This leads to errors on definitions of something like: ``` // foo.h template <class T> concept A = false; // bar.h template <class T, class U> concept A = true; #include "foo.h" #include "bar.h" // <-- redefinition error shown here ``` The alternative is the "ambiguous reference" error on the use of the concept. I will check what happens for variables and typedefs in that case and follow the same pattern. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128921/new/ https://reviews.llvm.org/D128921 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits