jrtc27 added a comment.

This also leaks out to users via __builtin_dump_struct 
(https://godbolt.org/z/vx3rjdPdq), and of course the DWARF having the namespace 
in it will result in users debugging plain C seeing C++ namespaces.

ASTDiagnostic's Desugar happens to special-case va_list so it doesn't get 
desugared from the result of the typedef, and thus the struct std::__va_list 
doesn't leak out that way.

I also wouldn't be surprised if some consumers of Clang's AST get confused by a 
namespace appearing for C output; e.g. I could imagine IDEs using clangd 
displaying very confusing information to users writing C code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104830

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to