From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1643) id 7A9923858405; Fri, 22 Jul 2022 21:25:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A9923858405 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Thomas Schwinge To: gcc-cvs@gcc.gnu.org Subject: [gcc/devel/rust/master] Merge #1406 X-Act-Checkin: gcc X-Git-Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> X-Git-Refname: refs/heads/devel/rust/master X-Git-Oldrev: 15d4bdd84a7aca62bceb9dead770fd1df4759360 X-Git-Newrev: dec7ee4c5e703422ecb9bc94417645d66af7eaae Message-Id: <20220722212549.7A9923858405@sourceware.org> Date: Fri, 22 Jul 2022 21:25:49 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jul 2022 21:25:49 -0000 https://gcc.gnu.org/g:dec7ee4c5e703422ecb9bc94417645d66af7eaae commit dec7ee4c5e703422ecb9bc94417645d66af7eaae Merge: 15d4bdd84a7 8dc692afc2c Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com> Date: Fri Jul 22 13:40:06 2022 +0000 Merge #1406 1406: Add Attribute checking visitor r=CohenArthur a=CohenArthur This PR adds a new attribute checker visitor. Its role is to take care of validating builtin attributes and their inputs. This is currently a draft as there are multiple issues: 1. The visitor is not complete 2. The lexer is broken, but was also broken before in that it didn't allow multiline string literals. There is a FIXME asking for how to check for an `EOF` character when parsing UTF-8 strings 3. The checking of attributes is very limited. Currently, only the `#[doc(alias = "...")]` is being checked. This is incomplete. I'm looking for feedback on the implementation and advice for my issues. Thanks :) Co-authored-by: Arthur Cohen Diff: gcc/rust/hir/rust-ast-lower-base.cc | 2 + gcc/rust/lex/rust-codepoint.h | 4 +- gcc/rust/lex/rust-lex.cc | 49 +- gcc/rust/rust-session-manager.cc | 3 + gcc/rust/util/rust-attributes.cc | 767 +++++++++++++++++++++ gcc/rust/util/rust-attributes.h | 200 ++++++ .../rust/compile/torture/check-doc-attr-string.rs | 11 +- .../rust/compile/torture/undended-string-1.rs | 5 + .../rust/compile/torture/undended-string-2.rs | 5 + 9 files changed, 1023 insertions(+), 23 deletions(-)