projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a26a848
)
Simplify the __builtin_constant_p test that was used to catch rC347417 failure
author
Fangrui Song
<maskray@google.com>
Thu, 29 Nov 2018 18:26:39 +0000
(18:26 +0000)
committer
Fangrui Song
<maskray@google.com>
Thu, 29 Nov 2018 18:26:39 +0000
(18:26 +0000)
Reviewers: rsmith, void, shafik
Reviewed By: void
Subscribers: kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D54964
llvm-svn: 347895
clang/test/SemaCXX/constant-expression-cxx1y.cpp
patch
|
blob
|
history
diff --git
a/clang/test/SemaCXX/constant-expression-cxx1y.cpp
b/clang/test/SemaCXX/constant-expression-cxx1y.cpp
index
3214a2c
..
302b6cc
100644
(file)
--- 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");