<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - [C++4OpenCL] Missing OpenCL specific diagnostics in templates"
   href="https://bugs.llvm.org/show_bug.cgi?id=48887">48887</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[C++4OpenCL] Missing OpenCL specific diagnostics in templates
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>OpenCL
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>anastasia.stulova@arm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>anastasia.stulova@arm.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang fails to diagnose invalid cases inside the templates that appear after
template parameter substitution:

template<typename T>
void templ() {
  T loc; 
}

void foo(){
    templ<image1d_t>();
    templ<__local event_t>();
    templ<__local sampler_t>();

    templ<half>();
    image1d_t img;
    __local event_t e;
    __local sampler_t s;
    half h;
}
'
The diagnostic will appear correctly for 'foo' but no 'templ'. Even if after
the substitution they have identical invalid cases.

See: <a href="https://godbolt.org/z/jn8WT3">https://godbolt.org/z/jn8WT3</a></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>