Handle char{8,16,32} and wchar_t in ASTContext::getIntegerRank()
authorHans Wennborg <hans@chromium.org>
Tue, 6 Dec 2022 14:21:43 +0000 (15:21 +0100)
committerHans Wennborg <hans@chromium.org>
Wed, 7 Dec 2022 15:12:38 +0000 (16:12 +0100)
commitcb3ea52a5ae5178b8cd257bd61c6e05d9a186b4d
tree13a7f0e70d95bce2feab105e2f403cf860c0d9b8
parentedbea62f72f7b9a5ee19c709d675d6083789c71f
Handle char{8,16,32} and wchar_t in ASTContext::getIntegerRank()

They were previously not handled, causing the llvm_unreachable with
"getIntegerRank(): not a built-in integer" message to be hit.

The test case is derived from how we hit it in Chromium
(crbug.com/1396142). I tried to come up with something more direct, but
this is the best I could find.

Differential revision: https://reviews.llvm.org/D139428
clang/lib/AST/ASTContext.cpp
clang/test/SemaCXX/vector.cpp