diff options
author | Fangrui Song <maskray@google.com> | 2018-11-29 18:26:39 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2018-11-29 18:26:39 +0000 |
commit | b74d6368974c4b4b2913c1c20bd8c632c6492cb6 (patch) | |
tree | e97f94592bd8e7df55c36b4e7bae280f2c93f181 | |
parent | a26a848da3c45f58abce5578a5f710734e9ee2cf (diff) | |
download | bcm5719-llvm-b74d6368974c4b4b2913c1c20bd8c632c6492cb6.tar.gz bcm5719-llvm-b74d6368974c4b4b2913c1c20bd8c632c6492cb6.zip |
Simplify the __builtin_constant_p test that was used to catch rC347417 failure
Reviewers: rsmith, void, shafik
Reviewed By: void
Subscribers: kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D54964
llvm-svn: 347895
-rw-r--r-- | clang/test/SemaCXX/constant-expression-cxx1y.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/test/SemaCXX/constant-expression-cxx1y.cpp b/clang/test/SemaCXX/constant-expression-cxx1y.cpp index 3214a2c0862..302b6ccb40e 100644 --- a/clang/test/SemaCXX/constant-expression-cxx1y.cpp +++ b/clang/test/SemaCXX/constant-expression-cxx1y.cpp @@ -1123,10 +1123,7 @@ static_assert(e2.x != e2.y, ""); } // 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"); |