[PATCH] D149573: [Clang][C++23] Implement core language changes from P1467R9 extended floating-point types and standard names

M. Zeeshan Siddiqui via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 6 23:10:56 PDT 2023


codemzs updated this revision to Diff 529171.
codemzs marked 4 inline comments as done.
codemzs set the repository for this revision to rG LLVM Github Monorepo.
codemzs added a comment.

Hi @tahonermann,

Thank you for your insights on the patch. I concur with your perspective about the potential brittleness of comparison operations on the `FloatingRankCompareResult` enum type. As a remedy, I have incorporated a helper routine to handle such operations.

Regarding the `getFloatingTypeOrder()`method, it employs a 2-D grid to evaluate the conversion rank between two types. The grid index for a type is firmly established in the `CXX23FloatRankToIndex`, offering a stable indexing mechanism. Hence, it appears that this approach mitigates the brittleness concern associated with the comparison of `FloatingRankCompareResult` enum values.

I'm open to further insights if there are aspects I may have overlooked.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149573

Files:
  clang/include/clang/AST/ASTContext.h
  clang/include/clang/AST/Type.h
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/include/clang/Lex/LiteralSupport.h
  clang/include/clang/StaticAnalyzer/Core/PathSensitive/SMTConv.h
  clang/lib/AST/ASTContext.cpp
  clang/lib/AST/StmtPrinter.cpp
  clang/lib/AST/Type.cpp
  clang/lib/Frontend/InitPreprocessor.cpp
  clang/lib/Lex/LiteralSupport.cpp
  clang/lib/Sema/Sema.cpp
  clang/lib/Sema/SemaCast.cpp
  clang/lib/Sema/SemaChecking.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/lib/Sema/SemaOverload.cpp
  clang/test/CodeGenCXX/cxx23-fp-ext-std-names-p1467r9.cpp
  clang/test/CodeGenCXX/cxx23-vector-bfloat16.cpp
  clang/test/Sema/cxx23-fp-ext-std-names-p1467r9.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149573.529171.patch
Type: text/x-patch
Size: 84304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230607/f3f5c6fe/attachment-0001.bin>


More information about the cfe-commits mailing list