summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2018-10-19 06:05:32 +0000
committerKrasimir Georgiev <krasimir@google.com>2018-10-19 06:05:32 +0000
commit903542009126e107299aa11d3ecf727010d44bc0 (patch)
tree0cf7755aca916f3b78628b091846a91c15626922
parente0a804f503482e8ad78f7c9a57d1351dfbad1f27 (diff)
downloadbcm5719-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.h1
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);
OpenPOWER on IntegriCloud