[cfe-commits] r66290 - /cfe/trunk/include/clang/Basic/IdentifierTable.h
Ted Kremenek
kremenek at apple.com
Fri Mar 6 14:09:32 PST 2009
Author: kremenek
Date: Fri Mar 6 16:09:31 2009
New Revision: 66290
URL: http://llvm.org/viewvc/llvm-project?rev=66290&view=rev
Log:
Add null-check assertion in the constructor of Selector.
Modified:
cfe/trunk/include/clang/Basic/IdentifierTable.h
Modified: cfe/trunk/include/clang/Basic/IdentifierTable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/IdentifierTable.h?rev=66290&r1=66289&r2=66290&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/IdentifierTable.h (original)
+++ cfe/trunk/include/clang/Basic/IdentifierTable.h Fri Mar 6 16:09:31 2009
@@ -344,6 +344,7 @@
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;
More information about the cfe-commits
mailing list