<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/67627>67627</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [C++20] [Modules] We can't diagnose the case that import before module declarations but not in GMF
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:modules
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            ChuanqiXu9
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ChuanqiXu9
      </td>
    </tr>
</table>

<pre>
    Reproducer:

```
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm
// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fmodule-file=A=%t/A.pcm -fsyntax-only -verify

//--- A.cppm
export module A;

//--- B.cppm
import A;
export module B;
```

Actual behavior: no diagnostic emitted.
Expected behavior: an error diagnostic to tell we can't import A here.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU81unDwUfRqzuTJi7AHCggWEb75VuohUtbvK2JfBrcHUNmnm7St-ppO0000lZOD6nHP_hff6PCKWJK0JY4_9LMbv-vNcEMZI2kRiDr115c0etVZdymecnFWzREd4RZKGJNczS_Zn-2Unwk7w_PED4RW4AajrgLA03LsevintgE5_BfjJ6EA7bXCB-D9w9ziEpdKI8fxFygNQHxThjSSsJqxmyabATlUsp2kAioMOdLBqNkj1GNB1QiJQe8NNcvhnL_Xupds9LIkQ3lSEN2_1gXb-MgbxSu1oLkBf0Onu8q7Iq29KKWyBb1Z8nawLsIlDRXh9n1O_4ehh5dzA70Xqm8hvfV3PSoZZGGixFy_aLqMAowWlxXm0PmgJSz0DqniD__c6oQyo3hHECOicdW9pwUJAY-AHghQjYXmAa6DQo8M4UiVXBS9EhOUhK9KHLMt4FvXlgXHVskIc84TnR44py3M8HDuep1J1SRLpkiWMJwV7SFjC0yxWXduJrOgETw8PUhzJMcFBaBMb8zLE1p0j7f2MZZZnLI-MaNH4fVnWjhNebcXy-8a4cmHSdj57ckyM9sHftIIOZt21x-twkLQBktZPu0bawKdb1ntNEEK_GNcP8asYLXbW4bVXCqURTgRtRw_tHGC0AfQI_z-dotmZsg9h8su2roNw1qGf21jagbDTEt7-opOzX1Euw7jm7Qk7ran_DAAA____5jwZ">