Skip to content

Commit 7e8bb8c

Browse files
authored
Revert "[clang][Interp] Improve "in call to" call argument printing (#102735)"
This reverts commit 979abf1.
1 parent 3c3df1b commit 7e8bb8c

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

clang/lib/AST/Interp/InterpFrame.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,8 @@ void InterpFrame::popArgs() {
102102
}
103103

104104
template <typename T>
105-
static void print(llvm::raw_ostream &OS, const T &V, ASTContext &ASTCtx,
106-
QualType Ty) {
107-
V.toAPValue(ASTCtx).printPretty(OS, ASTCtx, Ty);
105+
static void print(llvm::raw_ostream &OS, const T &V, ASTContext &, QualType) {
106+
OS << V;
108107
}
109108

110109
template <>

clang/test/AST/Interp/constexpr-frame-describe.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,3 @@ static_assert(bar.fail2<int*, 42>()); // both-error {{constant expression}} \
8181
static_assert(bar.fail3(3, 4UL, bar, &bar)); // both-error {{constant expression}} \
8282
// expected-note {{in call to 'bar.fail3<int, unsigned long, Bar<int>, const Bar<int> *>(3, 4, &bar, &bar)'}} \
8383
// ref-note {{in call to 'bar.fail3<int, unsigned long, Bar<int>, const Bar<int> *>(3, 4, {}, &bar)'}}
84-
85-
86-
87-
/// FIXME: Bound member pointer printing doesn't work right, see the last parameter to MemPtr().
88-
struct MemPtrTest {
89-
int n;
90-
void f();
91-
};
92-
MemPtrTest mpt; // both-note {{here}}
93-
constexpr int MemPtr(int (MemPtrTest::*a), void (MemPtrTest::*b)(), int &c) {
94-
return c; // both-note {{read of non-constexpr variable 'mpt'}}
95-
}
96-
static_assert(MemPtr(&MemPtrTest::n, &MemPtrTest::f, mpt.*&MemPtrTest::n), ""); // both-error {{constant expression}} \
97-
// expected-note {{in call to 'MemPtr(&MemPtrTest::n, &MemPtrTest::f, mpt)'}} \
98-
// ref-note {{in call to 'MemPtr(&MemPtrTest::n, &MemPtrTest::f, mpt.n)'}}

0 commit comments

Comments
 (0)