llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Timm Baeder (tbaederr)

<details>
<summary>Changes</summary>

Can't call `getIndex()` on those.

---
Full diff: https://github.com/llvm/llvm-project/pull/181149.diff


1 Files Affected:

- (modified) clang/lib/AST/ByteCode/Pointer.h (+6-2) 


``````````diff
diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h
index 2515b2fe56ab9..5c3f98ad01eb4 100644
--- a/clang/lib/AST/ByteCode/Pointer.h
+++ b/clang/lib/AST/ByteCode/Pointer.h
@@ -869,8 +869,12 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream 
&OS, const Pointer &P) {
   OS << ' ';
   if (const Descriptor *D = P.getFieldDesc())
     D->dump(OS);
-  if (P.isArrayElement())
-    OS << " index " << P.getIndex();
+  if (P.isArrayElement()) {
+    if (P.isOnePastEnd())
+      OS << " one-past-the-end";
+    else
+      OS << " index " << P.getIndex();
+  }
   return OS;
 }
 

``````````

</details>


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

Reply via email to