Skip to content

Commit cd3e71f

Browse files
authored
[NFC][clang][analyzer] Initialize pointer field in StreamOperationEvaluator (#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.
1 parent fc13353 commit cd3e71f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ struct StreamOperationEvaluator {
600600
SValBuilder &SVB;
601601
const ASTContext &ACtx;
602602

603-
SymbolRef StreamSym;
603+
SymbolRef StreamSym = nullptr;
604604
const StreamState *SS = nullptr;
605605
const CallExpr *CE = nullptr;
606606
StreamErrorState NewES;

0 commit comments

Comments
 (0)