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

Tim Northover via cfe-commits cfe-commits at lists.llvm.org
Tue May 23 15:11:21 PDT 2017


> +      if (!isImaginary) {
> 
> Shouldn't this be "if (s != ThisTokEnd)"? (That is, if this was not a valid builtin suffix, reset the suffix information.)

I think they're equivalent here:

    !isImaginary => UDL is _ or time thing => extra crap on the end.
    extra crap on the end => it's not a legitimate C++14 imaginary => invalid as no _.

so I went for the same test as when the data is used.

But I'm not committed to that, so I'm happy to switch if you're unconvinced. I don't think I'll be able to test the change though, even if there is a suffix where it matters (I can't think of anywhere those fields matter in the UDL but not imaginary case).

Cheers.

Tim.


More information about the cfe-commits mailing list