Mercurial > hg > CbC > CbC_llvm
view clang/test/Sema/nested-redef.c @ 222:81f6424ef0e3 llvm-original
LLVM original branch
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 18 Jul 2021 22:10:01 +0900 |
parents | 1d019706d866 |
children |
line wrap: on
line source
// RUN: %clang_cc1 -fsyntax-only -verify %s struct X { // expected-note{{previous definition is here}} struct X { } x; // expected-error{{nested redefinition of 'X'}} }; struct Y { }; void f(void) { struct Y { }; // okay: this is a different Y } struct T; struct Z { struct T { int x; } t; struct U { int x; } u; }; void f2(void) { struct T t; struct U u; }