forked from OSchip/llvm-project
[Attributor] Fix UB behavior on uninitalized bool variables.
Found by ASAN.
This commit is contained in:
parent
1f9dcd2b73
commit
3f5d53a525
|
@ -2181,7 +2181,7 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
|
|||
// Every argument might be simplified. We have to go through the Attributor
|
||||
// interface though as outside AAs can register custom simplification
|
||||
// callbacks.
|
||||
bool UsedAssumedInformation;
|
||||
bool UsedAssumedInformation = false;
|
||||
getAssumedSimplified(ArgPos, /* AA */ nullptr, UsedAssumedInformation);
|
||||
|
||||
// Every argument might be dead.
|
||||
|
@ -2257,7 +2257,7 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
|
|||
// Call site argument might be simplified. We have to go through the
|
||||
// Attributor interface though as outside AAs can register custom
|
||||
// simplification callbacks.
|
||||
bool UsedAssumedInformation;
|
||||
bool UsedAssumedInformation = false;
|
||||
getAssumedSimplified(CBArgPos, /* AA */ nullptr, UsedAssumedInformation);
|
||||
|
||||
// Every call site argument might be marked "noundef".
|
||||
|
|
|
@ -8245,7 +8245,7 @@ struct AACallEdgesFunction : public AACallEdges {
|
|||
SetVector<Function *> CalledFunctions;
|
||||
|
||||
/// Does this function have a call to a function that we don't know about.
|
||||
bool HasUnknownCallee;
|
||||
bool HasUnknownCallee = false;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Reference in New Issue