This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd472c55fa28a: [clang][Interp] Fix double-printing 
InterpFrame::describe() (authored by tbaeder).

Changed prior to commit:
  https://reviews.llvm.org/D141831?vs=489469&id=510010#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141831/new/

https://reviews.llvm.org/D141831

Files:
  clang/lib/AST/Interp/InterpFrame.cpp
  clang/test/AST/Interp/constexpr-nqueens.cpp


Index: clang/test/AST/Interp/constexpr-nqueens.cpp
===================================================================
--- clang/test/AST/Interp/constexpr-nqueens.cpp
+++ clang/test/AST/Interp/constexpr-nqueens.cpp
@@ -6,9 +6,6 @@
 /// Board constructors.
 /// This tests that InterpFrame::describe().
 
-// FIXME: With the new interpreter, most of the described frames are
-//  currently broken in one way or another.
-
 typedef unsigned long uint64_t;
 
 struct Board {
Index: clang/lib/AST/Interp/InterpFrame.cpp
===================================================================
--- clang/lib/AST/Interp/InterpFrame.cpp
+++ clang/lib/AST/Interp/InterpFrame.cpp
@@ -126,6 +126,9 @@
     F = F.isArrayElement() ? F.getArray().expand() : F.getBase();
   }
 
+  // Drop the first pointer since we print it unconditionally anyway.
+  Levels.erase(Levels.begin());
+
   printDesc(P.getDeclDesc());
   for (const auto &It : Levels) {
     if (It.inArray()) {


Index: clang/test/AST/Interp/constexpr-nqueens.cpp
===================================================================
--- clang/test/AST/Interp/constexpr-nqueens.cpp
+++ clang/test/AST/Interp/constexpr-nqueens.cpp
@@ -6,9 +6,6 @@
 /// Board constructors.
 /// This tests that InterpFrame::describe().
 
-// FIXME: With the new interpreter, most of the described frames are
-//  currently broken in one way or another.
-
 typedef unsigned long uint64_t;
 
 struct Board {
Index: clang/lib/AST/Interp/InterpFrame.cpp
===================================================================
--- clang/lib/AST/Interp/InterpFrame.cpp
+++ clang/lib/AST/Interp/InterpFrame.cpp
@@ -126,6 +126,9 @@
     F = F.isArrayElement() ? F.getArray().expand() : F.getBase();
   }
 
+  // Drop the first pointer since we print it unconditionally anyway.
+  Levels.erase(Levels.begin());
+
   printDesc(P.getDeclDesc());
   for (const auto &It : Levels) {
     if (It.inArray()) {
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to