[PATCH] D155545: [clang][Interp] Pass CallExpr to builtin functions

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 17 22:55:18 PDT 2023


tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

  For some builtins, we need to do quite a bit of type checking ourselves,
  so pass the call expression along. This way we can inspect arguments,
  expected return value, etc.

As discussed with @aaron.ballman on Discord, reject non-StringLiteral inputs from `__builtin_isnan()`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D155545

Files:
  clang/lib/AST/Interp/ByteCodeExprGen.cpp
  clang/lib/AST/Interp/Interp.h
  clang/lib/AST/Interp/InterpBuiltin.cpp
  clang/lib/AST/Interp/Opcodes.td
  clang/test/AST/Interp/builtin-functions.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155545.541323.patch
Type: text/x-patch
Size: 6710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230718/c1dd4459/attachment.bin>


More information about the cfe-commits mailing list