int main(int argc, char **argv) { int x = 0; if (argc == 2) x = atoi(argv[1]); int y = 2; if (x > 0) { #pragma omp parallel if ((x == 4) && (y == 2)) { int tid, nthreads; tid = omp_get_thread_num(); nthreads = omp_get_num_threads(); static_func(tid); //some_other_func(tid); printf("Hello world from thread %3d of %3d\n", tid, nthreads); //#pragma omp barrier } } return 0; }
// CHECK: main int main() { // CHECK-NEXT: File 0, [[@LINE]]:12 -> [[@LINE+7]]:2 = #0 // CHECK-NEXT: File 0, [[@LINE+1]]:18 -> [[@LINE+1]]:24 = (#0 + #1) for(int i = 0; i < 10; ++i) { // CHECK-NEXT: File 0, [[@LINE]]:26 -> [[@LINE]]:29 = #1 bar(); // CHECK-NEXT: File 0, [[@LINE-1]]:31 -> [[@LINE+1]]:4 = #1 } static_func(); return 0; }
int main(int argc, const char *argv[]) { simple_loops(); conditionals(); early_exits(); jumps(); switches(); big_switch(); boolean_operators(); boolop_loops(); do_fallthrough(); static_func(); return 0; }
static void z2(){ static_func(); // expected-warning {{use of identifier 'static_func' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} func(); // expected-warning {{use of identifier 'func' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}} expected-error {{call to non-static member function without an object argument}} }
int main() { static_func(); }
void test_functions() { file1_sq_func(static_func(42)); }
int notmain_add(void) { return static_func() + main_func(); }
int main() { func(1); static_func(2); }
static void static_job() { LOG<<"Doing static job ..."; static_func(); }