[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Frontend / skip-function-bodies.cpp
blobd0593b474bda2124285245c24be8836a709db8e0
1 // Trivial check to ensure skip-function-bodies flag is propagated.
2 //
3 // RUN: %clang_cc1 -verify -skip-function-bodies -pedantic-errors %s
4 // expected-no-diagnostics
6 int f() {
7 // normally this should emit some diags, but we're skipping it!
8 this is garbage;
11 // Make sure we only accept it as a cc1 arg.
12 // RUN: not %clang -skip-function-bodies %s 2>&1 | FileCheck %s
13 // CHECK: clang: error: unknown argument '-skip-function-bodies'; did you mean '-Xclang -skip-function-bodies'?