Skip to content

Commit 77b55c7

Browse files
authored
[llvm][docs] Add notes on upstreaming code from downstream projects (#129743)
For context, see: * https://discourse.llvm.org/t/code-review-process-when-upstreaming-patches
1 parent 014bf63 commit 77b55c7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

llvm/docs/CodeReview.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,21 @@ Developers should participate in code reviews as both reviewers and
272272
authors. If someone is kind enough to review your code, you should return the
273273
favor for someone else. Note that anyone is welcome to review and give feedback
274274
on a patch, but approval of patches should be consistent with the policy above.
275+
276+
Upstreaming Changes to LLVM
277+
===========================
278+
279+
When upstreaming your own changes from a downstream project to LLVM, simply
280+
follow the process outlined above.
281+
282+
When upstreaming changes originally written by someone else:
283+
284+
* Ensure that there are no obstacles to upstreaming the code. In some cases,
285+
this simply means checking with the original author(s) to ensure they are
286+
aware of and approve the upstreaming. In other cases, licensing
287+
considerations may be more complex.
288+
* Properly attribute the original changes, e.g., by creating a commit with
289+
multiple authors (`GitHub guide <https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors>`_).
290+
* Invite the original author(s) to review the changes, and also include
291+
additional reviewers. Specifically, an LGTM from a (co-)author should not be
292+
taken as approval to land a change.

0 commit comments

Comments
 (0)