xref: /llvm-project/clang/test/Interpreter/plugins.cpp (revision a8f2e24e48fddb3707301c9d24cc50ab778d4fda)
1 // RUN: cat %s | clang-repl -Xcc -Xclang -Xcc -load -Xcc -Xclang \
2 // RUN:            -Xcc %llvmshlibdir/PrintFunctionNames%pluginext -Xcc -Xclang\
3 // RUN:            -Xcc -add-plugin -Xcc -Xclang -Xcc print-fns 2>&1 | FileCheck %s
4 // REQUIRES: plugins, examples
5 
6 int i = 10;
7 extern "C" int printf(const char*,...);
8 auto r1 = printf("i = %d\n", i);
9 %quit
10 
11 // CHECK: top-level-decl: "i"
12 // CHECK-NEXT: top-level-decl: "r1"
13 // CHECK-NEXT: i = 10
14