[PATCH] D74735: [analyzer] Add support for CXXInheritedCtorInitExpr.

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 04:16:25 PST 2020


steakhal added inline comments.
Herald added a subscriber: ASDenysPetrov.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h:916-918
+  virtual const CXXInheritedCtorInitExpr *getOriginExpr() const {
+    return cast<CXXInheritedCtorInitExpr>(AnyFunctionCall::getOriginExpr());
+  }
----------------
Why is this function virtual?
If we want such behavior we should mark the `CallEvent::getOriginExpr` virtual and just //override// it here.
As-of-now, this just hides the previous implementation, causing potential problems.

This code-smell occures several times across this class hierachy.

Is this the expected behavior @NoQ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74735



More information about the cfe-commits mailing list