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
- 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
- Repository
- rCTE Clang Tools Extra
- Build Status
- Buildable 23441 - Build 23440: arc lint + arc unit 
Event Timeline
| clang-tidy/utils/ExprSequence.cpp | ||
|---|---|---|
| 103 | 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 | Yes, this is what I meant. Rephrased as Aaron suggested to remove the ambiguity. | |
| test/clang-tidy/bugprone-use-after-move.cpp | ||
| 1198 | 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. | |
I find the first part of the comment unclear. Does this loop handle for only?