[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / reinterpret-fn-obj-pedantic.cpp
blob9cdf5a1e6a4a5606611a4245062acc0bd6c0c2c0
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 -pedantic %s
3 void fnptrs()
5 typedef void (*fnptr)();
6 fnptr fp = 0;
7 void *vp = reinterpret_cast<void*>(fp); // expected-warning {{cast between pointer-to-function and pointer-to-object is an extension}}
8 (void)reinterpret_cast<fnptr>(vp); // expected-warning {{cast between pointer-to-function and pointer-to-object is an extension}}