]> granicus.if.org Git - llvm/commit
MetadataLoader upgradeCUVariables() - silence static analyzer dyn_cast_or_null<>...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 2 Oct 2019 11:48:17 +0000 (11:48 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 2 Oct 2019 11:48:17 +0000 (11:48 +0000)
commit951c1a79316e798ae885f79a32f2846207b24d94
tree5a9fb346c07ae5f8183c11c00f1c8deb89222342
parent2e3f961efc0f0d4ee159452757c5448aa4473c12
MetadataLoader upgradeCUVariables() - silence static analyzer dyn_cast_or_null<> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we know that the source won't be null so just use dyn_cast, which will assert if the value somehow is actually null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373448 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/MetadataLoader.cpp