brintos

brintos / llvm-project-archived public Read only

0
0
Text · 873 B · 10e1914 Raw
29 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: echo 'namespace N { enum E { A }; }' > %t/a.h4// RUN: echo '#include "a.h"' > %t/b.h5// RUN: touch %t/x.h6// RUN: echo 'module B { module b { header "b.h" } module x { header "x.h" } }' > %t/b.modulemap7// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -fmodule-map-file=%t/b.modulemap %s -I%t -verify -fmodules-local-submodule-visibility8// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -fmodule-map-file=%t/b.modulemap %s -I%t -verify -fmodules-local-submodule-visibility -DMERGE_LATE9 10#ifndef MERGE_LATE11// expected-no-diagnostics12#include "a.h"13#endif14 15#include "x.h"16 17#ifdef MERGE_LATE18namespace N {19  enum { A } a; // expected-note {{candidate}}20  // expected-note@a.h:1 {{candidate}} (from module B.b)21}22#include "a.h"23#endif24 25N::E e = N::A;26#ifdef MERGE_LATE27// expected-error@-2 {{ambiguous}}28#endif29