with correct width.
- PR2728.
Also, fix PR2727 test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55493
91177308-0d34-0410-b5e6-
96231b3b80d8
Result = ~Result;
break;
case UnaryOperator::OffsetOf:
+ Result.zextOrTrunc(static_cast<uint32_t>(Ctx.getTypeSize(getType())));
Result = Exp->evaluateOffsetOf(Ctx);
}
break;
+// RUN: clang -verify -fsyntax-only -std=c90 %s &&
+// RUN: clang -verify -fsyntax-only -std=c99 %s
+
int f (int x)
{
// sizeof applied to a type should not delete the type.
--- /dev/null
+// RUN: clang -verify -fsyntax-only -std=c90 %s &&
+// RUN: clang -verify -fsyntax-only -std=c99 %s
+
+struct s
+{
+ int a;
+};
+
+int a[__builtin_offsetof(struct s, a) == 0];