[PATCH] D85752: [Analyzer] Store the pointed/referenced type for dynamic casts

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 11:08:30 PDT 2020


NoQ added a comment.

Yes, i completely agree that this is the right decision, thanks!



================
Comment at: clang/lib/StaticAnalyzer/Core/DynamicType.cpp:71-72
+    Ty = Ty.getNonReferenceType();
+  if (const auto *STTPTy = dyn_cast<SubstTemplateTypeParmType>(Ty.getTypePtr()))
+    Ty = STTPTy->getReplacementType();
+  if (Ty->isPointerType())
----------------
Just canonicalize instead. The result doesn't depend on sugar either.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85752



More information about the cfe-commits mailing list