Skip to content

[-fms-extensions] Allow multiply derived types to override ambiguously named members #18003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
majnemer mannequin opened this issue Oct 21, 2013 · 6 comments
Open

[-fms-extensions] Allow multiply derived types to override ambiguously named members #18003

majnemer mannequin opened this issue Oct 21, 2013 · 6 comments
Labels
bugzilla Issues migrated from bugzilla c++11 clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party extension:microsoft

Comments

@majnemer
Copy link
Mannequin

majnemer mannequin commented Oct 21, 2013

Bugzilla Link 17629
Version trunk
OS All
Blocks #14079
CC @DougGregor,@timurrrr

Extended Description

Consider:

struct T1 {
  virtual int Foo() = 0;
};

struct T2 {
  virtual int Foo() = 0;
};

struct T3 : public virtual T1, public virtual T2 {
  virtual int T1::Foo() { return 19; }
  virtual int T2::Foo() { return 42; }
};

MSVC allows T1::Foo and T2::Foo to be overridden.

@majnemer
Copy link
Mannequin Author

majnemer mannequin commented Oct 21, 2013

This is documented here: http://msdn.microsoft.com/en-us/library/vstudio/ksek8777.aspx

@majnemer
Copy link
Mannequin Author

majnemer mannequin commented Oct 21, 2013

Furthermore, I believe that this extension is what permits them to allow extra qualifiers on members a la:

struct S {
  void S::fun() {}
}

@majnemer
Copy link
Mannequin Author

majnemer mannequin commented Feb 25, 2016

*** Bug llvm/llvm-bugzilla-archive#26735 has been marked as a duplicate of this bug. ***

@majnemer
Copy link
Mannequin Author

majnemer mannequin commented Nov 26, 2021

mentioned in issue llvm/llvm-bugzilla-archive#26735

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
@Endilll
Copy link
Contributor

Endilll commented Apr 27, 2025

Clang 21.0 still rejects this: https://godbolt.org/z/3dGE45PnK

@Endilll Endilll added clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party extension:microsoft labels Apr 27, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 27, 2025

@llvm/issue-subscribers-clang-frontend

Author: None (991901f3-cc14-4404-b340-165691b62a58)

| | | | --- | --- | | Bugzilla Link | [17629](https://llvm.org/bz17629) | | Version | trunk | | OS | All | | Blocks | llvm/llvm-project#14079 | | CC | @DougGregor,@timurrrr |

Extended Description

Consider:

struct T1 {
  virtual int Foo() = 0;
};

struct T2 {
  virtual int Foo() = 0;
};

struct T3 : public virtual T1, public virtual T2 {
  virtual int T1::Foo() { return 19; }
  virtual int T2::Foo() { return 42; }
};

MSVC allows T1::Foo and T2::Foo to be overridden.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla c++11 clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party extension:microsoft
Projects
None yet
Development

No branches or pull requests

2 participants