Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions clang/lib/AST/ByteCode/Compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2378,13 +2378,8 @@ bool Compiler<Emitter>::VisitMemberExpr(const MemberExpr *E) {
return this->visitDeclRef(Member, E);
}

if (Initializing) {
if (!this->delegate(Base))
return false;
} else {
if (!this->visit(Base))
return false;
}
if (!this->visit(Base))
return false;

// Base above gives us a pointer on the stack.
const auto *FD = cast<FieldDecl>(Member);
Expand Down
6 changes: 6 additions & 0 deletions clang/test/AST/ByteCode/cxx03.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,9 @@ struct B2 : B {
};
_Static_assert(&(B2().a) == &p, ""); // both-error {{taking the address of a temporary object of type 'int'}} \
// both-error {{not an integral constant expression}}

typedef __attribute__((ext_vector_type(4))) int vi4b;
struct S {
vi4b w;
};
const int s = S().w[1];