-
Notifications
You must be signed in to change notification settings - Fork 5
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
Multi-decl overhaul (including inline struct fixes) #657
Commits on Sep 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for eeab8d1 - Browse repository at this point
Copy the full SHA eeab8d1View commit details -
Use rewriteSourceRange instead of R.RemoveText for its extra
functionality.
Configuration menu - View commit details
-
Copy full SHA for b7a119a - Browse repository at this point
Copy the full SHA b7a119aView commit details -
Configuration menu - View commit details
-
Copy full SHA for dcf9da0 - Browse repository at this point
Copy the full SHA dcf9da0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4bf6ff9 - Browse repository at this point
Copy the full SHA 4bf6ff9View commit details -
Remove all the old workarounds for unnamed structs.
Now that we automatically name them: - When -alltypes is on, we no longer need to warn that the multi-decl may be rewritten incorrectly. - When -alltypes is off, we no longer generate constraints to try to avoid the need to rewrite the multi-decl at all. InlineStructDetector did one thing unrelated to its name: it constrained all union fields wild. Move that logic to ProgramInfo::addVariable, make the constraint reason message more specific, and update root_cause.c to expect the new message.
Configuration menu - View commit details
-
Copy full SHA for 8184556 - Browse repository at this point
Copy the full SHA 8184556View commit details -
Configuration menu - View commit details
-
Copy full SHA for c2ea286 - Browse repository at this point
Copy the full SHA c2ea286View commit details -
Configuration menu - View commit details
-
Copy full SHA for 17de215 - Browse repository at this point
Copy the full SHA 17de215View commit details -
Stop mkString from producing the extra space in
int * x[10]
.The problem already affected several regression tests for more complex cases (which expected the extra space), and we didn't seem to notice or care. But now it is affecting every unchanged variable of that form in a multi-decl that gets rewritten, and this broke several other regression tests.
Configuration menu - View commit details
-
Copy full SHA for 9dc4968 - Browse repository at this point
Copy the full SHA 9dc4968View commit details -
Minimal fix to detect inline structs nested in other structs so
multi-decl rewriting splits them rather than losing them. Fixes #531 except for a "declaration does not declare anything" compiler warning that will be addressed by de-nesting the inline structs.
Configuration menu - View commit details
-
Copy full SHA for fb819ef - Browse repository at this point
Copy the full SHA fb819efView commit details -
Use the
EndLoc
variable like I meant to.A fixup to "Get the correct form...".
Configuration menu - View commit details
-
Copy full SHA for 20b23b8 - Browse repository at this point
Copy the full SHA 20b23b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9af2fe9 - Browse repository at this point
Copy the full SHA 9af2fe9View commit details -
Multi-decl rewriting should not try to split a struct forward
declaration as if it were a definition. Fixes #644.
Configuration menu - View commit details
-
Copy full SHA for 500d870 - Browse repository at this point
Copy the full SHA 500d870View commit details -
New multi-decl detector + typedef multi-decl support.
The existing regression tests pass, but more testing is needed.
Configuration menu - View commit details
-
Copy full SHA for 52db941 - Browse repository at this point
Copy the full SHA 52db941View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4c4ad1 - Browse repository at this point
Copy the full SHA a4c4ad1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 843cad0 - Browse repository at this point
Copy the full SHA 843cad0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 755f651 - Browse repository at this point
Copy the full SHA 755f651View commit details -
Actually lift the constraint of typedef multi-decls to wild: oops.
Delete the test of "Unable to rewrite a typedef with multiple names" from root_cause.c because that case no longer causes wildness. (I think it makes sense to just delete the test.)
Configuration menu - View commit details
-
Copy full SHA for faf5006 - Browse repository at this point
Copy the full SHA faf5006View commit details -
Fix the check for a typedef that exactly matches the inline struct type.
Now that this case works, add a few tests of it.
Configuration menu - View commit details
-
Copy full SHA for d3a48d6 - Browse repository at this point
Copy the full SHA d3a48d6View commit details -
Add tests of typedef multi-decl rewriting without inline structs.
In the process, fix a bug that I found in the lookup of the type of an unchanged typedef.
Configuration menu - View commit details
-
Copy full SHA for 8839ad1 - Browse repository at this point
Copy the full SHA 8839ad1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6bbf9ca - Browse repository at this point
Copy the full SHA 6bbf9caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 51e777a - Browse repository at this point
Copy the full SHA 51e777aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f69ae8 - Browse repository at this point
Copy the full SHA 5f69ae8View commit details -
Configuration menu - View commit details
-
Copy full SHA for c91ba7b - Browse repository at this point
Copy the full SHA c91ba7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ff1ae35 - Browse repository at this point
Copy the full SHA ff1ae35View commit details -
Configuration menu - View commit details
-
Copy full SHA for ccdc611 - Browse repository at this point
Copy the full SHA ccdc611View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4de64f7 - Browse repository at this point
Copy the full SHA 4de64f7View commit details
Commits on Sep 15, 2021
-
- Dealing with Checked C annotations in rewriteMultiDecl - Use mkString only when BaseTypeRenamed, otherwise use Decl::print - Factor out buildDeclVar
Configuration menu - View commit details
-
Copy full SHA for 6032aaf - Browse repository at this point
Copy the full SHA 6032aafView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6fb03df - Browse repository at this point
Copy the full SHA 6fb03dfView commit details -
macro_end_of_decl.c: Change the expected output for g1 back to match the
Decl::print code path.
Configuration menu - View commit details
-
Copy full SHA for d926bd6 - Browse repository at this point
Copy the full SHA d926bd6View commit details
Commits on Sep 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 56d7303 - Browse repository at this point
Copy the full SHA 56d7303View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3666d95 - Browse repository at this point
Copy the full SHA 3666d95View commit details -
Configuration menu - View commit details
-
Copy full SHA for cd6cccb - Browse repository at this point
Copy the full SHA cd6cccbView commit details
Commits on Sep 17, 2021
-
3
Configuration menu - View commit details
-
Copy full SHA for e8ad64c - Browse repository at this point
Copy the full SHA e8ad64cView commit details
Commits on Sep 23, 2021
-
Mainly about possible references to an automatically generated name in a multi-decl that wasn't rewritten.
Configuration menu - View commit details
-
Copy full SHA for 8d1735a - Browse repository at this point
Copy the full SHA 8d1735aView commit details -
Don't generate a multi-decl of all decls with invalid source locations.
This wasn't causing a problem yet, but it seems sensible not to do it.
Configuration menu - View commit details
-
Copy full SHA for ae9e314 - Browse repository at this point
Copy the full SHA ae9e314View commit details -
Comment on the two changes I decided not to make:
- Using T in `typedef struct T_struct { ... } T` - DeclReplacement::getSourceRange removal Other minor changes.
Configuration menu - View commit details
-
Copy full SHA for 740390e - Browse repository at this point
Copy the full SHA 740390eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e6a0d4d - Browse repository at this point
Copy the full SHA e6a0d4dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e89ece7 - Browse repository at this point
Copy the full SHA e89ece7View commit details -
Remove the mkString fixes from this PR.
They are no longer important to have in this PR now that I have switched unchanged multi-decl members back from mkString to Decl::print in most cases. I can submit the fixes in a separate PR if we like, or we can hold off and maybe we'll do a broader overhaul of mkString.
Configuration menu - View commit details
-
Copy full SHA for d75748f - Browse repository at this point
Copy the full SHA d75748fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 77145eb - Browse repository at this point
Copy the full SHA 77145ebView commit details -
Add some tests to itypes_for_extern.c.
Fix a bug I found that would generate an itype where the unchecked and checked sides are identical.
Configuration menu - View commit details
-
Copy full SHA for d3220b2 - Browse repository at this point
Copy the full SHA d3220b2View commit details
Commits on Sep 24, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 86b1acc - Browse repository at this point
Copy the full SHA 86b1accView commit details -
Also add documentation of the (narrow) circumstances in which mkStringForDeclWithUnchangedType interacts with ItypesForExtern to the code as well as the tests.
Configuration menu - View commit details
-
Copy full SHA for 74685c6 - Browse repository at this point
Copy the full SHA 74685c6View commit details -
Merge branch 'main' of github.com:correctcomputation/checkedc-clang i…
…nto inline-struct-fixes
Configuration menu - View commit details
-
Copy full SHA for 2073f33 - Browse repository at this point
Copy the full SHA 2073f33View commit details
Commits on Sep 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 13c0d77 - Browse repository at this point
Copy the full SHA 13c0d77View commit details -
Merge branch 'main' of github.com:correctcomputation/checkedc-clang i…
…nto inline-struct-fixes
Configuration menu - View commit details
-
Copy full SHA for 0d578bc - Browse repository at this point
Copy the full SHA 0d578bcView commit details
Commits on Sep 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for e594faa - Browse repository at this point
Copy the full SHA e594faaView commit details
Commits on Sep 30, 2021
-
Configuration menu - View commit details
-
Copy full SHA for c9888f2 - Browse repository at this point
Copy the full SHA c9888f2View commit details
Commits on Oct 15, 2021
-
Fix bugs with automatic naming of structs in shared header files.
3C saved the assigned name but neglected to set BaseTypeRenamed or TagDefToSplit correctly in translation units after the first. TODO: Add regression tests.
Configuration menu - View commit details
-
Copy full SHA for 220234c - Browse repository at this point
Copy the full SHA 220234cView commit details
Commits on Oct 20, 2021
-
Fix TagDecl de-nesting when the outer TagDecl is preceded by qualifiers.
TODO: Add regression tests.
Configuration menu - View commit details
-
Copy full SHA for 0c2b38c - Browse repository at this point
Copy the full SHA 0c2b38cView commit details
Commits on Oct 22, 2021
-
Use PrintingPolicy to exclude any initializer when printing a VarDecl.
This is much nicer than temporarily mutating the VarDecl to remove the initializer.
Configuration menu - View commit details
-
Copy full SHA for d3de950 - Browse repository at this point
Copy the full SHA d3de950View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7ae158 - Browse repository at this point
Copy the full SHA f7ae158View commit details -
Merge branch 'main' of github.com:correctcomputation/checkedc-clang i…
…nto inline-struct-fixes
Configuration menu - View commit details
-
Copy full SHA for f18cc23 - Browse repository at this point
Copy the full SHA f18cc23View commit details -
Configuration menu - View commit details
-
Copy full SHA for d437bad - Browse repository at this point
Copy the full SHA d437badView commit details
Commits on Nov 12, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 4c85580 - Browse repository at this point
Copy the full SHA 4c85580View commit details
Commits on Nov 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 5ed5ad3 - Browse repository at this point
Copy the full SHA 5ed5ad3View commit details -
Configuration menu - View commit details
-
Copy full SHA for eea9b94 - Browse repository at this point
Copy the full SHA eea9b94View commit details -
Merge branch 'main' of github.com:correctcomputation/checkedc-clang i…
…nto inline-struct-fixes
Configuration menu - View commit details
-
Copy full SHA for 36e262a - Browse repository at this point
Copy the full SHA 36e262aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab2d1a5 - Browse repository at this point
Copy the full SHA ab2d1a5View commit details
Commits on Nov 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 0bbfe7f - Browse repository at this point
Copy the full SHA 0bbfe7fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a83daa6 - Browse repository at this point
Copy the full SHA a83daa6View commit details
Commits on Nov 18, 2021
-
Configuration menu - View commit details
-
Copy full SHA for bc9f3bc - Browse repository at this point
Copy the full SHA bc9f3bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a58731 - Browse repository at this point
Copy the full SHA 2a58731View commit details
Commits on Nov 19, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 31b82a6 - Browse repository at this point
Copy the full SHA 31b82a6View commit details -
Configuration menu - View commit details
-
Copy full SHA for aff9f80 - Browse repository at this point
Copy the full SHA aff9f80View commit details -
Configuration menu - View commit details
-
Copy full SHA for f7ff59f - Browse repository at this point
Copy the full SHA f7ff59fView commit details