[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / redefinition-same-header.c
blobb2e3730d9c0baac3b3833519f3407d2a6e1b8c7e
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: echo 'int yyy = 42;' > %t/a.h
4 // RUN: %clang_cc1 -fsyntax-only %s -I%t -verify
6 // expected-error@a.h:1 {{redefinition of 'yyy'}}
7 // expected-note@a.h:1 {{unguarded header; consider using #ifdef guards or #pragma once}}
8 // expected-note-re@redefinition-same-header.c:11 {{'{{.*}}a.h' included multiple times, additional include site here}}
9 // expected-note-re@redefinition-same-header.c:12 {{'{{.*}}a.h' included multiple times, additional include site here}}
11 #include "a.h"
12 #include "a.h"
14 int foo(void) { return yyy; }