]> granicus.if.org Git - clang/commit
OverloadCandidate::getNumParams - silence static analyzer getAs<FunctionProtoType...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Oct 2019 21:27:02 +0000 (21:27 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Oct 2019 21:27:02 +0000 (21:27 +0000)
commitae56b6c181f93a82e8e8ed960f9a88f6e0817e0d
tree51950418525919329593d3422316ed5a87a0eba1
parent30827e4093b4701c14cfcf950a61b312ba918bbb
OverloadCandidate::getNumParams - silence static analyzer getAs<FunctionProtoType> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use castAs<FunctionProtoType> directly and if not assert will fire for us.

Also replaces an auto to make the type more obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373665 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Overload.h