Skip to content

Conversation

@hzeller
Copy link
Contributor

@hzeller hzeller commented Aug 29, 2025

  • std::remove is an <algorithm>
  • remove() is meant to remove a file, declared in <stdio.h> (not <cstdio>, interestingly).

@hzeller hzeller force-pushed the feature-20250829-fix-file-remove branch 2 times, most recently from 874b485 to ddd946c Compare August 29, 2025 12:28
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@hzeller hzeller force-pushed the feature-20250829-fix-file-remove branch from ddd946c to 8e518a8 Compare August 29, 2025 12:34
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@maliberty
Copy link
Member

Could you switch to std::filesystem::remove and remove the need for the waiver?

@hzeller hzeller force-pushed the feature-20250829-fix-file-remove branch from 8e518a8 to 13110a2 Compare August 29, 2025 14:33
@hzeller
Copy link
Contributor Author

hzeller commented Aug 29, 2025

yep. Done.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

 * `std::remove` is an `<algorithm>`
 * `remove()` is meant to remove a file (defined in `<stdio.h>`).

Use `std::filsystem::remove()` instead.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@hzeller hzeller force-pushed the feature-20250829-fix-file-remove branch from 13110a2 to c99d457 Compare August 29, 2025 14:43
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@hzeller
Copy link
Contributor Author

hzeller commented Aug 29, 2025

In #8158 , I am also removing the other uses of remove() and replace with std::filesystem::remove()

@maliberty maliberty enabled auto-merge August 29, 2025 15:56
hzeller added a commit to hzeller/OpenROAD that referenced this pull request Aug 29, 2025
Follow-up change to The-OpenROAD-Project#8154 : use modern `std::filesystem::remove()`
instead of old-school `remove()` from stdio.h

Signed-off-by: Henner Zeller <h.zeller@acm.org>
@maliberty maliberty merged commit 51e8c87 into The-OpenROAD-Project:master Aug 29, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants