https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/89837
Add an initializer for StreamSym, which is a pointer. The pointers in this class are set in the Init function, but all should be initialized in the constructor to avoid confusion and static verifier hits. >From 000ab376b0d853a417c5727b0e87edc11d7e66a2 Mon Sep 17 00:00:00 2001 From: Mike Rice <michael.p.r...@intel.com> Date: Tue, 23 Apr 2024 14:27:56 -0700 Subject: [PATCH] [NFC][analyzer] Initialize pointer field in StreamOperationEvaluator Add an initializer for StreamSym, which is a pointer. The pointers in this class are set in the Init function, but all should be initialized in the constructor to avoid confusion and static verifier hits. --- clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp index bd495cd0f9710d..a0aa2316a7b45d 100644 --- a/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp @@ -600,7 +600,7 @@ struct StreamOperationEvaluator { SValBuilder &SVB; const ASTContext &ACtx; - SymbolRef StreamSym; + SymbolRef StreamSym = nullptr; const StreamState *SS = nullptr; const CallExpr *CE = nullptr; StreamErrorState NewES; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits