[PATCH] D150492: [AST] Initialized local counter
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 12 15:21:32 PDT 2023
vitalybuka created this revision.
Herald added a project: All.
vitalybuka requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
I assume it's optional and ReadAST does not have to set the
counter on success.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150492
Files:
clang/lib/Frontend/ASTUnit.cpp
Index: clang/lib/Frontend/ASTUnit.cpp
===================================================================
--- clang/lib/Frontend/ASTUnit.cpp
+++ clang/lib/Frontend/ASTUnit.cpp
@@ -822,7 +822,7 @@
// Gather Info for preprocessor construction later on.
HeaderSearch &HeaderInfo = *AST->HeaderInfo;
- unsigned Counter;
+ unsigned Counter = 0;
AST->PP = std::make_shared<Preprocessor>(
AST->PPOpts, AST->getDiagnostics(), *AST->LangOpts,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150492.521819.patch
Type: text/x-patch
Size: 456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230512/699aa793/attachment-0001.bin>
More information about the cfe-commits
mailing list