<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Erroneous clang -Warray-bounds warning when preprocessing its own output (Triggered by ccache)"
   href="https://llvm.org/bugs/show_bug.cgi?id=26178">bug 26178</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>dblaikie@gmail.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>INVALID
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Erroneous clang -Warray-bounds warning when preprocessing its own output (Triggered by ccache)"
   href="https://llvm.org/bugs/show_bug.cgi?id=26178#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED INVALID - Erroneous clang -Warray-bounds warning when preprocessing its own output (Triggered by ccache)"
   href="https://llvm.org/bugs/show_bug.cgi?id=26178">bug 26178</a>
              from <span class="vcard"><a class="email" href="mailto:dblaikie@gmail.com" title="David Blaikie <dblaikie@gmail.com>"> <span class="fn">David Blaikie</span></a>
</span></b>
        <pre>I take it the bug you're reporting is that clang produces this warning when
running over the preprocessed output, but does not produce the warning when
running over the original code?

That is not itself a bug - Clang's diagnostic system detects the use of macros
and uses them as hints to improve warning quality. Clang does not intend to
produce the same output on preprocessed and non-preprocessed inputs.

For tools like ccache, you could consider using things like Clang's
-frewrite-includes feature which handles the #includes but leaves macros in
tact so that Clang's warning infrastructure can still see them. (include based
warning behavior - such as suppressing certain warnings in system headers, may
still work with -frewrite-includes output, I think (but don't quote me on
that), since the file still has line directives to indicate which bits of code
came from which header)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>