diff --git a/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h index 32818a913710..5c8420314788 100644 --- a/clang/include/clang/Basic/IdentifierTable.h +++ b/clang/include/clang/Basic/IdentifierTable.h @@ -344,6 +344,7 @@ class Selector { Selector(IdentifierInfo *II, unsigned nArgs) { InfoPtr = reinterpret_cast(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;