[clang] [analyzer] Variant checker bindings (PR #87886)

via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 8 09:10:47 PDT 2024


================
@@ -286,6 +332,21 @@ class StdVariantChecker : public Checker<eval::Call, check::RegionChanges> {
     C.emitReport(std::move(R));
     return true;
   }
+
+  // TODO Implement modeling of std::variant's emplace method.
+  // Currently when this method call is encountered we just
+  // stop the modeling of that std::variant instance.
+  bool handleStdVariantEmplaceCall(const CallEvent &Call,
----------------
NagyDonat wrote:

I think it would be good to rename this function to "discardInfoAboutInstance" or something similar. I see that you added a "TODO: implement the modeling", which is enough to alert the reader, but my first impression was still "why is this obsolete comment left there? -- that function _does_ handle the emplace call...". 

https://github.com/llvm/llvm-project/pull/87886


More information about the cfe-commits mailing list