[clang] 3ad0c6b - [clang-repl][NFC] Fix calling convention mismatch in test
Elizabeth Andrews via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 30 13:27:04 PST 2021
Author: Elizabeth Andrews
Date: 2021-11-30T13:26:10-08:00
New Revision: 3ad0c6b75ea503e0a5bf2faaad9a34da0a020de0
URL: https://github.com/llvm/llvm-project/commit/3ad0c6b75ea503e0a5bf2faaad9a34da0a020de0
DIFF: https://github.com/llvm/llvm-project/commit/3ad0c6b75ea503e0a5bf2faaad9a34da0a020de0.diff
LOG: [clang-repl][NFC] Fix calling convention mismatch in test
Test failed on x86 platforms due to a calling convention mismatch
when member function was called like a free function. In this patch,
member function is marked static to address this.
Added:
Modified:
clang/unittests/Interpreter/InterpreterTest.cpp
Removed:
################################################################################
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index 742aa4976357..280c6d7fdae2 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -221,7 +221,7 @@ TEST(IncrementalProcessing, InstantiateTemplate) {
"class A {};"
"struct B {"
" template<typename T>"
- " int callme(T) { return 42; }"
+ " static int callme(T) { return 42; }"
"};"));
auto &PTU = llvm::cantFail(Interp->Parse("auto _t = &B::callme<A*>;"));
auto PTUDeclRange = PTU.TUPart->decls();
More information about the cfe-commits
mailing list