diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-10-19 06:05:32 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-10-19 06:05:32 +0000 |
commit | 903542009126e107299aa11d3ecf727010d44bc0 (patch) | |
tree | 0cf7755aca916f3b78628b091846a91c15626922 | |
parent | e0a804f503482e8ad78f7c9a57d1351dfbad1f27 (diff) | |
download | bcm5719-llvm-903542009126e107299aa11d3ecf727010d44bc0.tar.gz bcm5719-llvm-903542009126e107299aa11d3ecf727010d44bc0.zip |
[clangd] Fix msan failure after r344735 by initializing bitfields
That revision changed integer members to bitfields; the integers were
default initialized before and the bitfields lost that default
initialization. This started causing msan use-of-uninitialized memory in
clangd tests.
llvm-svn: 344773
-rw-r--r-- | clang-tools-extra/clangd/index/Index.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h index e0b3ec0992e..49910b36515 100644 --- a/clang-tools-extra/clangd/index/Index.h +++ b/clang-tools-extra/clangd/index/Index.h @@ -37,6 +37,7 @@ struct SymbolLocation { // Position is encoded into 32 bits to save space. // If Line/Column overflow, the value will be their maximum value. struct Position { + Position() : Line(0), Column(0) {} void setLine(uint32_t Line); uint32_t line() const { return Line; } void setColumn(uint32_t Column); |