1 //===-- main.cpp ------------------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include <stdio.h> 10 #include <stdint.h> 11 12 extern "C" 13 { 14 int foo(); 15 }; 16 17 int foo() 18 { 19 puts("foo"); 20 return 2; 21 } 22 23 int main (int argc, char const *argv[], char const *envp[]) 24 { 25 foo(); 26 return 0; //% self.expect("expression -- foo()", substrs = ['2']) 27 } 28 29