This is an archive of the discontinued LLVM Phabricator instance.

[LLDB] Fix compilation for MinGW, remove redundant class name on inline member
ClosedPublic

Authored by mstorsjo on Sep 20 2019, 1:09 PM.

Details

Summary

This fixes build errors like these:

NativeRegisterContextWindows.h:22:33: error: extra qualification on member 'NativeRegisterContextWindows'
  NativeRegisterContextWindows::NativeRegisterContextWindows(
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Sep 20 2019, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2019, 1:09 PM
davide accepted this revision.Sep 20 2019, 1:13 PM
davide added a subscriber: davide.

If this doesn't break clang and gcc, fine.

This revision is now accepted and ready to land.Sep 20 2019, 1:13 PM

If this doesn't break clang and gcc, fine.

FWIW, it was with clang that I ran into it, haven't tested building lldb with gcc.

But the issue can be tested with a snippet like this:

class Foo {
public: 
        Foo::Foo() {}
};

With MSVC, this passes fine without any warnings. With clang-cl (or plain clang with an msvc target), it builds but warns (-Wmicrosoft-extra-qualification), with gcc it's an error (that can be waived with -fpermissive), and with clang a non-msvc target, it's an unrecoverable error.

Just keep an eye on the bots as they might start whining
http://green.lab.llvm.org/green/

otherwise, just go ahead.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 21 2019, 12:08 PM