[clang] [Clang][ARM] Call constructor on BranchTargetInfo. (PR #98307)
Tomas Matheson via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 10 07:41:27 PDT 2024
================
@@ -1434,7 +1434,14 @@ class TargetInfo : public TransferrableTargetInfo,
}
public:
- BranchProtectionInfo() = default;
+ BranchProtectionInfo() {
+ SignReturnAddr = LangOptions::SignReturnAddressScopeKind::None;
+ SignKey = LangOptions::SignReturnAddressKeyKind::AKey;
+ BranchTargetEnforcement = false;
+ BranchProtectionPAuthLR = false;
+ GuardedControlStack = false;
+ };
----------------
tmatheson-arm wrote:
```suggestion
BranchProtectionInfo() :
SignReturnAddr(LangOptions::SignReturnAddressScopeKind::None),
SignKey(LangOptions::SignReturnAddressKeyKind::AKey),
BranchTargetEnforcement(false),
BranchProtectionPAuthLR(false),
GuardedControlStack(false)
{}
```
This is more likely to show up warnings if something gets missed or reordered.
https://github.com/llvm/llvm-project/pull/98307
More information about the cfe-commits
mailing list