Skip to content

Commit 5c59637

Browse files
author
Jenkins
committed
merge main into amd-staging
Change-Id: I25ede7a76a65c73c0742928397dcf6fe0a453309
2 parents d2ddc3e + f0297ae commit 5c59637

File tree

32 files changed

+272
-171
lines changed

32 files changed

+272
-171
lines changed

clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,13 @@ sizeof...($TemplateParameter[[Elements]]);
10921092
$Field_dependentName[[waldo]];
10931093
}
10941094
};
1095+
)cpp",
1096+
// Pointer-to-member with nested-name-specifiers
1097+
R"cpp(
1098+
struct $Class_def[[Outer]] {
1099+
struct $Class_def[[Inner]] {};
1100+
};
1101+
using $Typedef_decl[[Alias]] = void ($Class[[Outer]]::$Class[[Inner]]:: *)();
10951102
)cpp"};
10961103
for (const auto &TestCase : TestCases)
10971104
// Mask off scope modifiers to keep the tests manageable.

clang/lib/CodeGen/BackendUtil.cpp

+6-7
Original file line numberDiff line numberDiff line change
@@ -789,13 +789,12 @@ static void addSanitizers(const Triple &TargetTriple,
789789
}
790790

791791
if (LowerAllowCheckPass::IsRequested()) {
792-
// We can optimize after inliner, and PGO profile matching. The hook below
793-
// is called at the end `buildFunctionSimplificationPipeline`, which called
794-
// from `buildInlinerPipeline`, which called after profile matching.
795-
PB.registerScalarOptimizerLateEPCallback(
796-
[](FunctionPassManager &FPM, OptimizationLevel Level) {
797-
FPM.addPass(LowerAllowCheckPass());
798-
});
792+
// We want to call it after inline, which is about OptimizerEarlyEPCallback.
793+
PB.registerOptimizerEarlyEPCallback([](ModulePassManager &MPM,
794+
OptimizationLevel Level,
795+
ThinOrFullLTOPhase Phase) {
796+
MPM.addPass(createModuleToFunctionPassAdaptor(LowerAllowCheckPass()));
797+
});
799798
}
800799
}
801800

clang/lib/Format/TokenAnnotator.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -3901,6 +3901,11 @@ bool TokenAnnotator::mustBreakForReturnType(const AnnotatedLine &Line) const {
39013901
}
39023902

39033903
void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const {
3904+
if (Line.Computed)
3905+
return;
3906+
3907+
Line.Computed = true;
3908+
39043909
for (AnnotatedLine *ChildLine : Line.Children)
39053910
calculateFormattingInformation(*ChildLine);
39063911

clang/lib/Format/TokenAnnotator.h

+3
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ class AnnotatedLine {
182182
/// \c True if this line contains a macro call for which an expansion exists.
183183
bool ContainsMacroCall = false;
184184

185+
/// \c True if calculateFormattingInformation() has been called on this line.
186+
bool Computed = false;
187+
185188
/// \c True if this line should be formatted, i.e. intersects directly or
186189
/// indirectly with one of the input ranges.
187190
bool Affected;

clang/lib/Sema/SemaType.cpp

+14-6
Original file line numberDiff line numberDiff line change
@@ -5347,15 +5347,23 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
53475347

53485348
case NestedNameSpecifier::TypeSpec:
53495349
case NestedNameSpecifier::TypeSpecWithTemplate:
5350-
ClsType = QualType(NNS->getAsType(), 0);
5350+
const Type *NNSType = NNS->getAsType();
5351+
ClsType = QualType(NNSType, 0);
53515352
// Note: if the NNS has a prefix and ClsType is a nondependent
5352-
// TemplateSpecializationType, then the NNS prefix is NOT included
5353-
// in ClsType; hence we wrap ClsType into an ElaboratedType.
5354-
// NOTE: in particular, no wrap occurs if ClsType already is an
5355-
// Elaborated, DependentName, or DependentTemplateSpecialization.
5356-
if (isa<TemplateSpecializationType>(NNS->getAsType()))
5353+
// TemplateSpecializationType or a RecordType, then the NNS prefix is
5354+
// NOT included in ClsType; hence we wrap ClsType into an
5355+
// ElaboratedType. NOTE: in particular, no wrap occurs if ClsType
5356+
// already is an Elaborated, DependentName, or
5357+
// DependentTemplateSpecialization.
5358+
if (isa<DependentTemplateSpecializationType>(NNSType)) {
5359+
// FIXME: Rebuild DependentTemplateSpecializationType, adding the
5360+
// Prefix.
5361+
} else if (isa<TemplateSpecializationType, RecordType>(NNSType)) {
5362+
// Either the dependent case (TemplateSpecializationType), or the
5363+
// non-dependent one (RecordType).
53575364
ClsType = Context.getElaboratedType(ElaboratedTypeKeyword::None,
53585365
NNSPrefix, ClsType);
5366+
}
53595367
break;
53605368
}
53615369
} else {

clang/test/AST/ast-dump-types-json.cpp

+30-12
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,24 @@ using ::TestUsingShadowDeclType;
248248
// CHECK-NEXT: "inner": [
249249
// CHECK-NEXT: {
250250
// CHECK-NEXT: "id": "0x{{.*}}",
251-
// CHECK-NEXT: "kind": "RecordType",
251+
// CHECK-NEXT: "kind": "ElaboratedType",
252252
// CHECK-NEXT: "type": {
253253
// CHECK-NEXT: "qualType": "T"
254254
// CHECK-NEXT: },
255-
// CHECK-NEXT: "decl": {
256-
// CHECK-NEXT: "id": "0x{{.*}}",
257-
// CHECK-NEXT: "kind": "CXXRecordDecl",
258-
// CHECK-NEXT: "name": "T"
259-
// CHECK-NEXT: }
255+
// CHECK-NEXT: "inner": [
256+
// CHECK-NEXT: {
257+
// CHECK-NEXT: "id": "0x{{.*}}",
258+
// CHECK-NEXT: "kind": "RecordType",
259+
// CHECK-NEXT: "type": {
260+
// CHECK-NEXT: "qualType": "T"
261+
// CHECK-NEXT: },
262+
// CHECK-NEXT: "decl": {
263+
// CHECK-NEXT: "id": "0x{{.*}}",
264+
// CHECK-NEXT: "kind": "CXXRecordDecl",
265+
// CHECK-NEXT: "name": "T"
266+
// CHECK-NEXT: }
267+
// CHECK-NEXT: }
268+
// CHECK-NEXT: ]
260269
// CHECK-NEXT: },
261270
// CHECK-NEXT: {
262271
// CHECK-NEXT: "id": "0x{{.*}}",
@@ -325,15 +334,24 @@ using ::TestUsingShadowDeclType;
325334
// CHECK-NEXT: "inner": [
326335
// CHECK-NEXT: {
327336
// CHECK-NEXT: "id": "0x{{.*}}",
328-
// CHECK-NEXT: "kind": "RecordType",
337+
// CHECK-NEXT: "kind": "ElaboratedType",
329338
// CHECK-NEXT: "type": {
330339
// CHECK-NEXT: "qualType": "T"
331340
// CHECK-NEXT: },
332-
// CHECK-NEXT: "decl": {
333-
// CHECK-NEXT: "id": "0x{{.*}}",
334-
// CHECK-NEXT: "kind": "CXXRecordDecl",
335-
// CHECK-NEXT: "name": "T"
336-
// CHECK-NEXT: }
341+
// CHECK-NEXT: "inner": [
342+
// CHECK-NEXT: {
343+
// CHECK-NEXT: "id": "0x{{.*}}",
344+
// CHECK-NEXT: "kind": "RecordType",
345+
// CHECK-NEXT: "type": {
346+
// CHECK-NEXT: "qualType": "T"
347+
// CHECK-NEXT: },
348+
// CHECK-NEXT: "decl": {
349+
// CHECK-NEXT: "id": "0x{{.*}}",
350+
// CHECK-NEXT: "kind": "CXXRecordDecl",
351+
// CHECK-NEXT: "name": "T"
352+
// CHECK-NEXT: }
353+
// CHECK-NEXT: }
354+
// CHECK-NEXT: ]
337355
// CHECK-NEXT: },
338356
// CHECK-NEXT: {
339357
// CHECK-NEXT: "id": "0x{{.*}}",

clang/test/CXX/conv/conv.mem/p4.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ namespace test0 {
1919
namespace test1 {
2020
struct Derived : private Base {}; // expected-note 2 {{declared private here}}
2121
void test() {
22-
int (Derived::*d) = data_ptr; // expected-error {{cannot cast private base class 'Base' to 'test1::Derived'}}
23-
int (Derived::*m)() = method_ptr; // expected-error {{cannot cast private base class 'Base' to 'test1::Derived'}}
22+
int (Derived::*d) = data_ptr; // expected-error {{cannot cast private base class 'Base' to 'Derived'}}
23+
int (Derived::*m)() = method_ptr; // expected-error {{cannot cast private base class 'Base' to 'Derived'}}
2424
}
2525
};
2626

@@ -30,17 +30,17 @@ namespace test2 {
3030
struct B : Base {};
3131
struct Derived : A, B {};
3232
void test() {
33-
int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test2::Derived':}}
34-
int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test2::Derived':}}
33+
int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'Derived':}}
34+
int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'Derived':}}
3535
}
3636
}
3737

3838
// Can't be virtual.
3939
namespace test3 {
4040
struct Derived : virtual Base {};
4141
void test() {
42-
int (Derived::*d) = data_ptr; // expected-error {{conversion from pointer to member of class 'Base' to pointer to member of class 'test3::Derived' via virtual base 'Base' is not allowed}}
43-
int (Derived::*m)() = method_ptr; // expected-error {{conversion from pointer to member of class 'Base' to pointer to member of class 'test3::Derived' via virtual base 'Base' is not allowed}}
42+
int (Derived::*d) = data_ptr; // expected-error {{conversion from pointer to member of class 'Base' to pointer to member of class 'Derived' via virtual base 'Base' is not allowed}}
43+
int (Derived::*m)() = method_ptr; // expected-error {{conversion from pointer to member of class 'Base' to pointer to member of class 'Derived' via virtual base 'Base' is not allowed}}
4444
}
4545
}
4646

@@ -49,8 +49,8 @@ namespace test4 {
4949
struct A : Base {};
5050
struct Derived : Base, virtual A {}; // expected-warning {{direct base 'Base' is inaccessible due to ambiguity:\n struct test4::Derived -> Base\n struct test4::Derived -> A -> Base}}
5151
void test() {
52-
int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test4::Derived':}}
53-
int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'test4::Derived':}}
52+
int (Derived::*d) = data_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'Derived':}}
53+
int (Derived::*m)() = method_ptr; // expected-error {{ambiguous conversion from pointer to member of base class 'Base' to pointer to member of derived class 'Derived':}}
5454
}
5555
}
5656

clang/test/CXX/drs/cwg0xx.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ namespace cwg54 { // cwg54: 2.8
858858
// expected-error@-1 {{cannot cast 'struct B' to its private base class 'A'}}
859859
// expected-note@#cwg54-B {{declared private here}}
860860
int A::*smab = static_cast<int A::*>(&B::b);
861-
// expected-error@-1 {{cannot cast 'cwg54::B' to its private base class 'cwg54::A'}}
861+
// expected-error@-1 {{cannot cast 'cwg54::B' to its private base class 'A'}}
862862
// expected-note@#cwg54-B {{declared private here}}
863863
B &sba = static_cast<B&>(a);
864864
// expected-error@-1 {{cannot cast private base class 'cwg54::A' to 'cwg54::B'}}
@@ -867,19 +867,19 @@ namespace cwg54 { // cwg54: 2.8
867867
// expected-error@-1 {{cannot cast private base class 'cwg54::A' to 'cwg54::B'}}
868868
// expected-note@#cwg54-B {{declared private here}}
869869
int B::*smba = static_cast<int B::*>(&A::a);
870-
// expected-error@-1 {{cannot cast private base class 'cwg54::A' to 'cwg54::B'}}
870+
// expected-error@-1 {{cannot cast private base class 'cwg54::A' to 'B'}}
871871
// expected-note@#cwg54-B {{declared private here}}
872872

873873
V &svb = static_cast<V&>(b);
874874
V *spvb = static_cast<V*>(&b);
875875
int V::*smvb = static_cast<int V::*>(&B::b);
876-
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::B' to pointer to member of class 'cwg54::V' via virtual base 'cwg54::V' is not allowed}}
876+
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::B' to pointer to member of class 'V' via virtual base 'cwg54::V' is not allowed}}
877877
B &sbv = static_cast<B&>(v);
878878
// expected-error@-1 {{cannot cast 'struct V' to 'B &' via virtual base 'cwg54::V'}}
879879
B *spbv = static_cast<B*>(&v);
880880
// expected-error@-1 {{cannot cast 'cwg54::V *' to 'B *' via virtual base 'cwg54::V'}}
881881
int B::*smbv = static_cast<int B::*>(&V::v);
882-
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::V' to pointer to member of class 'cwg54::B' via virtual base 'cwg54::V' is not allowed}}
882+
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::V' to pointer to member of class 'B' via virtual base 'cwg54::V' is not allowed}}
883883

884884
A &cab = (A&)(b);
885885
A *cpab = (A*)(&b);
@@ -891,13 +891,13 @@ namespace cwg54 { // cwg54: 2.8
891891
V &cvb = (V&)(b);
892892
V *cpvb = (V*)(&b);
893893
int V::*cmvb = (int V::*)(&B::b);
894-
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::B' to pointer to member of class 'cwg54::V' via virtual base 'cwg54::V' is not allowed}}
894+
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::B' to pointer to member of class 'V' via virtual base 'cwg54::V' is not allowed}}
895895
B &cbv = (B&)(v);
896896
// expected-error@-1 {{cannot cast 'struct V' to 'B &' via virtual base 'cwg54::V'}}
897897
B *cpbv = (B*)(&v);
898898
// expected-error@-1 {{cannot cast 'cwg54::V *' to 'B *' via virtual base 'cwg54::V'}}
899899
int B::*cmbv = (int B::*)(&V::v);
900-
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::V' to pointer to member of class 'cwg54::B' via virtual base 'cwg54::V' is not allowed}}
900+
// expected-error@-1 {{conversion from pointer to member of class 'cwg54::V' to pointer to member of class 'B' via virtual base 'cwg54::V' is not allowed}}
901901
}
902902

903903
namespace cwg55 { // cwg55: yes

clang/test/CXX/drs/cwg13xx.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ namespace cwg1330 { // cwg1330: 4 c++11
204204
// since-cxx17-note@-2 {{use 'noexcept(false)' instead}}
205205
void (A::*af2)() throw() = &A::f;
206206
// cxx98-14-error@-1 {{target exception specification is not superset of source}}
207-
// since-cxx17-error@-2 {{cannot initialize a variable of type 'void (cwg1330::A::*)() throw()' with an rvalue of type 'void (cwg1330::A::*)() throw(T)': different exception specifications}}
207+
// since-cxx17-error@-2 {{cannot initialize a variable of type 'void (A::*)() throw()' with an rvalue of type 'void (cwg1330::A::*)() throw(T)': different exception specifications}}
208208

209209
#if __cplusplus >= 201103L
210210
static_assert(noexcept(A().g()), "");

clang/test/CXX/drs/cwg3xx.cpp

+14-14
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ namespace cwg330 { // cwg330: 7
537537
void f(A *a) {
538538
(void) reinterpret_cast<B1*>(a);
539539
(void) reinterpret_cast<B2*>(a);
540-
// expected-error@-1 {{ISO C++ does not allow reinterpret_cast from 'A *' (aka 'const volatile int (*)[1][2][3]') to 'B2 *' (aka 'int *const cwg330::swift_17882::X::***') because it casts away qualifiers, even though the source and destination types are unrelated}}
540+
// expected-error@-1 {{ISO C++ does not allow reinterpret_cast from 'A *' (aka 'const volatile int (*)[1][2][3]') to 'B2 *' (aka 'int *const X::***') because it casts away qualifiers, even though the source and destination types are unrelated}}
541541
(void) reinterpret_cast<B3*>(a);
542-
// expected-error@-1 {{ISO C++ does not allow reinterpret_cast from 'A *' (aka 'const volatile int (*)[1][2][3]') to 'B3 *' (aka 'int *cwg330::swift_17882::X::*volatile **') because it casts away qualifiers, even though the source and destination types are unrelated}}
542+
// expected-error@-1 {{ISO C++ does not allow reinterpret_cast from 'A *' (aka 'const volatile int (*)[1][2][3]') to 'B3 *' (aka 'int *X::*volatile **') because it casts away qualifiers, even though the source and destination types are unrelated}}
543543
(void) reinterpret_cast<B4*>(a);
544544
}
545545
}
@@ -971,9 +971,9 @@ namespace cwg354 { // cwg354: yes c++11
971971
ptr<(int S::*)0> p3; // #cwg354-p3
972972
// cxx98-error@#cwg354-p3 {{non-type template argument does not refer to any declaration}}
973973
// cxx98-note@#cwg354-ptr {{template parameter is declared here}}
974-
// cxx11-14-error@#cwg354-p3 {{null non-type template argument of type 'int cwg354::S::*' does not match template parameter of type 'int *'}}
974+
// cxx11-14-error@#cwg354-p3 {{null non-type template argument of type 'int S::*' does not match template parameter of type 'int *'}}
975975
// cxx11-14-note@#cwg354-ptr {{template parameter is declared here}}
976-
// since-cxx17-error@#cwg354-p3 {{value of type 'int cwg354::S::*' is not implicitly convertible to 'int *'}}
976+
// since-cxx17-error@#cwg354-p3 {{value of type 'int S::*' is not implicitly convertible to 'int *'}}
977977

978978
template<int*> int both(); // #cwg354-both-int-ptr
979979
template<int> int both(); // #cwg354-both-int
@@ -985,25 +985,25 @@ namespace cwg354 { // cwg354: yes c++11
985985

986986
template<int S::*> struct ptr_mem {}; // #cwg354-ptr_mem
987987
ptr_mem<0> m0; // #cwg354-m0
988-
// cxx98-error@#cwg354-m0 {{non-type template argument of type 'int' cannot be converted to a value of type 'int cwg354::S::*'}}
988+
// cxx98-error@#cwg354-m0 {{non-type template argument of type 'int' cannot be converted to a value of type 'int S::*'}}
989989
// cxx98-note@#cwg354-ptr_mem {{template parameter is declared here}}
990-
// cxx11-14-error@#cwg354-m0 {{null non-type template argument must be cast to template parameter type 'int cwg354::S::*'}}
990+
// cxx11-14-error@#cwg354-m0 {{null non-type template argument must be cast to template parameter type 'int S::*'}}
991991
// cxx11-14-note@#cwg354-ptr_mem {{template parameter is declared here}}
992-
// since-cxx17-error@#cwg354-m0 {{conversion from 'int' to 'int cwg354::S::*' is not allowed in a converted constant expression}}
992+
// since-cxx17-error@#cwg354-m0 {{conversion from 'int' to 'int S::*' is not allowed in a converted constant expression}}
993993
ptr_mem<(int S::*)0> m1;
994994
// cxx98-error@-1 {{non-type template argument is not a pointer to member constant}}
995995
ptr_mem<(float S::*)0> m2; // #cwg354-m2
996-
// cxx98-error@#cwg354-m2 {{non-type template argument of type 'float cwg354::S::*' cannot be converted to a value of type 'int cwg354::S::*'}}
996+
// cxx98-error@#cwg354-m2 {{non-type template argument of type 'float S::*' cannot be converted to a value of type 'int S::*'}}
997997
// cxx98-note@#cwg354-ptr_mem {{template parameter is declared here}}
998-
// cxx11-14-error@#cwg354-m2 {{null non-type template argument of type 'float cwg354::S::*' does not match template parameter of type 'int cwg354::S::*'}}
998+
// cxx11-14-error@#cwg354-m2 {{null non-type template argument of type 'float S::*' does not match template parameter of type 'int S::*'}}
999999
// cxx11-14-note@#cwg354-ptr_mem {{template parameter is declared here}}
1000-
// since-cxx17-error@#cwg354-m2 {{value of type 'float cwg354::S::*' is not implicitly convertible to 'int cwg354::S::*'}}
1000+
// since-cxx17-error@#cwg354-m2 {{value of type 'float S::*' is not implicitly convertible to 'int S::*'}}
10011001
ptr_mem<(int *)0> m3; // #cwg354-m3
1002-
// cxx98-error@#cwg354-m3 {{non-type template argument of type 'int *' cannot be converted to a value of type 'int cwg354::S::*'}}
1002+
// cxx98-error@#cwg354-m3 {{non-type template argument of type 'int *' cannot be converted to a value of type 'int S::*'}}
10031003
// cxx98-note@#cwg354-ptr_mem {{template parameter is declared here}}
1004-
// cxx11-14-error@#cwg354-m3 {{null non-type template argument of type 'int *' does not match template parameter of type 'int cwg354::S::*'}}
1004+
// cxx11-14-error@#cwg354-m3 {{null non-type template argument of type 'int *' does not match template parameter of type 'int S::*'}}
10051005
// cxx11-14-note@#cwg354-ptr_mem {{template parameter is declared here}}
1006-
// since-cxx17-error@#cwg354-m3 {{value of type 'int *' is not implicitly convertible to 'int cwg354::S::*'}}
1006+
// since-cxx17-error@#cwg354-m3 {{value of type 'int *' is not implicitly convertible to 'int S::*'}}
10071007
}
10081008

10091009
struct cwg355_S; // cwg355: yes
@@ -1701,7 +1701,7 @@ namespace cwg395 { // cwg395: 3.0
17011701
}
17021702
} null1;
17031703
int (S::*p)() = null1;
1704-
// expected-error@-1 {{no viable conversion from 'struct null1_t' to 'int (cwg395::S::*)()'}}
1704+
// expected-error@-1 {{no viable conversion from 'struct null1_t' to 'int (S::*)()'}}
17051705
// expected-note@#cwg395-conv-func {{candidate template ignored: couldn't infer template argument 'T'}}
17061706

17071707
template <typename T> using id = T;

clang/test/CXX/drs/cwg4xx.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1172,11 +1172,11 @@ namespace cwg480 { // cwg480: yes
11721172

11731173
int A::*a = &A::n;
11741174
int D::*b = a;
1175-
// expected-error@-1 {{conversion from pointer to member of class 'cwg480::A' to pointer to member of class 'cwg480::D' via virtual base 'cwg480::B' is not allowed}}
1175+
// expected-error@-1 {{conversion from pointer to member of class 'A' to pointer to member of class 'D' via virtual base 'cwg480::B' is not allowed}}
11761176

11771177
extern int D::*c;
11781178
int A::*d = static_cast<int A::*>(c);
1179-
// expected-error@-1 {{conversion from pointer to member of class 'cwg480::D' to pointer to member of class 'cwg480::A' via virtual base 'cwg480::B' is not allowed}}
1179+
// expected-error@-1 {{conversion from pointer to member of class 'cwg480::D' to pointer to member of class 'A' via virtual base 'cwg480::B' is not allowed}}
11801180

11811181
D *e;
11821182
A *f = e;

0 commit comments

Comments
 (0)