[clang] [clang] Add code completion for #embed directive in C23 mode (PR #165550)

Nathan Ridge via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 30 23:53:05 PDT 2025


================
@@ -10208,6 +10208,24 @@ void SemaCodeCompletion::CodeCompletePreprocessorDirective(bool InConditional) {
   Builder.AddPlaceholderChunk("message");
   Results.AddResult(Builder.TakeString());
 
+  if (getLangOpts().C23) {
+    // #embed "header"
----------------
HighCommander4 wrote:

I would call this "file" rather than "header", both in these comments and the actual placeholder text, since the file that's embedded is typically not a "header" in the sense of a C or C++ header file, but just a file containing byte data.

https://github.com/llvm/llvm-project/pull/165550


More information about the cfe-commits mailing list