<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - engine not emit location check callback where it should"
   href="https://llvm.org/bugs/show_bug.cgi?id=27933">27933</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>engine not emit location check callback where it should
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>kremenek@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>humeafo@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I'm writing a plugin that do location check as in ArrayBoundCheck plugin, but
in some cases the callback is not called:

checkLocation(SVal location, bool isLoad, const Stmt* LoadS, CheckerContext
&checkerContext) const

for the folling test, it's ok
void test(int a, int b) {
  if (a > 10 && b > 10)
  {
      char x[10];
      int z = a+1+b;
      x[z] = 5; // expected-warning{{out-of-bound}}
  }
}

but for the second test no callback is emitted, I think this is obviously a
bug:

void test(int a, int b) {
  if (a > 10 && b > 10)
  {
      char x[10];
      x[a+1+b] = 5; // expected-warning{{out-of-bound}}
  }
}</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>