aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-01-23 21:30:56 +0000
committerDouglas Gregor <dgregor@apple.com>2009-01-23 21:30:56 +0000
commit3fd56d755aa74f01fbe963195c95c963ea1fee91 (patch)
treebb43670c957f10a5f698d312d4e9f2889c669879 /lib
parent53d3d8e0662197f7245d8f5ff697a72a2b4b3f54 (diff)
Make sure that all NamedDecls have an identifier namespace.
Make sure that we know a call is invalid if we dropped arguments. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62882 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Sema/SemaExpr.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 6ec4d4a61f..202f07b4bf 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -1684,7 +1684,8 @@ Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn,
// assignment, to the types of the corresponding parameter, ...
unsigned NumArgsInProto = Proto->getNumArgs();
unsigned NumArgsToCheck = NumArgs;
-
+ bool Invalid = false;
+
// If too few arguments are available (and we don't have default
// arguments for the remaining parameters), don't make the call.
if (NumArgs < NumArgsInProto) {
@@ -1707,6 +1708,7 @@ Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn,
Args[NumArgs-1]->getLocEnd());
// This deletes the extra arguments.
Call->setNumArgs(NumArgsInProto);
+ Invalid = true;
}
NumArgsToCheck = NumArgsInProto;
}
@@ -1746,7 +1748,7 @@ Sema::ConvertArgumentsForCall(CallExpr *Call, Expr *Fn,
}
}
- return false;
+ return Invalid;
}
/// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.