[NFC][offloader] Mark run() definition static to match its declaration#1250
Merged
Conversation
The forward declaration on line 81 already has internal linkage via `static`. C++ rules preserve that linkage on the later definition, but per the LLVM Coding Standards (`Restrict Visibility'' / `Anonymous Namespaces'' sections) the `static` specifier should also appear on the definition so readers can tell at a glance that the function is translation-unit-local without having to find the forward declaration. The two other helpers in this file (readFile and matchesRegexIgnoreCase) already follow this convention. See: https://llvm.org/docs/CodingStandards.html#restrict-visibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
CI builds are failing. Need this fix |
bob80905
approved these changes
May 28, 2026
bogner
approved these changes
May 28, 2026
bogner
left a comment
Contributor
There was a problem hiding this comment.
Arguably we should also move main to the end of the file - the forward declaration of run here is pretty silly. But in any case, this change as is is correct, so that can be some later cleanup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Minor nit:
run()intools/offloader/offloader.cppis forward-declaredstaticbut the definition omits the specifier. Adding it matches the other two helpers in this file and the readability rationale in the LLVM Coding Standards. NFC.Assisted by Claude Opus 4.7.