[clang] f03b876 - Reland "Reland "[NFC] Add a missing test for for clang-repl""

Jun Zhang via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 5 03:24:38 PDT 2022


Author: Jun Zhang
Date: 2022-07-05T18:23:26+08:00
New Revision: f03b876e7e9567ee71ee66f8f194918aac37d5fa

URL: https://github.com/llvm/llvm-project/commit/f03b876e7e9567ee71ee66f8f194918aac37d5fa
DIFF: https://github.com/llvm/llvm-project/commit/f03b876e7e9567ee71ee66f8f194918aac37d5fa.diff

LOG: Reland "Reland "[NFC] Add a missing test for for clang-repl""

This reverts commit 6956840b5c0029d7f8e043b3c77bb1ffc230e4d5.
Try to use `XFAIL: windows-msvc || ps4` to disable all unsupported targets.

Signed-off-by: Jun Zhang <jun at junz.org>

Added: 
    

Modified: 
    clang/test/Interpreter/execute.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/Interpreter/execute.cpp b/clang/test/Interpreter/execute.cpp
index f5c70c21ac507..734127ea8eef6 100644
--- a/clang/test/Interpreter/execute.cpp
+++ b/clang/test/Interpreter/execute.cpp
@@ -3,6 +3,7 @@
 // RUN:            'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s
 // REQUIRES: host-supports-jit
 // UNSUPPORTED: system-aix
+// XFAIL: windows-msvc || ps4
 // CHECK-DRIVER: i = 10
 // RUN: cat %s | clang-repl | FileCheck %s
 extern "C" int printf(const char *, ...);
@@ -18,4 +19,8 @@ auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast<unsigned long long
 inline int foo() { return 42; }
 int r3 = foo();
 
+int __attribute__((weak)) bar() { return 1; }
+auto r4 = printf("bar() = %d\n", bar());
+// CHECK-NEXT: bar() = 1
+
 %quit


        


More information about the cfe-commits mailing list