[PATCH] D54964: Add test about __builtin_constant_p
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 29 10:29:42 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rC347895: Simplify the __builtin_constant_p test that was used to catch rC347417 failure (authored by MaskRay, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D54964?vs=175543&id=175902#toc
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54964/new/
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
@@ -1123,10 +1123,7 @@
} // namespace IndirectFields
-constexpr bool __constant_string_p(const char *__s) {
- while (__builtin_constant_p(*__s) && *__s)
- __s++;
+constexpr bool indirect_builtin_constant_p(const char *__s) {
return __builtin_constant_p(*__s);
}
-
-constexpr bool n = __constant_string_p("a");
+constexpr bool n = indirect_builtin_constant_p("a");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54964.175902.patch
Type: text/x-patch
Size: 589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181129/ccc26946/attachment-0001.bin>
More information about the cfe-commits
mailing list