[PATCH] D73897: [analyzer] StdLibraryFunctionsChecker refactor: remove macros

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 7 02:48:26 PST 2020


martong marked 3 inline comments as done.
martong added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:537-551
+  // The format is as follows:
   //{ "function name",
-  //  { spec:
+  //  { variant0:
   //    { argument types list, ... },
-  //    return type, purity, { range set list:
+  //    return type, purity, { specification list:
   //      { range list:
   //        { argument index, within or out of, {{from, to}, ...} },
----------------
NoQ wrote:
> I suspect that this comment would need a lot more updates.
Could you please elaborate? Do you mean to add comments e.g. to `ArgumentCondition` and the rest below? Or to rewrite the above comment?


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:553
   //}
+  using Summary = FunctionSummaryTy;
+  auto ArgumentCondition = [](ArgNoTy ArgNo, ValueRangeKindTy Kind,
----------------
NoQ wrote:
> There seems to be a lot of inconsistency in the use of `T`, `Ty`, and lack-of-suffix.
> 
> I'd prefer to have one of them reserved for `QualType`s (eg., `IntTy`).
Ok, I've renamed every type with the `Ty` suffix to not have any suffix. `Ty` is reserved for variables now whose type is QualType, e.g. IntTy.
Removed the `T` suffix too from the lambdas that can generate summaries (e.g. `Getc`).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73897





More information about the cfe-commits mailing list