[PATCH] D112903: [C++20] [Module] Fix front end crashes when trying to export a qualified entity which is already declared
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 3 20:28:17 PDT 2021
ChuanqiXu added inline comments.
================
Comment at: clang/lib/Sema/SemaDecl.cpp:5748-5750
+ else if (isa<ExportDecl>(Cur))
+ Diag(Loc, diag::err_invalid_declarator_in_export)
+ << Name << cast<NamedDecl>(DC) << SS.getRange();
----------------
ChuanqiXu wrote:
> aaron.ballman wrote:
> > ChuanqiXu wrote:
> > > aaron.ballman wrote:
> > > > I don't believe this is sufficient to cover [module.interface]p6. I tried out the example from the paragraph in the standard and we still silently accept it.
> > > Yes, this patch is not intended to cover [module.interface]p6. The intention is to fix the crash since I feel it would take a longer time to support [module.interface]p6. And crash is not good any way. I plan to support [module.interface]p6 in successive patches. Do you happy with this?
> > > BTW, I have a plan to support clang's c++20 module to a workable state. And I am working on the reachable definition in https://eel.is/c++draft/module.reach#3 and https://eel.is/c++draft/module.global.frag#3.
> > Thank you for the clarification! Fixing the crash is definitely a step in the right direction.
> BYW, I added a new issue for the example in [module.interface]p6 here: https://bugs.llvm.org/show_bug.cgi?id=52395.
s/BYW/BTW
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112903/new/
https://reviews.llvm.org/D112903
More information about the cfe-commits
mailing list