[PATCH] D114096: [clang][lex][modules] Stop tracking number of includes

Duncan P. N. Exon Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 17 12:54:59 PST 2021


dexonsmith added a comment.

I have a couple of nits inline, but otherwise LGTM if you squash with https://reviews.llvm.org/D114095.



================
Comment at: clang/include/clang/Lex/Preprocessor.h:1230-1232
   /// Increment the count for the number of times the specified FileEntry has
   /// been entered. Returns true if this is the first time it file was included.
   bool incrementIncludeCount(const FileEntry *File) {
----------------
Looks like the comment (and function name) are bitrotting here. For the name, I suggest `trackIncludeFile()` or something.


================
Comment at: clang/include/clang/Lex/Preprocessor.h:1242
+  /// Get the included files.
+  llvm::DenseSet<const FileEntry *> &getIncludedFiles() {
     return IncludedFiles;
----------------
A `using` declaration for the `DenseSet` might be nice.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114096/new/

https://reviews.llvm.org/D114096



More information about the cfe-commits mailing list