[clang] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-07 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 closed https://github.com/llvm/llvm-project/pull/74674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-07 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/74674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-06 Thread Mike Rice via cfe-commits
@@ -6454,8 +6454,7 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary( !EvalResult.hasSideEffects()) Value = &EvalResult.Val; - LangAS AddrSpace = - VD ? GetGlobalVarAddressSpace(VD) : MaterializedType.getAddressSpace(); mikerice1969 wr

[clang] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mike Rice (mikerice1969) Changes Since VD is assigned from a cast it cannot be a nullptr or it would have asserted. Remove the subsequent checks to clear up any misunderstanding. --- Full diff: https://github.com/llvm/llvm-proje

[clang] [NFC] Remove unneeded nullptr checks after cast<> (PR #74674)

2023-12-06 Thread Mike Rice via cfe-commits
https://github.com/mikerice1969 created https://github.com/llvm/llvm-project/pull/74674 Since VD is assigned from a cast it cannot be a nullptr or it would have asserted. Remove the subsequent checks to clear up any misunderstanding. >From 6b3b456534c21a74f12ac022ee99365dd3831dec Mon Sep 17 00