| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I%S/Inputs %s -verify |
| 3 |
// RUN: %clang_cc1 -fmodules-cache-path=%t -fimplicit-module-maps -I%S/Inputs %s -verify |
| 4 |
|
| 5 |
#include "cxx-header.h" |
| 6 |
void includeNotAtTopLevel() { // expected-note {{function 'includeNotAtTopLevel' begins here}} |
| 7 |
#include "cxx-header.h" // expected-error {{redundant #include of module 'cxx_library' appears within function 'includeNotAtTopLevel'}} |
| 8 |
} |
| 9 |
|
| 10 |
namespace NS { // expected-note {{begins here}} |
| 11 |
#include "cxx-header.h" // expected-error {{redundant #include of module 'cxx_library' appears within namespace 'NS'}} |
| 12 |
} |