blob: 14eb408aebb1e16482d8c8fcc440d0d0fae37940 [file] [log] [blame]
Richard Smith0414b852015-02-14 05:32:00 +00001// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%s -fsyntax-only -x c++ /dev/null 2>&1
2//
Richard Smithac425e92015-01-23 00:01:13 +00003// RUN: cp %s %t-duplicate.modulemap
4// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%s -fmodule-map-file=%t-duplicate.modulemap -fsyntax-only -x c++ /dev/null 2>&1 | FileCheck --check-prefix=CHECK-DUPLICATE %s
5
6// PR22299: Ensure we can produce diagnostics for duplicate modules from -fmodule-map-file=.
7//
8// CHECK-DUPLICATE: duplicate.modulemap:[[@LINE+2]]:8: error: redefinition of module 'foo'
9// CHECK-DUPLICATE: diagnostics.modulemap:[[@LINE+1]]:8: note: previously defined here
10module foo {}
Richard Smith0414b852015-02-14 05:32:00 +000011
12//* Check that we accept BCPL comments properly, not just as an extension. */