ChuanqiXu added inline comments.
================ Comment at: clang/lib/Sema/SemaDecl.cpp:1824-1826 +static bool isUsingDeclAtClassScope(NamedDecl *D) { + if (D->getDeclContext()->isFileContext()) + return false; ---------------- This is the ad-hoc change. Look at the following comment. ================ Comment at: clang/lib/Sema/SemaDecl.cpp:6375-6378 - // C++ [dcl.meaning]p1: - // [...] the member shall not merely have been introduced by a - // using-declaration in the scope of the class or namespace nominated by - // the nested-name-specifier of the declarator-id. ---------------- I can't find the wording in the existing spec (at least not in current [dcl.meaning]). But if p8.cpp will be accepted unexpectedly if I remove `RemoveUsingDecls(Previous);` completely. It would look good to me if we can remove `RemoveUsingDecls(Previous);` completely. ================ Comment at: clang/test/CXX/special/class.inhctor/p8.cpp:32-33 +// FIMXE: Why should the following line be rejected? template<typename T> constexpr D::D(T t) : C(t) {} // expected-error {{does not match any declaration in 'D'}} ---------------- I don't understand why this should be rejected. I tried to read P0136R1 but I failed to find the related things and I don't find a related wording in the current spec. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148506/new/ https://reviews.llvm.org/D148506 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits