<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/75077>75077</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
-x assembler-with-cpp reports error location on preprocessed assembly file
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang,
clang:diagnostics
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jasonliudev
</td>
</tr>
</table>
<pre>
When running clang 17 like this:
clang -x assembler-with-cpp redefined.s
```
foo:
nop
bar: nop
foo: nop
nop
```
It seems I would get error lines from preprocessed source instead of original source (notice the line number is 11 instead of 4):
```
/tmp/redefined-79727f.s:11:1: error: symbol 'foo' is already defined
foo: nop
^
```
And if running with clang 11, I would get the expected error line:
```
redefined.s:4:1: error: invalid symbol redefinition
foo: nop
^
```
Is this behavior change intended?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU81u4yAQfhp8GSUyEIf44EO2XUt9gj1jGNt0MViA0-btVzg_bbrqHtay-JkZPvi-mZExmsEhNqT6QarnQi5p9KF5ldE7axaNp6Lz-tz8GtFBWJwzbgBlpRuACrDmN0IaTST8SMpnUh4vrs07yBhx6iyGzZtJ40bNMwTU2BuHehsvwWRfXv9123t_x4Hr5_x8MXQyEH58MF3iH0wfqy_Yl_ElQUScIrzAm1-shgETYAg-gDUOI_TBTzAHnINXGCNqiH4JCsG4mFBq8D34YAbjpL25CDs4n4zKSuCKA26ZOgxgIlD6-eiOsPpO8esLWZummbD2LtNG1IKJfpvVpTQPme763LyI56nzFggTWQgm8nXSBpT6DFeEB50-pKl-_kOjo9Ng-nuuc_ZuCaeEPT1Ilwnj-4wqof6k43cUPxcAP-7-YmTcSVqjb8yu4SYZ7_6HyUtcaxM6HOXJ-ABqlG7IuUzoNGrC20I3XNe8lgU2VJSM0z2r9sXYMIldzQWXnTromqoD7ilyISjtSyGULEzDcjijlAou-H6ruD70dS9QlLtKH2qyK3GSxm6tPU1bH4bCxLhgI6pSiMLKDm1cu46xVV7CGGFP9x0_aiMH52MyKmZf9VyEJmNtumWIZFdaE1P8QE8mWWy-67zZhxRvKfJKZk3Bu8dav548Q28sFkuwzZjSvDY3awlrB5PGpdsqPxHW5ouv02YO_hVVIqxdOUbC2pXmnwAAAP__jpBZHQ">