[clangd] Fix undefined behavior due to misaligned type cast
authorJan Korous <jkorous@apple.com>
Mon, 19 Mar 2018 20:26:18 +0000 (20:26 +0000)
committerJan Korous <jkorous@apple.com>
Mon, 19 Mar 2018 20:26:18 +0000 (20:26 +0000)
commitbd5ff79dd0b007489d4776ea0cb4c8cb4bed3fcd
tree7ec5f6aa774480e9d50409e0da85ebad76d93c04
parentee1f4586f6e8cdf29f29677c2ac89dfd9f006be0
[clangd] Fix undefined behavior due to misaligned type cast

The current code was casting pointer to a misaligned type which is undefined behavior.
Found by compiling with Undefined Behavior Sanitizer and running tests (check-clang-tools).

llvm-svn: 327902
clang-tools-extra/clangd/index/Index.h