Skip to content

Commit

Permalink
gccrs: Implement initial pattern analysis pass.
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* Make-lang.in: Add rust-hir-pattern-analysis.o.
	* rust-session-manager.cc (Session::compile_crate):
		Add pattern analysis pass.
	* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
		Do typecheck for subpatterns.
	* checks/errors/rust-hir-pattern-analysis.cc: New file.
	* checks/errors/rust-hir-pattern-analysis.h: New file.

gcc/testsuite/ChangeLog:

	* rust/compile/exhaustiveness1.rs: New test.
	* rust/compile/exhaustiveness2.rs: New test.
	* rust/compile/exhaustiveness3.rs: New test.

Signed-off-by: Raiki Tamura <[email protected]>
  • Loading branch information
tamaroning authored and P-E-P committed Sep 11, 2024
1 parent 7e0feec commit 9941d6f
Show file tree
Hide file tree
Showing 8 changed files with 2,225 additions and 0 deletions.
1 change: 1 addition & 0 deletions gcc/rust/Make-lang.in
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ GRS_OBJS = \
rust/rust-readonly-check.o \
rust/rust-hir-type-check-path.o \
rust/rust-unsafe-checker.o \
rust/rust-hir-pattern-analysis.o \
rust/rust-compile-intrinsic.o \
rust/rust-compile-pattern.o \
rust/rust-compile-fnparam.o \
Expand Down
Loading

0 comments on commit 9941d6f

Please sign in to comment.