[PATCH] D130470: [clang][analyzer] Add more wide-character functions to CStringChecker

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 26 03:29:30 PDT 2022


steakhal added a comment.

Other than nits, I think it looks great.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp:1359
+void CStringChecker::evalMemcmp(CheckerContext &C, const CallExpr *CE,
+                                bool IsWide) const {
   // int memcmp(const void *s1, const void *s2, size_t n);
----------------
Personally, I dislike bools for this purpose.
Did you consider something like `enum CharacterFlavor {Regular, Wide}`? It would be more readable in the CallDescription table.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130470



More information about the cfe-commits mailing list