[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

Carlos Alberto Enciso via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 30 09:14:29 PDT 2017


CarlosAlbertoEnciso added a reviewer: tberghammer.
CarlosAlbertoEnciso added a comment.

Hi Tamas,

I have added you to this review, as I think I have found something odd with the LLDB.

Basically after this intended patch to the compiler (to emit scoped information only for scoped enums) the following test fail:

tools/lldb/packages/Python/lldbsuite/test/lang/cpp/template/TestTemplateArgs.py

I have saved the objects generated before and after the change for both 32/64bits mode.  The test case is checking for scoped information which is present in the debug information.

  def test_enum_args(self):
          frame = self.prepareProcess()
  
          # Make sure "member" can be displayed and also used in an expression
          # correctly
          member = frame.FindVariable('member')
          self.assertTrue(
              member.IsValid(),
              'make sure we find a local variabble named "member"')
          
          self.assertTrue(member.GetType().GetName() ==
                          'EnumTemplate<EnumType::Member>')

After some debugging, 'TestTemplateArgs.py' fails when retrieving the member type name, which is expected to have the 'EnumTemplate<EnumType::Member>'. As per my previous comment, that string is present; but the expression 'member.GetType().GetName()' returns just 'EnumTemplate<Member>' causing the test to fail.

I would appreciate it very much your feedback.

Thanks


https://reviews.llvm.org/D39239





More information about the cfe-commits mailing list