OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ca87b1
)
Ignore -Wgcc-compat diagnostic in StringLiteral.
author
Zachary Turner
<zturner@google.com>
Thu, 15 Dec 2016 19:22:58 +0000
(19:22 +0000)
committer
Zachary Turner
<zturner@google.com>
Thu, 15 Dec 2016 19:22:58 +0000
(19:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289856
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/StringRef.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/StringRef.h
b/include/llvm/ADT/StringRef.h
index
4a7a991
..
4c010c2
100644
(file)
--- a/
include/llvm/ADT/StringRef.h
+++ b/
include/llvm/ADT/StringRef.h
@@
-847,9
+847,12
@@
namespace llvm {
public:
template <size_t N>
constexpr StringLiteral(const char (&Str)[N])
-#if __has_attribute(enable_if)
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wgcc-compat"
__attribute((enable_if(__builtin_strlen(Str) == N - 1,
"invalid string literal")))
+#pragma clang diagnostic pop
#endif
: StringRef(Str, N - 1) {
}