diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-03-04 11:58:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 11:58:45 +0000 |
commit | d89c8ccf3237e66029125c0fe007297bb86eca74 (patch) | |
tree | 24926ddec8217cdba774a50eaa06383c8a72d13e /gcc/rust/rust-backend.h | |
parent | b4bd389c66a3e3bf0489626a1a70c2500d415ef8 (diff) | |
parent | d6e1771291c792f665f5b9ed7d065bf292051e6a (diff) | |
download | gcc-d89c8ccf3237e66029125c0fe007297bb86eca74.zip gcc-d89c8ccf3237e66029125c0fe007297bb86eca74.tar.gz gcc-d89c8ccf3237e66029125c0fe007297bb86eca74.tar.bz2 |
Merge #990
990: Add must use attribute support r=philberty a=philberty
This is a port of the CPP front-end nodiscard attribute to be used for
must_use. It contains a patch to clean up how we handle expressions vs
statements and removes more of the GCC abstraction. Its my hope that we
can leverage more and more existing code to get the static analysis where
we want it.
Fixes #856
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc/rust/rust-backend.h')
-rw-r--r-- | gcc/rust/rust-backend.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h index fe809c9..fca09b2 100644 --- a/gcc/rust/rust-backend.h +++ b/gcc/rust/rust-backend.h @@ -292,16 +292,13 @@ public: // Statements. - // Create an expression statement within the specified function. - virtual tree expression_statement (tree, tree) = 0; - // Create a variable initialization statement in the specified // function. This initializes a local variable at the point in the // program flow where it is declared. virtual tree init_statement (tree, Bvariable *var, tree init) = 0; // Create an assignment statement within the specified function. - virtual tree assignment_statement (tree, tree lhs, tree rhs, Location) = 0; + virtual tree assignment_statement (tree lhs, tree rhs, Location) = 0; // Create a return statement, passing the representation of the // function and the list of values to return. |