16 lines · cpp
1// Trivial check to ensure skip-function-bodies flag is propagated.2//3// RUN: %clang_cc1 -verify -skip-function-bodies %s4 5int f() {6 // normally this should emit some diags, but we're skipping it!7 this is garbage;8}9 10void g() __attribute__((__diagnose_if__(baz))) {}11// expected-error@-1 {{use of undeclared identifier 'baz'}}12 13// Make sure we only accept it as a cc1 arg.14// RUN: not %clang -skip-function-bodies %s 2>&1 | FileCheck %s15// CHECK: clang: error: unknown argument '-skip-function-bodies'; did you mean '-Xclang -skip-function-bodies'?16