[clang] [clang-repl] Lay the foundation of pretty printing for C. (PR #89811)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 11:17:59 PDT 2024
================
@@ -269,7 +267,10 @@ const char *const Runtimes = R"(
void __clang_Interpreter_SetValueCopyArr(const T (*Src)[N], void* Placement, unsigned long Size) {
__clang_Interpreter_SetValueCopyArr(Src[0], Placement, Size);
}
+ extern "C"
----------------
AaronBallman wrote:
This seems a little subtle, but it is correct. One improvement to consider would be:
```
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C extern
#endif
```
and using `EXTERN_C` in the declarations as needed. The current form is subtle because it's easy to miss the `extern "C"` in the prior conditional block.
https://github.com/llvm/llvm-project/pull/89811
More information about the cfe-commits
mailing list