• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%S/Inputs/diagnostics-aux.modulemap -fmodule-map-file=%s -fsyntax-only -x c++ /dev/null 2>&1 | FileCheck %s
2
3// CHECK: In file included from {{.*}}diagnostics-aux.modulemap:3:
4// CHECK: diagnostics-aux-2.modulemap:2:3: error: expected
5
6// PR22299: Ensure we can produce diagnostics for duplicate modules from -fmodule-map-file=.
7//
8// CHECK: diagnostics.modulemap:[[@LINE+2]]:8: error: redefinition of module 'foo'
9// CHECK: diagnostics-aux.modulemap:1:8: note: previously defined here
10module foo {}
11
12//* Check that we accept BCPL comments properly, not just as an extension. */
13
14module bad_use {
15  // CHECK: diagnostics.modulemap:[[@LINE+1]]:22: error: use declarations are only allowed in top-level modules
16  module submodule { use foo }
17}
18