aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Interpreter/execute-weak.cpp
blob: f469451f5e5e45c9b25cdafac3c143af61e071d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// UNSUPPORTED: system-windows
// RUN: cat %s | clang-repl | FileCheck %s

extern "C" int printf(const char *, ...);
int __attribute__((weak)) bar() { return 42; }
auto r4 = printf("bar() = %d\n", bar());
// CHECK: bar() = 42

int a = 12;
static __typeof(a) b __attribute__((__weakref__("a")));
int c = b;

%quit