diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-05-04 16:32:21 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-05-04 16:32:21 +0000 |
commit | 7bfb2d026ec99e920db08ee2632683908b6db7e6 (patch) | |
tree | 424944895fb0c987948dfe236f7035d9eedc431c /clang/lib/Sema/SemaChecking.cpp | |
parent | 5ff430ce06dbbcc9fb99f06fa111e508314fad95 (diff) | |
download | bcm5719-llvm-7bfb2d026ec99e920db08ee2632683908b6db7e6.tar.gz bcm5719-llvm-7bfb2d026ec99e920db08ee2632683908b6db7e6.zip |
Move Sema::RequireCompleteType() and Sema::RequireCompleteExprType()
off PartialDiagnostic. PartialDiagnostic is rather heavyweight for
something that is in the critical path and is rarely used. So, switch
over to an abstract-class-based callback mechanism that delays most of
the work until a diagnostic is actually produced. Good for ~11k code
size reduction in the compiler and 1% speedup in -fsyntax-only on the
code in <rdar://problem/11004361>.
llvm-svn: 156176
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r-- | clang/lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 0c8309e58e5..4504a6a1e1f 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -4488,7 +4488,7 @@ bool Sema::CheckParmsForFunctionDef(ParmVarDecl **P, ParmVarDecl **PEnd, // This is also C++ [dcl.fct]p6. if (!Param->isInvalidDecl() && RequireCompleteType(Param->getLocation(), Param->getType(), - diag::err_typecheck_decl_incomplete_type)) { + diag::err_typecheck_decl_incomplete_type)) { Param->setInvalidDecl(); HasInvalidParm = true; } |