r190447 - Fix ICE in consumed analysis when CFG is null.
Matt Beaumont-Gay
matthewbg at google.com
Tue Sep 10 16:40:53 PDT 2013
Test case?
On Tue, Sep 10, 2013 at 4:10 PM, DeLesley Hutchins <delesley at google.com> wrote:
> Author: delesley
> Date: Tue Sep 10 18:10:10 2013
> New Revision: 190447
>
> URL: http://llvm.org/viewvc/llvm-project?rev=190447&view=rev
> Log:
> Fix ICE in consumed analysis when CFG is null.
>
> Modified:
> cfe/trunk/lib/Analysis/Consumed.cpp
>
> Modified: cfe/trunk/lib/Analysis/Consumed.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Consumed.cpp?rev=190447&r1=190446&r2=190447&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Analysis/Consumed.cpp (original)
> +++ cfe/trunk/lib/Analysis/Consumed.cpp Tue Sep 10 18:10:10 2013
> @@ -1103,12 +1103,16 @@ bool ConsumedAnalyzer::splitState(const
>
> void ConsumedAnalyzer::run(AnalysisDeclContext &AC) {
> const FunctionDecl *D = dyn_cast_or_null<FunctionDecl>(AC.getDecl());
> + if (!D)
> + return;
>
> - if (!D) return;
> + CFG *CFGraph = AC.getCFG();
> + if (!CFGraph)
> + return;
>
> determineExpectedReturnState(AC, D);
>
> - BlockInfo = ConsumedBlockInfo(AC.getCFG());
> + BlockInfo = ConsumedBlockInfo(CFGraph);
>
> PostOrderCFGView *SortedGraph = AC.getAnalysis<PostOrderCFGView>();
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list