Mercurial > hg > CbC > CbC_llvm
annotate clang/test/Sema/nested-redef.c @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 1d019706d866 |
children |
rev | line source |
---|---|
150 | 1 // RUN: %clang_cc1 -fsyntax-only -verify %s |
2 struct X { // expected-note{{previous definition is here}} | |
3 struct X { } x; // expected-error{{nested redefinition of 'X'}} | |
4 }; | |
5 | |
6 struct Y { }; | |
7 void f(void) { | |
8 struct Y { }; // okay: this is a different Y | |
9 } | |
10 | |
11 struct T; | |
12 struct Z { | |
13 struct T { int x; } t; | |
14 struct U { int x; } u; | |
15 }; | |
16 | |
17 void f2(void) { | |
18 struct T t; | |
19 struct U u; | |
20 } | |
21 | |
22 |