Author: krasimir Date: Thu Oct 18 23:05:32 2018 New Revision: 344773 URL: http://llvm.org/viewvc/llvm-project?rev=344773&view=rev Log: [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. Modified: clang-tools-extra/trunk/clangd/index/Index.h Modified: clang-tools-extra/trunk/clangd/index/Index.h URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Index.h?rev=344773&r1=344772&r2=344773&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/index/Index.h (original) +++ clang-tools-extra/trunk/clangd/index/Index.h Thu Oct 18 23:05:32 2018 @@ -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); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits