]> granicus.if.org Git - clang/commit
Lex: Check buckets on header map construction
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 20 Feb 2016 21:00:58 +0000 (21:00 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 20 Feb 2016 21:00:58 +0000 (21:00 +0000)
commit4a8b8ff576265eb20d5dda28e7cb4ef8d0da1159
tree11a91f9cdbef0c4859fce57a0d40037de3343447
parent7dca0f623a823830c19d5d37b9ffa663deb611bf
Lex: Check buckets on header map construction

If the number of buckets is not a power of two, immediately recognize
the header map as corrupt, rather than waiting for the first lookup.  I
converted the later check to an assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261448 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Lex/HeaderMap.cpp
unittests/Lex/HeaderMapTest.cpp