https://github.com/abhina-sree created 
https://github.com/llvm/llvm-project/pull/211805

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
```

>From fd0e9d9f1e98dfcebe94134c58fc3c911ca4c7fb Mon Sep 17 00:00:00 2001
From: Abhina Sreeskantharajan <[email protected]>
Date: Fri, 24 Jul 2026 10:23:37 -0400
Subject: [PATCH] add text flag when parsing json

---
 .../Core/Serialization/JSONFormat/JSONFormatImpl.cpp            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to