-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Add clang-tidy run on zig sources, minor CMake improvements #993
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
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
442bf34
Add clang-tidy run on zig sources, minor CMake improvements
isaachier 1fbbec6
Upgrade CMake during Mac builds
0a7062e
Fix typo
1473850
Revert fix in Mac, move fix to Linux
c72de30
Fixes from clang-tidy analysis
isaachier 27c2962
Fix assertions
isaachier f0e77c1
More clang-tidy fixes
isaachier 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Checks: 'clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-unix.Malloc,-clang-analyzer-cplusplus.NewDeleteLeaks' | ||
WarningsAsErrors: '' | ||
HeaderFilterRegex: '' | ||
AnalyzeTemporaryDtors: false | ||
FormatStyle: none | ||
CheckOptions: | ||
- key: google-readability-braces-around-statements.ShortStatementLines | ||
value: '1' | ||
- key: google-readability-function-size.StatementThreshold | ||
value: '800' | ||
- key: google-readability-namespace-comments.ShortNamespaceLines | ||
value: '10' | ||
- key: google-readability-namespace-comments.SpacesBeforeComments | ||
value: '2' | ||
- key: modernize-loop-convert.MaxCopySize | ||
value: '16' | ||
- key: modernize-loop-convert.MinConfidence | ||
value: reasonable | ||
- key: modernize-loop-convert.NamingStyle | ||
value: CamelCase | ||
- key: modernize-pass-by-value.IncludeStyle | ||
value: llvm | ||
- key: modernize-replace-auto-ptr.IncludeStyle | ||
value: llvm | ||
- key: modernize-use-nullptr.NullMacros | ||
value: 'NULL' |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -4306,7 +4306,7 @@ static LLVMValueRef get_coro_alloc_helper_fn_val(CodeGen *g, LLVMTypeRef alloc_f | |
LLVMValueRef alloc_fn_val = LLVMGetParam(fn_val, next_arg); | ||
next_arg += 1; | ||
|
||
LLVMValueRef stack_trace_val; | ||
LLVMValueRef stack_trace_val = nullptr; | ||
if (g->have_err_ret_tracing) { | ||
stack_trace_val = LLVMGetParam(fn_val, next_arg); | ||
next_arg += 1; | ||
|
@@ -4317,7 +4317,6 @@ static LLVMValueRef get_coro_alloc_helper_fn_val(CodeGen *g, LLVMTypeRef alloc_f | |
LLVMValueRef err_code_ptr = LLVMGetParam(fn_val, next_arg); | ||
next_arg += 1; | ||
LLVMValueRef coro_size = LLVMGetParam(fn_val, next_arg); | ||
next_arg += 1; | ||
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. Dead store. |
||
LLVMValueRef alignment_val = LLVMConstInt(g->builtin_types.entry_u29->type_ref, | ||
get_coro_frame_align_bytes(g), false); | ||
|
||
|
@@ -5828,20 +5827,20 @@ static const uint8_t int_sizes_in_bits[] = { | |
}; | ||
|
||
struct CIntTypeInfo { | ||
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. Optimize struct padding. |
||
CIntType id; | ||
const char *name; | ||
CIntType id; | ||
bool is_signed; | ||
}; | ||
|
||
static const CIntTypeInfo c_int_type_infos[] = { | ||
{CIntTypeShort, "c_short", true}, | ||
{CIntTypeUShort, "c_ushort", false}, | ||
{CIntTypeInt, "c_int", true}, | ||
{CIntTypeUInt, "c_uint", false}, | ||
{CIntTypeLong, "c_long", true}, | ||
{CIntTypeULong, "c_ulong", false}, | ||
{CIntTypeLongLong, "c_longlong", true}, | ||
{CIntTypeULongLong, "c_ulonglong", false}, | ||
{"c_short", CIntTypeShort, true}, | ||
{"c_ushort", CIntTypeUShort, false}, | ||
{"c_int", CIntTypeInt, true}, | ||
{"c_uint", CIntTypeUInt, false}, | ||
{"c_long", CIntTypeLong,true}, | ||
{"c_ulong", CIntTypeULong, false}, | ||
{"c_longlong", CIntTypeLongLong, true}, | ||
{"c_ulonglong", CIntTypeULongLong, false}, | ||
}; | ||
|
||
static const bool is_signed_list[] = { false, true, }; | ||
|
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.
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.
Fix issue with using uninitialized value.