r230649 - Patch to prevent crash when default argument expression
David Blaikie
dblaikie at gmail.com
Thu Feb 26 10:35:34 PST 2015
On Thu, Feb 26, 2015 at 9:59 AM, Fariborz Jahanian <fjahanian at apple.com>
wrote:
> Author: fjahanian
> Date: Thu Feb 26 11:59:54 2015
> New Revision: 230649
>
> URL: http://llvm.org/viewvc/llvm-project?rev=230649&view=rev
> Log:
> Patch to prevent crash when default argument expression
> is null due to its previous bad declaration, etc.
>
Test case?
> rdar://19871240
>
> Modified:
> cfe/trunk/lib/Sema/SemaChecking.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaChecking.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=230649&r1=230648&r2=230649&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaChecking.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaChecking.cpp Thu Feb 26 11:59:54 2015
> @@ -6774,8 +6774,11 @@ void AnalyzeImplicitConversions(Sema &S,
> E = POE->getResultExpr();
> }
>
> - if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E))
> - return AnalyzeImplicitConversions(S, OVE->getSourceExpr(), CC);
> + if (const OpaqueValueExpr *OVE = dyn_cast<OpaqueValueExpr>(E)) {
> + if (OVE->getSourceExpr())
> + AnalyzeImplicitConversions(S, OVE->getSourceExpr(), CC);
> + return;
> + }
>
> // Skip past explicit casts.
> if (isa<ExplicitCastExpr>(E)) {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150226/e782a81b/attachment.html>
More information about the cfe-commits
mailing list