http://llvm.org/bugs/show_bug.cgi?id=18855

            Bug ID: 18855
           Summary: Lexer produces incorrect identifier in user defined
                    literals using UCNs
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++1y
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

This program:

> unsigned long long
> operator"" _µs(unsigned long long usec) {
>   return usec;
> }

int main() { 3_µs; }

produces the error:

> 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
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to