[clang] [SystemZ][z/OS] Add text flag when parsing json (PR #211805)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 24 07:26:09 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-ssaf
Author: Abhina Sree (abhina-sree)
<details>
<summary>Changes</summary>
This patch adds the text flag when we are opening json files to parse.
This fixes the following two lit failures on z/OS
```
FAIL: Clang :: Analysis/Scalable/TypeConstrainedPointers/type-constrained-pointers.cpp
FAIL: Clang :: Analysis/Scalable/TypeConstrainedPointers/wpa-result-serialization.test
```
---
Full diff: https://github.com/llvm/llvm-project/pull/211805.diff
1 Files Affected:
- (modified) clang/lib/ScalableStaticAnalysis/Core/Serialization/JSONFormat/JSONFormatImpl.cpp (+1-1)
``````````diff
diff --git a/clang/lib/ScalableStaticAnalysis/Core/Serialization/JSONFormat/JSONFormatImpl.cpp b/clang/lib/ScalableStaticAnalysis/Core/Serialization/JSONFormat/JSONFormatImpl.cpp
index f935761b3c476..b19849233f0f8 100644
--- a/clang/lib/ScalableStaticAnalysis/Core/Serialization/JSONFormat/JSONFormatImpl.cpp
+++ b/clang/lib/ScalableStaticAnalysis/Core/Serialization/JSONFormat/JSONFormatImpl.cpp
@@ -55,7 +55,7 @@ llvm::Expected<Value> readJSON(llvm::StringRef Path) {
.build();
}
- auto BufferOrError = llvm::MemoryBuffer::getFile(Path);
+ auto BufferOrError = llvm::MemoryBuffer::getFile(Path, /*IsText=*/true);
if (!BufferOrError) {
const std::error_code EC = BufferOrError.getError();
return ErrorBuilder::create(EC, ErrorMessages::FailedToReadFile, Path,
``````````
</details>
https://github.com/llvm/llvm-project/pull/211805
More information about the cfe-commits
mailing list