-
Notifications
You must be signed in to change notification settings - Fork 19
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 relative bounds expressions #37
Comments
Comment from @jijoongmoon: I'm trying to implement relative bounds expressions. In order to do that, I have several questions about it. . Most of the example codes in the specification, I can see the relative expression with types such as rel_align(char). But I'm supposed that type is not the only one for the variable of relative expression. . This relative expression could be after the bounds and span expressions. count and byte_count is suppose to have the alignment as type size and one byte for each. But we need to have alignment for the range bounds expression with relative expression. So, I tried to use private TypeSourceInfo * in RangeBoundsExpr class. Do you think which on is ok better to create another class for relative expression or use private variable? . Handling the exceptions like this bounds(none + arr, arr + len) rel_align(char) = arr; , When I'm reading the clang code, current checkedc implementation suppose to this as NullaryBoundsExpr and SkipUntil the r_paran of bounds expression. if I implement the rel_align after this bounds expression, the parser also should go to the r_paran of rel_aling expression. Am I right? . Talking about the ASTDumper for relative alignment, I think it is ok something like " rel_align : char " after the dump Bounds Kind. How about it? |
Comment from @dtarditi:
|
Comment from @jijoongmoon: I tested with check-clang and check-checkedc. In case of check-checkedc, there is no error message except the tests in samples directory. |
Comment from @lenary: @jijoongmoon if you pull the most recent version of checkedc-llvm, the error about the samples directory should go away. As for platform-specific tests, I haven't yet added a way to add platform-specific tests to check-clang. Please can you file a new bug in the checkedc-clang repo with the output from the failure of CheckedC/dynamic-checks/array-subscript-code-gen.c? |
Comment from @dtarditi: Jijoong Moon has completed this work, so closing this issue. Thanks Jijoong! |
This issue was copied from checkedc/checkedc-clang#37
The Checked C specification has relative bounds expressions. We need to extend the IR to represent relative bounds expressions, add parsing support for that, and add typechecking for that.
The text was updated successfully, but these errors were encountered: