balazske marked 2 inline comments as done.
balazske added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/UncheckedReturnValueChecker.cpp:41
+                        BugReporter &BR) const {
+    auto FoundCall = callExpr().bind("call");
+    auto CallInCompound = compoundStmt(forEach(FoundCall));
----------------
baloghadamsoftware wrote:
> Please note that the `CallExpr` does not necessarily stands alone. It may be 
> wrapped into an `ExprWithCleanUps`. We should consider these `CallExpr`s as 
> unchecked too.
It looks like that the matcher finds these occurrences too. A test was added 
for it.


================
Comment at: clang/lib/StaticAnalyzer/Checkers/UncheckedReturnValueChecker.cpp:85
+private:
+  llvm::StringMap<int> FunctionsToCheck = {
+      {"aligned_alloc", 2}, {"asctime_s", 3},     {"at_quick_exit", 1},
----------------
baloghadamsoftware wrote:
> Hmm, why `StringMap<>`? Why not `CallDescriptionMap<>`?
`CallDescriptionMap` is only usable with `CallEvent` that is not used in this 
checker. Or it can be extended with lookup from `FunctionDecl`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90691

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to