isIncompleteType() returns true or false for template types depending on whether
the type is instantiated yet. In this context, that's arbitrary. The better way
to check for a complete type is RequireCompleteType().
Thanks to Eli Friedman for noticing this!
<rdar://problem/
12700799>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177768
91177308-0d34-0410-b5e6-
96231b3b80d8
InputConstraintInfos.push_back(Info);
const Type *Ty = Exprs[i]->getType().getTypePtr();
- if (Ty->isDependentType() || Ty->isIncompleteType())
+ if (Ty->isDependentType() ||
+ RequireCompleteType(InputExpr->getLocStart(),
+ Exprs[i]->getType(), 0))
continue;
unsigned Size = Context.getTypeSize(Ty);
typedef unsigned long long u_int64_t;
typedef u_int64_t uint64_t;
-int func() {
+int func1() {
// Error out if size is > 32-bits.
uint32_t msr = 0x8b;
uint64_t val = 0;
unsigned int port;
__asm__ volatile("outb %0, %w1" : : "a" (data), "Nd" (port)); // No error expected.
}
+
+struct S;
+void func2(struct S *s) {
+ __asm__ volatile(""
+ :
+ : "a" (*s));
+}