Skip to content

Commit 492b609

Browse files
authored
[clang][bytecode] Remove bogus Initializing special case (#159933)
This doesn't seem to be needed anymore and causes problems. Fixes #159787
1 parent 70ab120 commit 492b609

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,13 +2383,8 @@ bool Compiler<Emitter>::VisitMemberExpr(const MemberExpr *E) {
23832383
return this->visitDeclRef(Member, E);
23842384
}
23852385

2386-
if (Initializing) {
2387-
if (!this->delegate(Base))
2388-
return false;
2389-
} else {
2390-
if (!this->visit(Base))
2391-
return false;
2392-
}
2386+
if (!this->visit(Base))
2387+
return false;
23932388

23942389
// Base above gives us a pointer on the stack.
23952390
const auto *FD = cast<FieldDecl>(Member);

clang/test/AST/ByteCode/cxx03.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,9 @@ struct B2 : B {
4040
};
4141
_Static_assert(&(B2().a) == &p, ""); // both-error {{taking the address of a temporary object of type 'int'}} \
4242
// both-error {{not an integral constant expression}}
43+
44+
typedef __attribute__((ext_vector_type(4))) int vi4b;
45+
struct S {
46+
vi4b w;
47+
};
48+
const int s = S().w[1];

0 commit comments

Comments
 (0)