r304892 - [Sema] Silence unused variable warning.
David Blaikie via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 12 08:35:46 PDT 2017
Richard, looks like this might be better as:
if (auto QL = OE->getQualifierLoc())
... QL.getBeginLoc() ...
?
On Wed, Jun 7, 2017 at 3:23 AM Benjamin Kramer via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: d0k
> Date: Wed Jun 7 05:23:17 2017
> New Revision: 304892
>
> URL: http://llvm.org/viewvc/llvm-project?rev=304892&view=rev
> Log:
> [Sema] Silence unused variable warning.
>
> Modified:
> cfe/trunk/lib/Sema/SemaExpr.cpp
>
> Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=304892&r1=304891&r2=304892&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
> +++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Jun 7 05:23:17 2017
> @@ -11843,7 +11843,7 @@ ExprResult Sema::BuildBinOp(Scope *S, So
> std::any_of(OE->decls_begin(), OE->decls_end(), [](NamedDecl
> *ND) {
> return isa<FunctionTemplateDecl>(ND);
> })) {
> - if (auto *Q = OE->getQualifier()) {
> + if (OE->getQualifier()) {
> Diag(OE->getQualifierLoc().getBeginLoc(),
> diag::err_template_kw_missing)
> << OE->getName().getAsString() << "";
>
>
> _______________________________________________
> 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/20170612/7bee0e4b/attachment.html>
More information about the cfe-commits
mailing list