[PATCH] D155572: [clang][Interp] Start implementing binary operators for complex types

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 14 21:53:55 PDT 2023


tbaeder added a comment.

In D155572#4645997 <https://reviews.llvm.org/D155572#4645997>, @aaron.ballman wrote:

> Hmmm, I think the answer is "no"... and "maybe." `_Complex` can only be followed by `float`, `double`, or `long double` specifically per the C standard. However, we also support `_Complex int` (and others) as an extension, which starts to make `_Complex` look more like `_Atomic` in that it augments an existing type, and so typedefs seem quite reasonable.

I know that much, I guess I was confused by the diagnostics:

  ../clang/test/AST/Interp/complex.cpp:121:18: warning: plain '_Complex' requires a type specifier; assuming '_Complex double'
    121 |   using Gobble = _Complex Frobble;
        |                  ^
        |                           double




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155572/new/

https://reviews.llvm.org/D155572



More information about the cfe-commits mailing list