[PATCH] D122285: [analyzer] Add path note tags to standard library function summaries.

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 6 02:52:29 PDT 2022


balazske added inline comments.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:400
+  ///     then the return value is 0
+  ///     and the note may say "Assuming the character is non-alphabetical".
+  class SummaryCase {
----------------
It would be good to test how this looks in doxygen output. If it is for generated documentation formatting tags can be used, otherwise this can be a `//` comment.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:879
+            // knowing in advance which branch is taken.
+            return (Node->succ_size() > 1) ? Note.str() : "";
+          },
----------------
Can other checkers not add successor nodes (that make this check not always correct)?


================
Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:879
+            // knowing in advance which branch is taken.
+            return (Node->succ_size() > 1) ? Note.str() : "";
+          },
----------------
balazske wrote:
> Can other checkers not add successor nodes (that make this check not always correct)?
Is there a reason against add the note without the word "Assuming" instead of no note?


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

https://reviews.llvm.org/D122285



More information about the cfe-commits mailing list