hasFeature fields need to be initialised to false. Easy to miss as missed for hasPAuth and hasFlagM.
Maybe the code less error prone like this.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Basic/Targets/AArch64.cpp | ||
---|---|---|
581–582 | Why is this one singled out? |
clang/lib/Basic/Targets/AArch64.cpp | ||
---|---|---|
581–582 | I tried to keep all the initialisation logic in the handleTargetFeatures and HasUnaligned has an inverse feature flag, in a bit later we clear it if the flag present. if (Feature == "+strict-align") HasUnaligned = false; |
clang/lib/Basic/Targets/AArch64.cpp | ||
---|---|---|
581–582 | It could be initialised to true in the constructor, thus we have the defaults in one place. |
Why is this one singled out?