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

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 12 12:50:55 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));
----------------
shafik wrote:

We should use [bugprone-argument-comment](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/argument-comment.html) comments on literals passed as arguments.

```suggestion
      new TopLevelDeclTrackerAction(*this, /*_ReusePreprocessor=*/true));
```

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


More information about the cfe-commits mailing list