2 Commits

Author SHA1 Message Date
Nikita Popov
f098fb69f1 [Clang] Convert some tests to opaque pointers (NFC) 2023-02-17 14:26:07 +01:00
yronglin
8392f1cc78 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
2022-09-20 12:35:18 -04:00