<html>
    <head>
      <base href="http://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 --- - Lexer produces incorrect identifier in user defined literals using UCNs"
   href="http://llvm.org/bugs/show_bug.cgi?id=18855">18855</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Lexer produces incorrect identifier in user defined literals using UCNs
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++1y
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>seth.cantrell@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This program:

<span class="quote">> unsigned long long
> operator"" _µs(unsigned long long usec) {
>   return usec;
> }</span >

int main() { 3_µs; }

produces the error:

<span class="quote">> error: no matching literal operator for call to 'operator "" _' with argument of type 'unsigned long long' or 'const char *', and no matching literal operator template</span >
int main() { 3_µs; }

The error message indicates that the lexer is not correctly tokenizing the user
defined literal, and is truncating the identifier portion of the literal where
the UCN occurs. The same result occurs with the equivalent literal '3_\u00B5s'.

The result of the above program should be that the program calls the function
operator"" _µs with the argument 3ull.</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>