brintos

brintos / llvm-project-archived public Read only

0
0
Text · 915 B · 9ac1b66 Raw
35 lines · cpp
1// RUN: %clang_cc1 -fmodules -emit-llvm-only %s -verify2 3#pragma clang module build A4module A {}5#pragma clang module contents6#pragma clang module begin A7template<typename T> void f(const T&) { T::error; }8#pragma clang module end9#pragma clang module endbuild10 11#pragma clang module build B12module B {}13#pragma clang module contents14#pragma clang module begin B15template<typename T> void f(const T&) { T::error; }16#pragma clang module end17#pragma clang module endbuild18 19#pragma clang module build C20module C {}21#pragma clang module contents22#pragma clang module begin C23#pragma clang module load B24template<typename T> void f(const T&) { T::error; }25#pragma clang module end26#pragma clang module endbuild27 28#pragma clang module load A29inline void f() {}30void x() { f(); }31 32#pragma clang module import C33// expected-error@* {{cannot be used prior to}}34void y(int n) { f(n); } // expected-note {{instantiation of}}35