-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Revert "[clang][Interp] Improve "in call to" call argument printing" #102785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) ChangesReverts llvm/llvm-project#102735 Breaks https://lab.llvm.org/buildbot/#/builders/52/builds/1496 Full diff: https://github.com/llvm/llvm-project/pull/102785.diff 2 Files Affected:
diff --git a/clang/lib/AST/Interp/InterpFrame.cpp b/clang/lib/AST/Interp/InterpFrame.cpp
index 4530f28d694e8..27108f957305f 100644
--- a/clang/lib/AST/Interp/InterpFrame.cpp
+++ b/clang/lib/AST/Interp/InterpFrame.cpp
@@ -102,9 +102,8 @@ void InterpFrame::popArgs() {
}
template <typename T>
-static void print(llvm::raw_ostream &OS, const T &V, ASTContext &ASTCtx,
- QualType Ty) {
- V.toAPValue(ASTCtx).printPretty(OS, ASTCtx, Ty);
+static void print(llvm::raw_ostream &OS, const T &V, ASTContext &, QualType) {
+ OS << V;
}
template <>
diff --git a/clang/test/AST/Interp/constexpr-frame-describe.cpp b/clang/test/AST/Interp/constexpr-frame-describe.cpp
index a0ae046fc0178..e039fd61ae981 100644
--- a/clang/test/AST/Interp/constexpr-frame-describe.cpp
+++ b/clang/test/AST/Interp/constexpr-frame-describe.cpp
@@ -81,18 +81,3 @@ static_assert(bar.fail2<int*, 42>()); // both-error {{constant expression}} \
static_assert(bar.fail3(3, 4UL, bar, &bar)); // both-error {{constant expression}} \
// expected-note {{in call to 'bar.fail3<int, unsigned long, Bar<int>, const Bar<int> *>(3, 4, &bar, &bar)'}} \
// ref-note {{in call to 'bar.fail3<int, unsigned long, Bar<int>, const Bar<int> *>(3, 4, {}, &bar)'}}
-
-
-
-/// FIXME: Bound member pointer printing doesn't work right, see the last parameter to MemPtr().
-struct MemPtrTest {
- int n;
- void f();
-};
-MemPtrTest mpt; // both-note {{here}}
-constexpr int MemPtr(int (MemPtrTest::*a), void (MemPtrTest::*b)(), int &c) {
- return c; // both-note {{read of non-constexpr variable 'mpt'}}
-}
-static_assert(MemPtr(&MemPtrTest::n, &MemPtrTest::f, mpt.*&MemPtrTest::n), ""); // both-error {{constant expression}} \
- // expected-note {{in call to 'MemPtr(&MemPtrTest::n, &MemPtrTest::f, mpt)'}} \
- // ref-note {{in call to 'MemPtr(&MemPtrTest::n, &MemPtrTest::f, mpt.n)'}}
|
That test doesn't even use the new constant interpreter....? |
Yes, that looks strange, but it fixes the bot https://lab.llvm.org/buildbot/#/builders/52 |
Hmm, If I haven't missing something, I have tried to reproduce this issue on Windows(MSVC & MinGW) and Ubuntu, but I can't reproduce this issue.
|
Reverts #102735
Breaks https://lab.llvm.org/buildbot/#/builders/52/builds/1496