[clang-tools-extra] r216529 - Simplify creation of a couple ArrayRefs by using None and makeArrayRef.

David Blaikie dblaikie at gmail.com
Wed Aug 27 08:59:49 PDT 2014


On Tue, Aug 26, 2014 at 11:29 PM, Craig Topper <craig.topper at gmail.com>
wrote:

> Author: ctopper
> Date: Wed Aug 27 01:29:07 2014
> New Revision: 216529
>
> URL: http://llvm.org/viewvc/llvm-project?rev=216529&view=rev
> Log:
> Simplify creation of a couple ArrayRefs by using None and makeArrayRef.
>
> Modified:
>     clang-tools-extra/trunk/clang-query/Query.cpp
>
> Modified: clang-tools-extra/trunk/clang-query/Query.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-query/Query.cpp?rev=216529&r1=216528&r2=216529&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/clang-query/Query.cpp (original)
> +++ clang-tools-extra/trunk/clang-query/Query.cpp Wed Aug 27 01:29:07 2014
> @@ -92,8 +92,8 @@ bool MatchQuery::run(llvm::raw_ostream &
>              TD.emitDiagnostic(
>                  R.getBegin(), DiagnosticsEngine::Note,
>                  "\"" + BI->first + "\" binds here",
> -
> ArrayRef<CharSourceRange>(CharSourceRange::getTokenRange(R)),
> -                ArrayRef<FixItHint>(), &AST->getSourceManager());
> +                llvm::makeArrayRef(CharSourceRange::getTokenRange(R)),
>

Could you drop the makeArrayRef entirely here & just rely on ArrayRef's
one-arg implicit conversion?


> +                None, &AST->getSourceManager());
>            }
>            break;
>          }
>
>
> _______________________________________________
> 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/20140827/259ee572/attachment.html>


More information about the cfe-commits mailing list