OSDN Git Service

llvm-undname: More coverage-related cleanups
authorNico Weber <nicolasweber@gmx.de>
Tue, 4 Jun 2019 18:49:05 +0000 (18:49 +0000)
committerNico Weber <nicolasweber@gmx.de>
Tue, 4 Jun 2019 18:49:05 +0000 (18:49 +0000)
commiteef66d3ad4800cf30c265a96371ecce6a6a8a7c2
treec1fc2926a46756edf1ec3d93120e8046b25213f3
parenta3957457504981bd3e1ee5bee82fae03af5978c5
llvm-undname: More coverage-related cleanups

- The loop in demangleFunctionParameterList() only exits
  on Error, @, and Z. All 3 cases were handled, so the
  rest of the function is DEMANGLE_UNREACHABLE.

- The loop in demangleTemplateParameterList() always returns
  on Error, so there's no need to check for that in the loop
  header and after the loop.

- Add test cases for invalid function parameter manglings.

- Add a (redundant) test case for a simple template parameter
  list mangling.

- Add a test case pointing out that varargs functions aren't
  demangled correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362540 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Demangle/MicrosoftDemangle.cpp
test/Demangle/invalid-manglings.test
test/Demangle/ms-basic.test
test/Demangle/ms-templates.test