diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-07 11:31:19 +0000 | 
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-07-07 11:31:19 +0000 | 
| commit | 36ea32257974baa08e0d10b4b44ffa1a2118a7b5 (patch) | |
| tree | 08e6585f46beb9a33cd278305de545cffb271df5 /clang/lib/Sema/SemaExpr.cpp | |
| parent | a22e8148d40b3e68e19182839b2e7031408b4af7 (diff) | |
| download | bcm5719-llvm-36ea32257974baa08e0d10b4b44ffa1a2118a7b5.tar.gz bcm5719-llvm-36ea32257974baa08e0d10b4b44ffa1a2118a7b5.zip | |
Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH.
Makes de-serialization of the function body even more "lazier".
llvm-svn: 107768
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 342c522442d..93cec73d038 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -3676,7 +3676,7 @@ Sema::BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl,        // Check if we have too few/too many template arguments, based        // on our knowledge of the function definition.        const FunctionDecl *Def = 0; -      if (FDecl->getBody(Def) && NumArgs != Def->param_size()) { +      if (FDecl->hasBody(Def) && NumArgs != Def->param_size()) {          const FunctionProtoType *Proto =              Def->getType()->getAs<FunctionProtoType>();          if (!Proto || !(Proto->isVariadic() && NumArgs >= Def->param_size())) { | 

