-
Notifications
You must be signed in to change notification settings - Fork 183
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
Deal with friends from multiple classes #8037
Deal with friends from multiple classes #8037
Conversation
clang::FriendDecl const* friendDecl, | ||
std::string const& parentNodeNavigationId) | ||
{ | ||
std::string navigationId = parentNodeNavigationId + "_friend_"; |
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.
Can the parentNodeNavigationId be ""? Can we assert these premises.
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 cannot be empty, I'll add an error message if it is.
@@ -1318,6 +1318,45 @@ static std::string GetNavigationId(clang::FunctionDecl const* func) | |||
return navigationId; | |||
} | |||
|
|||
static std::string GetNavigationId( |
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.
Add function comment
friendDecl->dump(llvm::outs()); | ||
} | ||
} | ||
return navigationId; |
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 you end up in the final else of the initial if/else then you could end up with navigationId being <parentNodeId>_friend_
. Is a navigationId ending in "_" a valid format?
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.
All strings are valid, the only restriction is that the names must be unique.
No description provided.