diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-03-22 21:33:46 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-03-22 21:33:46 +0000 |
commit | 984f2783ad8319aa0cbfca1c4a719688b1ecfd5e (patch) | |
tree | 58160f8fc66220c74e11bd4d7db6b056af52ef5e /lib | |
parent | 88de5a0963cbd2b92810d20d1bfbd9eb4951dc42 (diff) |
Use RequireCompleteType() instead of isIncompleteType().
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaStmtAsm.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmtAsm.cpp b/lib/Sema/SemaStmtAsm.cpp index 3e9606e467..95964e20a7 100644 --- a/lib/Sema/SemaStmtAsm.cpp +++ b/lib/Sema/SemaStmtAsm.cpp @@ -181,7 +181,9 @@ StmtResult Sema::ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, 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); |