[PATCH] [complex] Teach Clang to preserve different-type operands to arithmeticoperators where one type is a C complex type, and to emit both the efficientand correct implementation for complex arithmetic according to C11 AnnexG using this extra...

Chandler Carruth chandlerc at gmail.com
Fri Oct 10 04:57:47 PDT 2014


Completely re-work the constant folding code to correctly follow the same logic
as the library calls do, but in terms of APFloat. Add extensive compile time
folding tests. These tests have to be written in C++ despite testing the
C complex number functionality because we need C++ static assertions in order
to fold these complex things. Yes, pun intended. =]

http://reviews.llvm.org/D5698

Files:
  lib/AST/ExprConstant.cpp
  lib/CodeGen/CGExprComplex.cpp
  lib/Sema/SemaExpr.cpp
  test/CodeGen/complex-math.c
  test/SemaCXX/complex-folding.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5698.14713.patch
Type: text/x-patch
Size: 43448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141010/085bdecb/attachment.bin>


More information about the cfe-commits mailing list