efriedma added inline comments.
================
Comment at: clang/test/Sema/builtins.c:181-186
+ ASSERT(!OPT(test17_c));
+ ASSERT(!OPT(&test17_c[0]));
+ ASSERT(!OPT((char*)test17_c));
ASSERT(!OPT(test17_d)); // expected-warning {{folding}}
ASSERT(!OPT(&test17_d[0])); // expected-warning {{folding}}
ASSERT(!OPT((char*)test17_d)); // expected-warning {{folding}}
----------------
nickdesaulniers wrote:
> `test17_c` and `test17_d` are both declared as `const char [4];` not sure why
> this case would differ
`strlen(test17_c)` is 3; `strlen(test17_d)` is undefined behavior. I assume
the difference is because the latter doesn't fold.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76096/new/
https://reviews.llvm.org/D76096
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits