================
@@ -3454,9 +3454,21 @@ uint64_t
ASTWriter::WriteDeclContextLexicalBlock(ASTContext &Context,
if (DC->decls_empty())
return 0;
- // In reduced BMI, we don't care the declarations in functions.
- if (GeneratingReducedBMI && DC->isFunctionOrMethod())
- return 0;
+ // In reduced BMI, we don't care the declarations in functions, unless they
+ // are templated functions, because their bodies may contain nested
class/lambda
+ // definitions that are canonicalized and need mapping of local declarations.
+ if (GeneratingReducedBMI && DC->isFunctionOrMethod()) {
----------------
ChuanqiXu9 wrote:
We have to understand **why** we need these function local declarations in
lexical lookup table to continue.
I don't feel bad with AI. But the contributor need to understand what their
patches did. I think this matches LLVM's guidelines.
https://github.com/llvm/llvm-project/pull/202248
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits