1 // RUN: %clang_cc1 -fsyntax-only -Wframe-address -verify %s 2 // RUN: %clang_cc1 -fsyntax-only -Wmost -verify %s 3 a(unsigned x)4void* a(unsigned x) { 5 return __builtin_return_address(0); 6 } 7 b(unsigned x)8void* b(unsigned x) { 9 return __builtin_return_address(1); // expected-warning{{calling '__builtin_return_address' with a nonzero argument is unsafe}} 10 } 11 c(unsigned x)12void* c(unsigned x) { 13 return __builtin_frame_address(0); 14 } 15 d(unsigned x)16void* d(unsigned x) { 17 return __builtin_frame_address(1); // expected-warning{{calling '__builtin_frame_address' with a nonzero argument is unsafe}} 18 } 19 20