[clang][NFC] Remove useless code in ASTWriter

A follow-up to #71709, addressing the static analysis finding reported in https://github.com/llvm/llvm-project/pull/71709/files#r1576846306

GitOrigin-RevId: 662ef8604268b207910225ecca90daf30a46720b
1 file changed