[PATCH] D131651: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 23:20:19 PDT 2022


ChuanqiXu added inline comments.


================
Comment at: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:6152
+        // of `getDeclContext()` once we find the invalid test case.
         if (FD->getFriendObjectKind() && FD->getDeclContext()->isFileContext()){
           DC = FD->getLexicalDeclContext();
----------------
I'm pretty sure we should use `getNonTransparentDeclContext` here. But I don't want to do a NFC change without being covered by a test. So I left a FIXME here. And we could change it after we find the test case. The decision may be a little painful but I think it is more stable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131651



More information about the cfe-commits mailing list