Skip to content
Commit 8392f1cc authored by yronglin's avatar yronglin Committed by Aaron Ballman
Browse files

Fix __builtin_assume_aligned incorrect type descriptor and C++ object polymorphic address

Fix __builtin_assume_aligned incorrect type descriptor

example from @rsmith

struct A { int n; };
struct B { int n; };
struct C : A, B {};

void *f(C *c) {
  // Incorrectly returns `c` rather than the address of the B base class.
  return __builtin_assume_aligned((B*)c, 8);
}

Differential Revision: https://reviews.llvm.org/D133583
parent 00874c48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment