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/SemaTemplateDeduction.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/SemaTemplateDeduction.cpp')
-rw-r--r-- | clang/lib/Sema/SemaTemplateDeduction.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index d68e4642fc4..e6f2b2d649a 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -2825,9 +2825,7 @@ static bool AdjustFunctionParmAndArgTypesForDeduction(Sema &S, QualType PointeeType = ParamRefType->getPointeeType(); // If the argument has incomplete array type, try to complete it's type. - if (ArgType->isIncompleteArrayType() && - !S.RequireCompleteExprType(Arg, S.PDiag(), - std::make_pair(SourceLocation(), S.PDiag()))) + if (ArgType->isIncompleteArrayType() && !S.RequireCompleteExprType(Arg, 0)) ArgType = Arg->getType(); // [C++0x] If P is an rvalue reference to a cv-unqualified |