brintos

brintos / llvm-project-archived public Read only

0
0
Text · 584 B · 4660596 Raw
24 lines · c
1// RUN: %clang_cc1 -fsyntax-only -std=c2y -verify -ffreestanding %s2 3/* WG14 N3469: Clang 214 * The Big Array Size Survey5 *6 * This renames _Lengthof to _Countof and introduces the stdcountof.h header.7 */8 9void test() {10  (void)_Countof(int[12]); // Ok11  (void)_Lengthof(int[12]); // expected-error {{use of undeclared identifier '_Lengthof'}} \12                               expected-error {{expected expression}}13}14 15#ifdef countof16#error "why is countof defined as a macro?"17#endif18 19#include <stdcountof.h>20 21#ifndef countof22#error "why is countof not defined as a macro?"23#endif24