[PATCH] D80522: [Analyzer] [NFC] Parameter Regions

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 3 04:54:01 PDT 2020


NoQ added inline comments.


================
Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:921
+public:
+  const VarDecl *getDecl() const override = 0;
+
----------------
baloghadamsoftware wrote:
> NoQ wrote:
> > What's the point of overriding one pure virtual method with another pure virtual method?
> To constrain the return value from `Decl` to `VarDecl`. Without this we have change all the callers to cast the return value from this function to `VarDecl`. It would be ugly.
Aha, covariance! Nice!


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

https://reviews.llvm.org/D80522





More information about the cfe-commits mailing list