[PATCH] D158488: [NFC] Initialize member pointers to nullptr.
Sindhu Chittireddy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 21 23:43:45 PDT 2023
schittir created this revision.
schittir added reviewers: aaron.ballman, tahonermann.
Herald added a subscriber: hiraditya.
Herald added a project: All.
schittir requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, wangpc.
Herald added projects: clang, LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158488
Files:
clang/include/clang/AST/Stmt.h
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Index: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
===================================================================
--- llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -931,7 +931,7 @@
(void)OutlinedFnID;
// Return value of the runtime offloading call.
- Value *Return;
+ Value *Return = nullptr;
// Arguments for the target kernel.
SmallVector<Value *> ArgsVector;
Index: clang/include/clang/AST/Stmt.h
===================================================================
--- clang/include/clang/AST/Stmt.h
+++ clang/include/clang/AST/Stmt.h
@@ -2603,7 +2603,8 @@
friend class ASTStmtReader;
enum { INIT, CONDVAR, COND, INC, BODY, END_EXPR };
- Stmt* SubExprs[END_EXPR]; // SubExprs[INIT] is an expression or declstmt.
+ Stmt *SubExprs[END_EXPR] = {
+ nullptr}; // SubExprs[INIT] is an expression or declstmt.
SourceLocation LParenLoc, RParenLoc;
public:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158488.552230.patch
Type: text/x-patch
Size: 938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230822/7242a021/attachment.bin>
More information about the llvm-commits
mailing list