tbaeder added a comment.
I have a local patch that implements these builtins by doing a bitcast to a
buffer first. There is a comment in `ExprConstant.cpp` that talks about the
same thing. That path probably makes more sense? I'd abandon this review then.
Repository:
rG LLVM Github Monorepo
cor3ntin added a comment.
There are still unaddressed comment here. It would be nice to complete this
before phab shuts down
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156212/new/
https://reviews.llvm.org/D156212
__
cor3ntin added inline comments.
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:88-92
+ if (!AT->getElementType()->isCharType() &&
+ !AT->getElementType()->isChar8Type())
+return false;
+
+ return true;
aaron.ballman wrote:
> Allowing `char8_t` seem
shafik added inline comments.
Comment at: clang/test/AST/Interp/builtin-functions.cpp:17
+ static_assert(__builtin_strncmp("abaa", "abba", 1) == 0);
+ static_assert(__builtin_strncmp("abaa", "abba", 0) == 0);
+ static_assert(__builtin_strncmp(0, 0, 0) == 0);
H
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:88-92
+ if (!AT->getElementType()->isCharType() &&
+ !AT->getElementType()->isChar8Type())
+return false;
+
+ return true;
Allowing `char8_t` seems wrong to me -- h
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.
Repository:
rG LLVM Github Monorepo
https://reviews