[PATCH] D59798: [analyzer] Add analyzer option to limit the number of imported TUs

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 11 00:08:40 PDT 2019


xazax.hun added a comment.

Mostly looks good, I have two slightly related nits.



================
Comment at: include/clang/CrossTU/CrossTranslationUnit.h:127
+                       StringRef IndexName, bool DisplayCTUProgress,
+                       unsigned CTULoadThreshold);
 
----------------
I would prefer to keep the default argument for `DisplayCTUProgress`. You could do this either by swapping the arguments or adding a default argument to `CTULoadThreshold` as well. I think I might prefer the latter. 


================
Comment at: include/clang/CrossTU/CrossTranslationUnit.h:176
   std::unique_ptr<ASTImporterLookupTable> LookupTable;
+  unsigned NumASTLoaded{0u};
 };
----------------
Does it make sense to call `getCrossTUDefinition` with different thresholds for the same CTUContext? I suspect it is not, so it might make more sense to set the threshold in the context's constructor.


Repository:
  rC Clang

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

https://reviews.llvm.org/D59798





More information about the cfe-commits mailing list