forked from OSchip/llvm-project
Add null-check assertion in the constructor of Selector.
llvm-svn: 66290
This commit is contained in:
parent
dcf8d3c9eb
commit
f4649f9f57
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue