[clang] Replaced some manual pointer tagging with llvm::PointerIntPair.
authorJoshua Haberman <jhaberman@gmail.com>
Mon, 22 Mar 2021 20:56:26 +0000 (13:56 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Mon, 22 Mar 2021 21:13:42 +0000 (14:13 -0700)
commitc3134d7c44f1059889dfee698dff415f7c2e1620
tree4f2c7ddb0ce4f81b977aa2acb1e72e2aa051c291
parent7e18cd887cd402e3d5465c57c218079e4df65231
[clang] Replaced some manual pointer tagging with llvm::PointerIntPair.

There is no functional change here (hence no new tests). The only change
is to replace a couple uintptr_t members with llvm::PointerIntPair<> to
clean up the code, making it more readable and less error prone.

This cleanup highlighted that the old code was effectively casting away
const. This is fixed by changing some function signatures.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D98889
clang/include/clang/Sema/Initialization.h
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDeclCXX.cpp
clang/lib/Sema/SemaInit.cpp