[llvm] r261396 - fixing msvc warning.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 21 15:38:30 PST 2016
On Fri, Feb 19, 2016 at 6:11 PM, Mike Aizatsky via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: aizatsky
> Date: Fri Feb 19 20:11:49 2016
> New Revision: 261396
>
> URL: http://llvm.org/viewvc/llvm-project?rev=261396&view=rev
> Log:
> fixing msvc warning.
>
What was the MSVC warning?
>
> Modified:
> llvm/trunk/tools/sancov/sancov.cc
>
> Modified: llvm/trunk/tools/sancov/sancov.cc
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/sancov/sancov.cc?rev=261396&r1=261395&r2=261396&view=diff
>
> ==============================================================================
> --- llvm/trunk/tools/sancov/sancov.cc (original)
> +++ llvm/trunk/tools/sancov/sancov.cc Fri Feb 19 20:11:49 2016
> @@ -721,7 +721,8 @@ public:
> if (!ProcessedFunctions.insert(FunctionName).second)
> continue;
>
> - Result[FileLoc{FileName, Loc.Loc.Line}].insert(FunctionName);
> + auto FLoc = FileLoc{FileName, Loc.Loc.Line};
>
Could we just write this as:
FileLoc FLoc = {FileName, Loc.Loc.Line};
Or
FileLoc FLoc(FileName, Loc.Loc.Line);
(prefer the latter if we're actually calling a ctor, the former if it's
really an aggregate with no user-declared ctor)
> + Result[FLoc].insert(FunctionName);
> }
> return Result;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160221/3a48220c/attachment-0001.html>
More information about the llvm-commits
mailing list