Skip to content
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 method of binding an ErrorCode to parser errors #2385

Closed
philberty opened this issue Jul 6, 2023 · 1 comment · Fixed by #2542
Closed

Add method of binding an ErrorCode to parser errors #2385

philberty opened this issue Jul 6, 2023 · 1 comment · Fixed by #2542
Labels
diagnostic diagnostic static analysis

Comments

@philberty
Copy link
Member

we use an Error struct in rust-diagnostics.h

struct Error

This does not have the ability to store an Error code or Rich location so we cannot emit error codes for parser errors or expansion errors

@philberty philberty added the diagnostic diagnostic static analysis label Jul 6, 2023
@philberty philberty added this to the GCC 14 Stage 3 milestone Jul 6, 2023
@philberty
Copy link
Member Author

@MahadMuhammad ^^

MahadMuhammad added a commit to MahadMuhammad/gccrs that referenced this issue Aug 10, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
MahadMuhammad added a commit to MahadMuhammad/gccrs that referenced this issue Aug 10, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
MahadMuhammad added a commit to MahadMuhammad/gccrs that referenced this issue Aug 11, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
MahadMuhammad added a commit to MahadMuhammad/gccrs that referenced this issue Aug 11, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
github-merge-queue bot pushed a commit that referenced this issue Aug 16, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes #2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
@MahadMuhammad MahadMuhammad moved this from In Progress to Done Supported Error Codes in Error Code Support & Improving User Errors Aug 18, 2023
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Nov 15, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Nov 21, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Nov 21, 2023
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 5, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 8, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 9, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 11, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 12, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 16, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
CohenArthur pushed a commit to CohenArthur/gccrs that referenced this issue Jan 16, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
nstester pushed a commit to nstester/gcc that referenced this issue Jan 16, 2024
Added method of binding ErrorCode & rich location to
parser and expansion errors.
Fixes Rust-GCC/gccrs#2385

gcc/rust/ChangeLog:

	* rust-diagnostics.cc (va_constructor):
	Added constructor for all possible cases.
	(Error::Error): Updated error struct
	for all possible cases.
	* rust-diagnostics.h (struct Error):
	Updated error struct to support error
	code & rich location support.

Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostic diagnostic static analysis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant