Skip to content

Commit

Permalink
Some fixes as suggested by clang-tidy.
Browse files Browse the repository at this point in the history
- Cleaned up std::move usage

This includes removing invocations where it does not have any impact,
e.g., moving ints or arrays. I also added std::move calls for types
where it improves performance, such as strings or std::vector.

- Added noexcept modifier to move constructors

- Added parentheses where they were missing.

- Added pointer qualifier to auto declarations

- Added checks to prevent broken objects in case of self
  assignments

For example for TaintFlow the assignment constructor first releases
its own resources. If a self assignment TaintFlow f = flow; takes
place, this would mean we release the resources and then try to use
them, which is obviously problematic.

- Removed some superfluous copies by using references.
  • Loading branch information
leeN authored and tmbrbr committed Jan 22, 2024
1 parent 810ea9f commit e6d69a1
Show file tree
Hide file tree
Showing 2 changed files with 107 additions and 75 deletions.
Loading

0 comments on commit e6d69a1

Please sign in to comment.