llvm-undname: Several behavior-preserving changes to increase coverage
authorNico Weber <nicolasweber@gmx.de>
Tue, 4 Jun 2019 15:13:30 +0000 (15:13 +0000)
committerNico Weber <nicolasweber@gmx.de>
Tue, 4 Jun 2019 15:13:30 +0000 (15:13 +0000)
commit880d21d3cbfd143f11c2bd2f5a5d6b46bfcb1a70
treefe1fa795d9e105f13b72fd448185ddf72458bf90
parentc5fe030c166b0fee57b7a5dfea20f24f4571fe29
llvm-undname: Several behavior-preserving changes to increase coverage

- Replace `Error = true` in a few branches that are truly unreachable
  with DEMANGLE_UNREACHABLE

- Remove early return early in startsWithLocalScopePattern() because
  it's redundant with the next two early returns

- Remove unreachable `case '0'` (it's handled in the branch below)

- Remove an unused bool return

- Add test coverage for several early error returns, mostly in
  array type parsing

llvm-svn: 362506
llvm/lib/Demangle/MicrosoftDemangle.cpp
llvm/lib/Demangle/MicrosoftDemangleNodes.cpp
llvm/test/Demangle/invalid-manglings.test
llvm/test/Demangle/ms-basic.test