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

Mike Rice via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 15:36:10 PST 2023


================
@@ -6454,8 +6454,7 @@ ConstantAddress CodeGenModule::GetAddrOfGlobalTemporary(
       !EvalResult.hasSideEffects())
     Value = &EvalResult.Val;
 
-  LangAS AddrSpace =
-      VD ? GetGlobalVarAddressSpace(VD) : MaterializedType.getAddressSpace();
----------------
mikerice1969 wrote:

@yxsamliu, you may have added this back in cbf647cc3a712. Do you know when/if the AddrSpace should be set from MaterializedType since it seems VD is always non-null here.

https://github.com/llvm/llvm-project/pull/74674


More information about the cfe-commits mailing list