Skip to content
Commit 9710338a authored by Tim Northover's avatar Tim Northover
Browse files

Reapply Sema: allow imaginary constants via GNU extension if UDL overloads not present.

C++14 added user-defined literal support for complex numbers so that you
can write something like "complex<double> val = 2i". However, there is
an existing GNU extension supporting this syntax and interpreting the
result as a _Complex type.

This changes parsing so that such literals are interpreted in terms of
C++14's operators if an overload is present but otherwise falls back to
the original GNU extension.

(We now have more robust diagnostics for implicit conversions so the
libc++ test that caused the original revert still passes).

llvm-svn: 310478
parent 922ca234
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment