Brymer Meneses and Jon Ross-Perkins
89eed4220f
Expose indexing as a language interface ( #4370 )
...
This PR makes it so that types can implement the `IndexWith` interface
so that they can provide their custom indexing behavior.
---------
Co-authored-by: Jon Ross-Perkins <jperkins@google.com >
2024-10-29 21:25:02 +00:00
Brymer Meneses
7f930d0f58
Use TupleAccess instead of TupleIndex ( #4318 )
...
This change removes the `TupleIndex` instruction, and instead
consolidate it with the `TupleAccess` instruction, per this
[discussion](https://discord.com/channels/655572317891461132/655578254970716160/1271195835975204946 ).
This change, in turn removes `AnyAggregateIndex`.
2024-09-17 20:26:48 +00:00
Brymer Meneses
da40c8b076
Improve access checking code ( #4317 )
...
This change accomplishes the TODOs for access checking. More
specifically it,
- makes `SemIR::AccessKind` formattable using `llvm::formatv`.
- makes use of `LookupUnqualifiedName` to find `Self`.
2024-09-17 20:26:07 +00:00
Brymer Meneses
6bfaa888e8
add additional testdata for access checks ( #4297 )
...
I just realized that
https://github.com/carbon-language/carbon-lang/pull/4248 should now
correctly enforce compound member access. This change adds tests for
this functionality.
2024-09-11 16:59:36 +00:00
Brymer Meneses
63ebc3df17
docs: add missing syntax highlighting ( #4289 )
2024-09-10 22:59:30 +00:00
Brymer Meneses
8ac9c80e87
Enforce private and protected access modifiers for class member access ( #4248 )
...
Print diagnostics for invalid class member access. This doesn't take
into account compound member access.
2024-09-10 16:35:07 +00:00
Brymer Meneses
435ee44e4c
Report invalid parse on var x: i32 = {.7 = 8} ( #4237 )
2024-08-22 16:21:46 +00:00
Brymer Meneses
34ae2b001b
move tuple testdata from index/ to tuple/access ( #4226 )
2024-08-19 16:47:14 +00:00
Brymer Meneses
c353f6bd78
change tuple index ( #4218 )
...
This changes the tuple index from tuple[0] to tuple.0 in accordance with
the accepted propsal
https://github.com/carbon-language/carbon-lang/pull/3646
I messed up syncing to trunk on my original PR
https://github.com/carbon-language/carbon-lang/pull/4186 , that's why I'm
starting on a blank state. Please let me know if I missed incorporating
a change from my prior PR.
2024-08-15 16:06:02 +00:00
Brymer Meneses
a227ea8074
add syntax highlighting for x-macro files ( #4205 )
...
This tells Github to detect files having the extension .def as C++
files, which ensures that these files get syntax highlighted prpperly.
I'm not sure whether more files like these are present throughout the
repo. FWIW, it can also be configured to do other things, such as detect
generated, vendored files and exclude these from the Github stats.
See
https://github.com/github-linguist/linguist/blob/master/docs/overrides.md .
2024-08-08 19:03:03 +00:00
Brymer Meneses
bf1106fc34
fix: clangd: -32001: invalid AST ( #4164 )
...
Ignore the `-march=*` in `compile_commands.json` which causes issues in
Neovim on Apple M2. This fix is from this
[comment](https://github.com/clangd/clangd/issues/1582#issuecomment-1500031372 )
2024-07-25 16:51:31 +00:00
Brymer Meneses
70c20be91b
docs: add a note on setting up clangd ( #4135 )
...
This PR adds a note on how to generate `compile_commands.json` which is
necessary for having `clangd` generate accurate diagnostics
2024-07-25 16:40:27 +00:00