Update clang to r339409b.
Change-Id: Ied8a188bb072c40035320acedc86164b66d920af
diff --git a/linux-x64/clang/include/llvm/Support/JSON.h b/linux-x64/clang/include/llvm/Support/JSON.h
index da3c5ea..2fc0e7d 100644
--- a/linux-x64/clang/include/llvm/Support/JSON.h
+++ b/linux-x64/clang/include/llvm/Support/JSON.h
@@ -452,7 +452,10 @@
new (reinterpret_cast<T *>(Union.buffer)) T(std::forward<U>(V)...);
}
template <typename T> T &as() const {
- return *reinterpret_cast<T *>(Union.buffer);
+ // Using this two-step static_cast via void * instead of reinterpret_cast
+ // silences a -Wstrict-aliasing false positive from GCC6 and earlier.
+ void *Storage = static_cast<void *>(Union.buffer);
+ return *static_cast<T *>(Storage);
}
template <typename Indenter>