[PATCH] Unnecessary reference type in SemaExpr.cpp
David Blaikie
dblaikie at gmail.com
Tue Sep 3 14:42:51 PDT 2013
probably drop the const too, but that's fine - committed as r189859
On Tue, Sep 3, 2013 at 2:30 PM, Christian Wailes <chriswailes at google.com> wrote:
> Hi delesley, aaron.ballman, dblaikie,
>
> The getDefaultPolicy() function returns a value and not a reference.
>
> http://llvm-reviews.chandlerc.com/D1589
>
> Files:
> lib/Sema/SemaExpr.cpp
>
> Index: lib/Sema/SemaExpr.cpp
> ===================================================================
> --- lib/Sema/SemaExpr.cpp
> +++ lib/Sema/SemaExpr.cpp
> @@ -10236,7 +10236,7 @@
> computeNRVO(Body, getCurBlock());
>
> BlockExpr *Result = new (Context) BlockExpr(BSI->TheDecl, BlockTy);
> - const AnalysisBasedWarnings::Policy &WP = AnalysisWarnings.getDefaultPolicy();
> + const AnalysisBasedWarnings::Policy WP = AnalysisWarnings.getDefaultPolicy();
> PopFunctionScopeInfo(&WP, Result->getBlockDecl(), Result);
>
> // If the block isn't obviously global, i.e. it captures anything at
More information about the cfe-commits
mailing list