| 1 |
// FIXME: The standalone module still seems to cause clang to want to test for |
| 2 |
// the existence of a 'foo' directory: |
| 3 |
// RUN: rm -rf %t |
| 4 |
// RUN: mkdir %t |
| 5 |
// RUN: cp %s %t |
| 6 |
// RUN: rm -rf %t/foo |
| 7 |
// RUN: mkdir %t/foo |
| 8 |
// RUN: cd %t |
| 9 |
// RUN: not %clang_cc1 -fmodules -fsyntax-only %s 2>&1 | FileCheck %s |
| 10 |
|
| 11 |
// CHECK: error: no matching function for call to 'foo' |
| 12 |
// CHECK: note: candidate function not viable: requires 0 arguments, but 1 was provided |
| 13 |
|
| 14 |
// FIXME: This should use -verify, but it seems it doesn't hook up the |
| 15 |
// SourceManager correctly or something, and the foo.h note gets attributed to |
| 16 |
// the synthetic module translation unit "foo.map Line 2:...". |
| 17 |
// %clang_cc1 -fmodules -verify %s |
| 18 |
|
| 19 |
#pragma clang module build foo |
| 20 |
module foo { |
| 21 |
umbrella "foo" |
| 22 |
module * { |
| 23 |
export * |
| 24 |
} |
| 25 |
} |
| 26 |
#pragma clang module contents |
| 27 |
#pragma clang module begin foo.foo |
| 28 |
# 1 "foo.h" 1 |
| 29 |
#ifndef FOO_FOO_H |
| 30 |
void foo(); |
| 31 |
#endif |
| 32 |
#pragma clang module end |
| 33 |
#pragma clang module endbuild |
| 34 |
#pragma clang module import foo.foo |
| 35 |
// [email protected]:2 {{candidate function not viable: requires 0 arguments, but 1 was provided}} |
| 36 |
int main() { |
| 37 |
foo(1); // expected-error {{no matching function for call to 'foo'}} |
| 38 |
} |