[PATCH] D19959: [scan-build] fix warning emitted on Clang Driver code baseFix a "logic error" warning of the type Called c++ object pointer isnull" reported by Clang Static Analyzer on the file:- lib/Driver/Tools.cpp.

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Thu May 5 10:54:24 PDT 2016


Should this be a test, or just an assertion?

On Thu, May 5, 2016 at 2:34 AM, Apelete Seketeli via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> apelete created this revision.
> apelete added reviewers: kevin.qin, rsmith.
> apelete added a subscriber: cfe-commits.
>
> Signed-off-by: Apelete Seketeli <apelete at seketeli.net>
>
> http://reviews.llvm.org/D19959
>
> Files:
>   lib/Driver/Tools.cpp
>
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -2346,7 +2346,7 @@
>      success = getAArch64MicroArchFeaturesFromMcpu(D,
> getAArch64TargetCPU(Args),
>                                                    Args, Features);
>
> -  if (!success)
> +  if (!success && A)
>      D.Diag(diag::err_drv_clang_unsupported) << A->getAsString(Args);
>
>    if (Args.getLastArg(options::OPT_mgeneral_regs_only)) {
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160505/e73665c6/attachment.html>


More information about the cfe-commits mailing list