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

    <tr>
        <th>Summary</th>
        <td>
            `clang-scan-deps`: macro is not handled correctly 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    ```cpp
#define STD import std;
STD;

int main() {
    std::cout << 1 <<std::endl;
}
```

This file will compile, but `clang-scan-deps` gives:
```json
{
  "revision": 0,
  "rules": [
    {
 "primary-output": "test"
    }
  ],
  "version": 1
}
```

The command is `clang-scan-deps.exe -format=p1689 -- clang++.exe -fansi-escape-codes -fcolor-diagnostics -c -march=native -std=c++20 -Wall main.cpp -o test`

But if I change to
```cpp
#define STD std;
import STD;

int main() {
 std::cout << 1 <<std::endl;
}
```
Now it gives the correct output.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVMGK2zAQ_Rr5MigoUhzHBx-SmECh9NBd6FmWJrYWWTKSnO3-fbHjZLNlCy0UQjxmZt57M3qyjNG0DrEi-YHkdSbH1PlQfTeqk0F_HT3LGq_fKrJl158aBsJqwvaEC41n4xCenmsw_eBDgpg0EYdrwdNzfY-v_8Yl6KVxhO8IL4EUSxYArp17IvbKjwmIOBJxhPUS3JPotH0HLeoluIl7JHvuTISzsQivxlpQvh-MRcKP0EwEW6asdC2NSjqqcYhky6A1F4wT00fYl-jdjfIumXAe8GKi8Y5wTsQeGOHHx-xoMS6pabv3Ud9BCOdDML0Mb9SPaRjTrZzzhHF-e-iq7-B5_ZHqguFBx_rv1oPTTnrpNJj4yT5W-BOBnn3oZSKiHtbbXQmUwlxG-IHww1IiXTQUo5IDUuU1RqBn5a0PVBvZOh-TURGoAtrLoDoiaieTuSDQ-VxrdUXjDOgPae1skZUaBqAe5jV8VH4YE5gzfAHVSdciJP_bmH-w6KM3F7v-g0X_oz-_-Vcw6Wo2SPM5hIAqwdUDq0xXQpeilBlW62Kd7zZCFCzrqnOJ-ZkXGxRKyaIpm40sNea6ELLUO1VkpuKMb1i-3rKClYKtctTFupGIutg1rNmRDcNeGruy9tKvfGgzE-OIVclFXmRWNmjj_Cng3OErzMnJVXmdhWrqoc3YRrJh1sQU31GSSRarTy_V5MhequAnmzmfoJNOW9S3qe0bZGOwVZfSMN89fiL81JrUjc1K-Z7w00SzPOgQ_AuqRPhpFhcJP83ifwUAAP__V09dnQ">