Before this fix, the bugprone-use-after-move check could incorrectly
conclude that a use and move in a function template were not sequenced.
For details, see
Details
Details
- Reviewers
alexfh hokein aaron.ballman JonasToth - Commits
- rG764ad2f732c4: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)
rCTE343768: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)
rL343768: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
clang-tidy/utils/ExprSequence.cpp | ||
---|---|---|
103 ↗ | (On Diff #167946) | I think this means English "for" and not C for. Could rewrite to If a statement has multiple parents, instead. |
clang-tidy/utils/ExprSequence.cpp | ||
---|---|---|
103 ↗ | (On Diff #167946) | Yes, this is what I meant. Rephrased as Aaron suggested to remove the ambiguity. |
test/clang-tidy/bugprone-use-after-move.cpp | ||
1198 ↗ | (On Diff #167946) | I've added the two other examples I'm aware of (continue and break statements) to the description. However, I haven't been able to use these to construct an example that triggers the false positive. In general, any statement that TemplateInstantiator leaves unchanged will have multiple parents; I'm not sure which other statements this applies to. In my experience, any statement that contains an expression will be rebuilt, but I may be missing something here. |