llvm-project/clang/test/Sema/no-warn-void-ptr-uneval.c
Nick Desaulniers 2dbfd06f2a [Clang] fix -Wvoid-ptr-dereference for gnu89
Follow up to D134702; it looks like we were still warning for gnu89
mode.

Link: https://reviews.llvm.org/D134702
Link: https://github.com/ClangBuiltLinux/linux/issues/1720#issuecomment-1265738778

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D135090
2022-10-04 13:01:01 -07:00

10 lines
245 B
C

// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -verify %s
// RUN: %clang_cc1 -fsyntax-only -Wno-unused-value -verify -std=gnu89 %s
// expected-no-diagnostics
void foo(void *vp) {
sizeof(*vp);
sizeof(*(vp));
void inner(typeof(*vp));
}