[PATCH] D54964: Add test about __builtin_constant_p
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 27 11:29:02 PST 2018
MaskRay created this revision.
MaskRay added reviewers: rsmith, void, shafik.
Herald added subscribers: cfe-commits, kristina.
Repository:
rC Clang
https://reviews.llvm.org/D54964
Files:
test/SemaCXX/constant-expression-cxx1y.cpp
Index: test/SemaCXX/constant-expression-cxx1y.cpp
===================================================================
--- test/SemaCXX/constant-expression-cxx1y.cpp
+++ test/SemaCXX/constant-expression-cxx1y.cpp
@@ -1122,3 +1122,8 @@
static_assert(e2.x != e2.y, "");
} // namespace IndirectFields
+
+constexpr bool indirect_builtin_constant_p(const char *__s) {
+ return __builtin_constant_p(*__s);
+}
+constexpr bool n = indirect_builtin_constant_p("a");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54964.175543.patch
Type: text/x-patch
Size: 461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181127/7d4f6e73/attachment.bin>
More information about the cfe-commits
mailing list