================
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s
+
+// CHECK: extern "C" int printf(const char *, ...);
+extern "C" int printf(const char *...);
+
+// CHECK: extern "C++" {
----------------
temyurchenko wrote:

Unfortunately, I'm not aware of the design goals of `DeclPrinter`. How 
accurately is it trying to represent the original code? Because AST's are 
naturally a lossy projection of CST's, so there is always going to be a 
difference to the original. How much of that difference is admissible?

I can try to work around that by querying 
`VarDecl::isInExternCContext`/`isInExternCXXContext` inside of `VarDecl`, but 
my initial naive implementation didn't have the desired result. 

https://github.com/llvm/llvm-project/pull/93131
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to