[AAUnderlyingObjects] Initialize an uninitialized boolean.
authorCaroline Tice <cmtice@google.com>
Mon, 9 Jan 2023 23:38:01 +0000 (15:38 -0800)
committerCaroline Tice <cmtice@google.com>
Mon, 9 Jan 2023 23:46:15 +0000 (15:46 -0800)
Recent commit introducing AA for getting underluying objects of a
pointer created an uninitialized boolean, which causes tests to fail
when built unter asan/ubsan. This initialized that variable.

llvm/lib/Transforms/IPO/AttributorAttributes.cpp

index 9c67a00..00c1c3e 100644 (file)
@@ -11228,7 +11228,7 @@ struct AAUnderlyingObjectsImpl
 
     auto DoUpdate = [&](SmallSetVector<Value *, 8> &UnderlyingObjects,
                         AA::ValueScope Scope) {
-      bool UsedAssumedInformation;
+      bool UsedAssumedInformation = false;
       SmallPtrSet<Value *, 8> SeenObjects;
       SmallVector<AA::ValueAndContext> Values;