-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add support for array arguments in vector mode #614
Conversation
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.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 10 out of 21. Check the log or trigger a new build to see more.
73ec6ae
to
0edc12c
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #614 +/- ##
==========================================
+ Coverage 93.73% 93.83% +0.09%
==========================================
Files 41 41
Lines 5939 6032 +93
==========================================
+ Hits 5567 5660 +93
Misses 372 372
|
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.
clang-tidy made some suggestions
@@ -611,6 +611,25 @@ | |||
return InstantiateTemplate(GetCladArrayDecl(), {T}); | |||
} | |||
|
|||
TemplateDecl* VisitorBase::GetCladMatrixDecl() { | |||
static TemplateDecl* Result = nullptr; |
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.
warning: variable 'Result' provides global access to a non-const object; consider making the pointed-to data 'const' [cppcoreguidelines-avoid-non-const-global-variables]
static TemplateDecl* Result = nullptr;
^
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.
I am not sure I understand that diagnostics. Does it mean to add a const
?
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.
Not sure about this, I don't get it either.
0edc12c
to
d1618e5
Compare
d42ef1a
to
06b006c
Compare
06b006c
to
56fe2ae
Compare
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 looks pretty good!
if (!offsetExpr) { | ||
offsetExpr = nonArrayIndVarCountExpr; | ||
} else if (nonArrayIndVarCount != 0) { | ||
offsetExpr = BuildOp(BinaryOperatorKind::BO_Add, offsetExpr, | ||
nonArrayIndVarCountExpr); | ||
} |
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.
We should omit the {
and }
. Did clang-format add them?
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.
Removed manually 👍🏼 , clang-format wasn't able to fix this even after adding the RemoveBracesLLVM
flag; maybe because it considers else if part as multi-line?
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.
Probably. It's just a lexer in the end.
|
||
// Push param types for derived params. | ||
for (std::size_t i = 0; i < m_Function->getNumParams(); ++i) | ||
for (std::size_t i = 0; i < m_Function->getNumParams(); ++i) { |
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.
It seems we should fix clang-format's settings...
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.
added RemoveBracesLLVM
flag in clang-format, but this is not very reliable as stated here: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
@@ -611,6 +611,25 @@ | |||
return InstantiateTemplate(GetCladArrayDecl(), {T}); | |||
} | |||
|
|||
TemplateDecl* VisitorBase::GetCladMatrixDecl() { | |||
static TemplateDecl* Result = nullptr; |
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.
I am not sure I understand that diagnostics. Does it mean to add a const
?
0a6ce09
to
c921c07
Compare
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.
LGTM!
No description provided.