Revert "[lldb][test] Remove compiler version check and use regex" (#124101)
[llvm-project.git] / clang / test / C / drs / dr158.c
blob45778bda8839388493282beb41d95ed3b395f6c5
1 /* RUN: %clang_cc1 -std=c89 -pedantic -Wno-c11-extensions -verify -emit-llvm -o - %s | FileCheck %s
2 RUN: %clang_cc1 -std=c99 -pedantic -Wno-c11-extensions -verify -emit-llvm -o - %s | FileCheck %s
3 RUN: %clang_cc1 -std=c11 -pedantic -verify -emit-llvm -o - %s | FileCheck %s
4 RUN: %clang_cc1 -std=c17 -pedantic -verify -emit-llvm -o - %s | FileCheck %s
5 RUN: %clang_cc1 -std=c2x -pedantic -verify -emit-llvm -o - %s | FileCheck %s
6 */
8 /* expected-no-diagnostics */
10 /* WG14 DR158: yes
11 * Null pointer conversions
13 void dr158(void) {
14 int Val = (void *)0 == (int *)0;
15 /* CHECK: %[[VAL:.+]] = alloca i32
16 CHECK: store i32 1, ptr %[[VAL]]
19 (void)_Generic((int *)0, int * : 1); /* picks correct association */
20 (void)_Generic((1 ? 0 : (int *)0), int * : 1); /* picks correct association */