]> granicus.if.org Git - clang/commit
Lex: Check for 0 buckets on header map construction
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 22 Feb 2016 22:24:22 +0000 (22:24 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 22 Feb 2016 22:24:22 +0000 (22:24 +0000)
commit006186b25e2e8fc902211cc08bea285c38cc42f2
treeefa8e78e5c26d3c24b6e6f6e071db3325b949fe1
parent92d47304304b636375dd6ad0d6b004970dfd2d3a
Lex: Check for 0 buckets on header map construction

Switch to using `isPowerOf2_32()` to check whether the buckets are a
power of two, and as a side benefit reject loading a header map with no
buckets.  This is a follow-up to r261448.

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