Skip to content

Conversation

@SjMxr233
Copy link

When I call the ParseTranslationUnit and GetDiagnostic interfaces of dxcisense to obtain diagnostic information, the ExpandTokPastingArg is not properly initialized during the pipeline. This results in undefined behavior due to reading the uninitialized value, making token-pasting indeterminate.
63ED63EABDCEF510958A852759D74881

@github-actions
Copy link
Contributor

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff dc85cd71e2be16cd1b1e91507cf78d55032d32f2 2126ace887ed241c002749bfa7198b1e4f2111e6 -- tools/clang/include/clang/Lex/PreprocessorOptions.h
View the diff from clang-format here.
diff --git a/tools/clang/include/clang/Lex/PreprocessorOptions.h b/tools/clang/include/clang/Lex/PreprocessorOptions.h
index fe688e8b..84ebde0c 100644
--- a/tools/clang/include/clang/Lex/PreprocessorOptions.h
+++ b/tools/clang/include/clang/Lex/PreprocessorOptions.h
@@ -147,16 +147,14 @@ public:
   IntrusiveRefCntPtr<FailedModulesSet> FailedModules;
 
 public:
-  PreprocessorOptions() : UsePredefines(true), DetailedRecord(false),
-                          IgnoreLineDirectives(false), // HLSL Change - ignore line directives.
-                          ExpandTokPastingArg(false), // HLSL Change - allow pre-expand
-                          DisablePCHValidation(false),
-                          AllowPCHWithCompilerErrors(false),
-                          DumpDeserializedPCHDecls(false),
-                          PrecompiledPreambleBytes(0, true),
-                          RemappedFilesKeepOriginalName(true),
-                          RetainRemappedFileBuffers(false),
-                          ObjCXXARCStandardLibrary(ARCXX_nolib) { }
+  PreprocessorOptions()
+      : UsePredefines(true), DetailedRecord(false),
+        IgnoreLineDirectives(false), // HLSL Change - ignore line directives.
+        ExpandTokPastingArg(false),  // HLSL Change - allow pre-expand
+        DisablePCHValidation(false), AllowPCHWithCompilerErrors(false),
+        DumpDeserializedPCHDecls(false), PrecompiledPreambleBytes(0, true),
+        RemappedFilesKeepOriginalName(true), RetainRemappedFileBuffers(false),
+        ObjCXXARCStandardLibrary(ARCXX_nolib) {}
 
   void addMacroDef(StringRef Name) { Macros.emplace_back(Name, false); }
   void addMacroUndef(StringRef Name) { Macros.emplace_back(Name, true); }
  • Check this box to apply formatting changes to this branch.

@SjMxr233 SjMxr233 closed this Oct 26, 2025
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant