Add null-check assertion in the constructor of Selector.

llvm-svn: 66290
This commit is contained in:
Ted Kremenek 2009-03-06 22:09:31 +00:00
parent dcf8d3c9eb
commit f4649f9f57
1 changed files with 1 additions and 0 deletions

View File

@ -344,6 +344,7 @@ class Selector {
Selector(IdentifierInfo *II, unsigned nArgs) {
InfoPtr = reinterpret_cast<uintptr_t>(II);
assert(II && "Null IdentifierInfo passed to Selector constructor.");
assert((InfoPtr & ArgFlags) == 0 &&"Insufficiently aligned IdentifierInfo");
assert(nArgs < 2 && "nArgs not equal to 0/1");
InfoPtr |= nArgs+1;