[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

Giuliano Belinassi via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 13 06:46:43 PDT 2024


================
@@ -1243,12 +1247,19 @@ bool ASTUnit::Parse(std::shared_ptr<PCHContainerOperations> PCHContainerOps,
   }
 
   std::unique_ptr<TopLevelDeclTrackerAction> Act(
-      new TopLevelDeclTrackerAction(*this));
+      new TopLevelDeclTrackerAction(*this, true));
----------------
giulianobelinassi wrote:

The problem is that when you are using PCH it always recreate the preprocessor for compiling the .c/.cpp file instead of reusing the one that resulted from the PCH.  So we need a way to ensure that it isn't recreated in this process.

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


More information about the cfe-commits mailing list