[PATCH] D103750: [analyzer] Handle std::make_unique for SmartPtrModeling

Gábor Horváth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 17 15:57:43 PDT 2021


xazax.hun added a comment.

I believe there are a couple of comments that are done but not marked accordingly. 
I agree with Artem, if we could craft code that fails due to not calling ctors, we should probably include them in the tests, even if they don't reflect the desired behavior they are a great source of documentation what is missing.



================
Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtrModeling.cpp:151
+  const auto &TemplateArgs = FD->getTemplateSpecializationArgs()->asArray();
+  if (TemplateArgs.size() == 0)
+    return {};
----------------
Nit: consider `TemplateArgs.empty()`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103750



More information about the cfe-commits mailing list