nickdesaulniers planned changes to this revision. nickdesaulniers added inline comments.
================ Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5317 /// EmitTopLevelDecl - Emit code for a single top level declaration. void CodeGenModule::EmitTopLevelDecl(Decl *D) { // Ignore dependent declarations. ---------------- dblaikie wrote: > Since this is only for top-level decls, have you checked this works for types > inside namespaces, local types in functions (well, that one might not be > supported by GCC - so probably good to test/compare GCC's behavior here too), > etc? class declared in namespace works with this patch. I'll add a test. local type in function, ex. ``` void foo(void) { struct bar {}; } ``` is not in the current diff, but is supported by gcc. Let me fix that and add a test. Great suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80242/new/ https://reviews.llvm.org/D80242 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits