[llvm] [OpenMP][Clang][NFC] Initializer all of ScanInfo member variables (PR #158130)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 11:28:59 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-openmp
Author: Shafik Yaghmour (shafik)
<details>
<summary>Changes</summary>
Static analysis flagged that we were not initializing all of the members of ScanInfo, fix this so that they are all initialized.
---
Full diff: https://github.com/llvm/llvm-project/pull/158130.diff
1 Files Affected:
- (modified) llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h (+2-2)
``````````diff
diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
index 1050e3d8b08dd..7c36c0ad898f4 100644
--- a/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
+++ b/llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
@@ -3986,11 +3986,11 @@ class ScanInfo {
/// Keeps track of value of iteration variable for input/scan loop to be
/// used for Scan directive lowering
- llvm::Value *IV;
+ llvm::Value *IV = nullptr;
/// Stores the span of canonical loop being lowered to be used for temporary
/// buffer allocation or Finalization.
- llvm::Value *Span;
+ llvm::Value *Span = nullptr;
ScanInfo() {
ScanBuffPtrs = new llvm::SmallDenseMap<llvm::Value *, llvm::Value *>();
``````````
</details>
https://github.com/llvm/llvm-project/pull/158130
More information about the llvm-commits
mailing list