aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-23 14:40:17 +0000
committerGitHub <noreply@github.com>2021-05-23 14:40:17 +0000
commit0cad21085b5d2d5ee6c7a067ff54a1efa5f5ca38 (patch)
treed4dca907249ded4cb0343c8f74880a168a3bc32c
parent251536cdb29525d9ca6a6ba54abe40469f260a10 (diff)
parent5467ac12d7bfd204cd4f1712ecefcbb9bcab6af8 (diff)
parent9ca4faebe11908f3c634a36cd95db002152c3057 (diff)
parentfd95c6cec373a79b7dc0210a55398061666fe14a (diff)
downloadgcc-0cad21085b5d2d5ee6c7a067ff54a1efa5f5ca38.zip
gcc-0cad21085b5d2d5ee6c7a067ff54a1efa5f5ca38.tar.gz
gcc-0cad21085b5d2d5ee6c7a067ff54a1efa5f5ca38.tar.bz2
Merge #443 #444 #447
443: Fix raw identifier parsing. r=dkm a=dkm Lexer::parse_raw_identifier added the first character twice. Adds tests for a simple raw identifier, a keyword as raw identifier and xfail tests for a single underscore and forbidden keyword (crate) as raw identifier. To help error diagnostics continue after parse_raw_identifier failed in Lexer::build_token. Fixes: https://github.com/Rust-GCC/gccrs/issues/426 444: Initialize crateNumItr in rust-hir-map to zero. r=dkm a=dkm valgrind complains whenever a crate number is used because they are all derived from the initial crateNumItr in the rust-hir-map Mapping which is never initialized. This isn't technically a bug because all that is required is for crate numbers to be unique. But it could cause non-deterministic behaviour when crate numbers are used for sorting. And it makes the valgrind output really noisy. With this patch and configure --enable-valgrind-annotations running rust1 should not give any valgrind errors. 447: Mention the identifier that was unused in ScanUnused. r=dkm a=dkm The ScanUnused class would only mention some name was unused. Add the actual identifier name that is unused to help the user. Note that this warning might produce a similar warning as the ScanDeadcode class produces if the indentifier is a function. Co-authored-by: Mark Wielaard <mark@klomp.org>