Fix "use of" uninitialized memory in benchmark.
authorEric Fiselier <eric@efcs.ca>
Tue, 13 Nov 2018 23:00:55 +0000 (23:00 +0000)
committerEric Fiselier <eric@efcs.ca>
Tue, 13 Nov 2018 23:00:55 +0000 (23:00 +0000)
An argument to DoNotOptimize was not fully initialized, which caused
msan to complain.

llvm-svn: 346808

libcxx/benchmarks/function.bench.cpp

index 484d197..4f0e1fd 100644 (file)
@@ -48,7 +48,7 @@ struct AllOpacity : EnumValuesAsTuple<AllOpacity, Opacity, 2> {
 
 struct S {
   int function() const { return 0; }
-  int field;
+  int field = 0;
 };
 
 int FunctionWithS(const S*) { return 0; }