[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 15 17:47:47 PDT 2023


================
@@ -609,9 +617,13 @@ storeWhenMoreInformative(ProgramStateRef &State, SymbolRef Sym,
 /// symbol and the destination type of the cast are unrelated, report an error.
 void DynamicTypePropagation::checkPostStmt(const CastExpr *CE,
                                            CheckerContext &C) const {
+  ProgramStateRef State = C.getState();
+  ExplodedNode *AfterTypeProp = dynamicTypePropagationOnCasts(CE, State, C);
+
   if (CE->getCastKind() != CK_BitCast)
     return;
 
+  ASTContext &ASTCtxt = C.getASTContext();
----------------
Xazax-hun wrote:

Do we need to move this?

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


More information about the cfe-commits mailing list