Ignore -Wgcc-compat diagnostic in StringLiteral.

llvm-svn: 289856
This commit is contained in:
Zachary Turner 2016-12-15 19:22:58 +00:00
parent d640641a61
commit b0aa31bb25
1 changed files with 4 additions and 1 deletions

View File

@ -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) {
}