<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56159>56159</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-Wreserved-macro-identifier does not catch command line macros
</td>
</tr>
<tr>
<th>Labels</th>
<td>
good first issue,
clang:frontend,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
AaronBallman
</td>
</tr>
</table>
<pre>
If you define or undefine a reserved macro name within the TU, we properly diagnose it. But if you define or undefine a macro using the command line, we do not issue any diagnostics. I think the command line should be treated the same as within a TU.
Live example: https://godbolt.org/z/3edqooWr9
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9UU1v2zAM_TX2hYhhy3ESH3RIWgwosOOGnmmJtrXKUibJ6bJfP9pN9tECAyyLFKnH9546r6_yqYern0FTbxyBDzC7W4wQKFK4kIYJVfDgcCJ4NWk0DtJI8OVrJh7gleAc_JmCvYI2ODgfCUwq4DQnMP9BfwOdo3HDCqf8NKHTYLl8A9Y81DNKjDPfcL8HJKNiAU-wUHn5cBni6GeroSNIgTCxgKUlLvQx3hUg8y-y8jErj2__z-ZCQD9wOlvK6iOMKZ0jB5n4xN_gdedtKnwYOPvJqyb93fvn0OZa1rqtW8yTSZbk5vlu3GbVuDGaXDK9ocCKKK6aFCY1_kt7bY75HKx8N5sZz13BzZxYe7lvGzb-G6nE6WpR5KDZVU2bj7LSO9FsK637vq3qaiu2WpWIhwOh7is65BY7slFmzSkTYvBeQ29CvJnNR8sT8KYsuoGZ9MG7RE5_rPz1JkuxecyNFKUQ5U6Iqmzaui6aHvdbtVdVWZf7XdNl25ImNLZYVCyW5kGugrp5iFy0Jqb4p4gxmsERrWQZH-c0-iCPyJxOaC1bmK-05ar-F7sz9Ho">