-
Notifications
You must be signed in to change notification settings - Fork 341
Surface errors in GetNumChildren. #8376
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
Surface errors in GetNumChildren. #8376
Conversation
In the end this value comes from TypeSystem::GetNumChildren which returns a uint32_t, so ValueObject should be consistent with that. (cherry picked from commit 54c955b)
…int32_t This way it is consistent with ValueObject and TypeSystem. (cherry picked from commit 3d7c5b8)
(cherry picked from commit e710523)
(cherry picked from commit 7fc583c)
…xpected (llvm#84219) Change GetNumChildren()/CalculateNumChildren() methods return llvm::Expected This is an NFC change that does not yet add any error handling or change any code to return any errors. This is the second big change in the patch series started with llvm#83501 A follow-up PR will wire up error handling. (cherry picked from commit 624ea68)
This is a proof-of-concept patch that illustrates how to use the Expected return values to surface rich error messages all the way up to the ValueObjectPrinter. This is the final patch in the series that includes llvm#83501 and llvm#84219 (cherry picked from commit 6462ead)
@swift-ci test |
This patch will allow displaying unresolved types in composite types as errors instead of "{}" empty types. rdar://123794838
f248fe5
to
1ab3de7
Compare
@swift-ci test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
"TypeSystemSwiftTypeRef diverges from SwiftASTContext"); \ | ||
return IMPL(); \ | ||
} while (0) | ||
|
||
#else | ||
#define VALIDATE_AND_RETURN_STATIC(IMPL, REFERENCE) \ | ||
FALLBACK(REFERENCE, ()); \ |
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 FALLBACK(REFERENCE, ())
has not been modified for the third parameter.
Also the one in line 2229 which I cannot leave a comment in.
One also need VALIDATE_AND_RETURN_EXPECTED
equivalent in that #else
branch.
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 patch will allow displaying unresolved types in composite types
as errors instead of "{}" empty types.
rdar://123794838