https://github.com/NagyDonat approved this pull request.
This commit looks good to me, although I'm not very familiar with this area. I agree that the sentence "I did not check for other possibilities for namespaces that are not in a TU or namespace but at least the code should handle all cases." should be removed from the commit message because it's confusing, but I agree that it's OK to use `cast<NamespaceDecl>` in the code (and there is no need to mention this explicitly). (Also, this `cast` was already present before this commit, so changing it is off-topic for this commit.) As I read the testcases I became a bit curious about the situations where the target and the source contain anonymous namespaces in different contexts (directly in the TU VS in an `extern "C"` block VS in another namespace). What happens in those situations? Do I understand it correctly that the anonymous namespaces are not merged and should not be merged? If these are not stupid questions and this is not already tested elsewhere, then perhaps it would be nice to add a few testcases for it. https://github.com/llvm/llvm-project/pull/128735 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits