================ @@ -2295,6 +2292,23 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { } } + void handleUnsafeOperationInContainer(const Stmt *Operation, + bool IsRelatedToDecl, + ASTContext &Ctx) override { + SourceLocation Loc; + SourceRange Range; + unsigned MsgParam = 0; + if (const auto *CtorExpr = dyn_cast<CXXConstructExpr>(Operation)) { ---------------- haoNoQ wrote:
This should be a hard `cast<>()` because you don't really handle the else-branch so it results in an invalid source location. We can make it dynamic again later if we want. https://github.com/llvm/llvm-project/pull/91777 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits