[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Parser / generic-selection-type-extension-pedantic.c
blobe611703151aa6298dfc622c2a6d45696e29360aa
1 // RUN: %clang_cc1 -std=c2x -fsyntax-only -verify -pedantic %s
3 // Test that we get the extension warning when appropriate and that it shows up
4 // in the right location.
5 void test(void) {
6 (void)_Generic(
7 int, // expected-warning {{passing a type argument as the first operand to '_Generic' is a C2y extension}}
8 int : 0);
9 (void)_Generic(
10 12,
11 int : 0);