1<!--===- docs/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. Do not include the text of 20 the constraint or requirement, just its number. 21* Alphabetize arbitrary lists of names. 22* Check dereferences of pointers and optionals where necessary. 23* Ensure that the scopes of all functions and variables are as local as 24 possible. 25* Try to make all functions fit on a screen (40 lines). 26* Build and test with both GNU and clang compilers. 27* When submitting an update to a pull request, review previous pull request 28 comments and make sure that you've actually made all of the changes that 29 were requested. 30 31## Follow the style guide 32The following items are taken from the [C++ style guide](C++style.md). But 33even though I've read the style guide, they regularly trip me up. 34* Run clang-format using the git-clang-format script from LLVM HEAD. 35* Make sure that all source lines have 80 or fewer characters. Note that 36 clang-format will do this for most code. But you may need to break up long 37 strings. 38* Review declarations for proper use of `constexpr` and `const`. 39* Follow the C++ [naming guidelines](C++style.html#naming) 40* Ensure that the names evoke their purpose and are consistent with existing code. 41* Used braced initializers. 42* Review pointer and reference types to make sure that you're using them 43 appropriately. Note that the [C++ style guide](C++style.md) contains a 44 section that describes all of the pointer types along with their 45 characteristics. 46* Declare non-member functions ```static``` when possible. Prefer 47 ```static``` functions over functions in anonymous namespaces. 48