-
Notifications
You must be signed in to change notification settings - Fork 34
Fixes formatting of reference and pointer variables #1930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b7db3dc
Formatting -- moves pointer and reference alignment to left
kennyweiss 492eabb
Modernizes .clang-format to clang@19 options
kennyweiss ddb1064
Updates clang-format language base to c++20
kennyweiss f30ed92
Formats Axom after updating .clang-format
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,26 @@ | ||
| # requires clang 14 | ||
| # https://releases.llvm.org/14.0.0/tools/clang/docs/ClangFormatStyleOptions.html | ||
| # requires clang 19 | ||
| # https://releases.llvm.org/19.1.0/tools/clang/docs/ClangFormatStyleOptions.html | ||
|
|
||
| BasedOnStyle: Google | ||
| Language: Cpp | ||
| Standard: Cpp11 | ||
| Standard: c++20 | ||
| LineEnding: LF | ||
|
|
||
| AccessModifierOffset: -2 | ||
| AllowAllArgumentsOnNextLine: false | ||
| AllowAllConstructorInitializersOnNextLine: false | ||
| AllowAllParametersOfDeclarationOnNextLine: false | ||
| AlwaysBreakTemplateDeclarations: true | ||
| AlwaysBreakBeforeMultilineStrings: true | ||
|
|
||
| BinPackArguments: false | ||
| BinPackParameters: false | ||
| BreakConstructorInitializers: BeforeComma | ||
| BreakTemplateDeclarations: Yes | ||
|
|
||
| BreakBeforeBraces: Custom | ||
| BraceWrapping: | ||
| AfterCaseLabel: true | ||
| AfterClass: true | ||
| AfterControlStatement: true | ||
| AfterControlStatement: Always | ||
| AfterEnum: true | ||
| AfterFunction: true | ||
| AfterNamespace: true | ||
|
|
@@ -36,10 +36,12 @@ BraceWrapping: | |
| SplitEmptyRecord: false | ||
| SplitEmptyNamespace: false | ||
|
|
||
| ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
| ConstructorInitializerIndentWidth: 2 | ||
| ContinuationIndentWidth: 2 | ||
| ColumnLimit: 100 | ||
| PackConstructorInitializers: CurrentLine | ||
|
|
||
| DerivePointerAlignment: false | ||
|
|
||
| FixNamespaceComments: true | ||
|
|
||
|
|
@@ -48,10 +50,12 @@ IndentPPDirectives: BeforeHash | |
| IndentWidth: 2 | ||
|
|
||
| PenaltyExcessCharacter: 10 | ||
| PointerAlignment: Left | ||
|
|
||
| ReferenceAlignment: Left | ||
|
Comment on lines
+53
to
+55
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two control the placement of The |
||
| ReflowComments: false | ||
|
|
||
| SortIncludes: false | ||
| SortIncludes: Never | ||
| SpaceAfterTemplateKeyword: true | ||
| SpaceBeforeAssignmentOperators: true | ||
| SpaceBeforeCpp11BracedList: true | ||
|
|
@@ -60,20 +64,17 @@ SpaceBeforeInheritanceColon: true | |
| SpaceBeforeParens: Never | ||
| SpaceBeforeRangeBasedForLoopColon: true | ||
| SpaceInEmptyBlock: true | ||
| SpaceInEmptyParentheses: false | ||
| SpacesBeforeTrailingComments: 2 | ||
| SpacesInAngles: false | ||
| SpacesInCStyleCastParentheses: false | ||
| SpacesInAngles: Never | ||
| SpacesInContainerLiterals: false | ||
| SpacesInConditionalStatement: false | ||
| SpacesInParentheses: false | ||
| SpacesInParens: Never | ||
| SpacesInSquareBrackets: false | ||
|
|
||
| UseTab: Never | ||
|
|
||
| ## Possible changes | ||
|
|
||
| # Axom defaults for alignment -- consider changing | ||
| AlignConsecutiveAssignments: false | ||
| AlignConsecutiveDeclarations: false | ||
| AlignOperands: false | ||
| AlignConsecutiveAssignments: None | ||
| AlignConsecutiveDeclarations: None | ||
| AlignOperands: DontAlign | ||
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file contains the only hand-edited changes.
Many of the changes were related to removing obsolete/deprecated features, and updating to the new ones.
Tested using
clang-format --dump-configThe rest of the files in this PR are automatically generated via
make style(Note: Reviewing with "Hide whitespace" reveals that nearly every change in this PR is a whitespace change.)