blob: 782c3b61ca0e5168646a9169e91c26206b1be4cb [file] [log] [blame] [view]
Pete Steinfeldfa10045b2020-01-12 19:24:131<!--===- documentation/PullRequestChecklist.md
2
3 Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 See https://llvm.org/LICENSE.txt for license information.
5 SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7-->
8
9# Pull request checklist
10Please review the following items before submitting a pull request. This list
11can also be used when reviewing pull requests.
12* Verify that new files have a license with correct file name.
13* Run `git diff` on all modified files to look for spurious changes such as
14 `#include <iostream>`.
15* If you added code that causes the compiler to emit a new error message, make
16 sure that you also added a test that causes that error message to appear
17 and verifies its correctness.
18* Annotate the code and tests with appropriate references to constraint and
19 requirement numbers from the Fortran standard.
20* Check dereferences of pointers and optionals where necessary.
21* Ensure that the scopes of all functions and variables are as local as
22 possible.
23* Try to make all functions fit on a screen (40 lines).
24* Build and test with both GNU and clang compilers.
25* When submitting an update to a pull request, review previous pull request
26 comments and make sure that you've actually made all of the changes that
27 were requested.
28
29## Follow the style guide
30The following items are taken from the [C++ style guide](C++style.md). But
31even though I've read the style guide, they regularly trip me up.
32* Run clang-format version 7 on all .cc and .h files.
33* Make sure that all source lines have 80 or fewer characters. Note that
34 clang-format will do this for most code. But you may need to break up long
35 strings.
36* Review declarations for proper use of `constexpr` and `const`.
37* Follow the C++ naming guidelines. Ensure that the names evoke their
38 purpose and are consistent with existing code.
39* Review pointer and reference types to make sure that you're using them
40 appropriately. Note that the [C++ style guide](C++style.md) contains a
41 section that describes all of the pointer types along with their
42 characteristics.
43* Declare non-member functions ```static``` when possible. Prefer
44 ```static``` functions over functions in anonymous namespaces.