-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improved parsing of templates #167
Conversation
1b7f620
to
56e0d97
Compare
NonType, | ||
// template template parameter, e.g. "template<typename> typename T" | ||
Template, | ||
}; |
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.
Concepts are Type
?
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 don't handle concepts at all currently. Once I add partial/explicit specialization support, I'll add support for concepts & requirement clauses
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.
concepts are a whole other ball of yarn
{ | ||
// default type for the type template parameter | ||
std::optional<TypeInfo> Default; | ||
}; |
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.
Concept?
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.
If there's a SymbolID in there, you could lose the optional.
55272ca
to
826aa52
Compare
34e59ae
to
fb82a73
Compare
f2d90fe
to
65bddb6
Compare
enum class TemplateParamKind : int | ||
{ | ||
// KRYSTIAN NOTE: temporary | ||
None, |
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.
wtf is "None?" if this is a real thing you need to write
None = 0, // for bitstream
but if None is going away you need to sort it, I dont like having enums that arent use. For example my Access
doesn't have None
(but clang::AccessSpecifier
does, which is irritating).
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.
None
indicates a TParam
without any extended info (e.g. TypeTParam
).
ND->isTemplateParameterPack()); | ||
|
||
if(const auto* TP = dyn_cast< | ||
TemplateTypeParmDecl>(ND)) |
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 is begging for if constexpr
LOL. Not now though. Later.
3853358
to
1ab2c99
Compare
No description provided.