[PATCH] D36354: [clang-tidy] Implement type-based check for `gsl::owner`

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 11:17:09 PDT 2017


JonasToth reopened this revision.
JonasToth added a comment.
This revision is now accepted and ready to land.

This Patch broke the buildbot for vs-2015.
I will revert, when i figured out how to do this in svn :/

It does not emit a warning for line 311:
here the log

> C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\stage1\tools\clang\tools\extra\test\clang-tidy\Output\cppcoreguidelines-owning-memory.cpp.tmp.cpp:290:3: note: type deduction did not result in an owner
>  C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\stage1\tools\clang\tools\extra\test\clang-tidy\Output\cppcoreguidelines-owning-memory.cpp.tmp.cpp:297:3: warning: expected assignment source to be of type 'gsl::owner<>'; got 'ArbitraryClass *' [cppcoreguidelines-owning-memory]
> 
>   Owner3 = &A;                                                        // Bad, since assignment of non-owner to owner
>   ^
> 
> C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\stage1\tools\clang\tools\extra\test\clang-tidy\Output\cppcoreguidelines-owning-memory.cpp.tmp.cpp:343:3: warning: expected initialization with value of type 'gsl::owner<>'; got 'int *' [cppcoreguidelines-owning-memory]
> 
>   gsl::owner<int *> OwningPtr = Array1.data(); // Bad, since it does not return the owner

I have no idea how to debug this, since i dont have a visual studio installation, neither do i have windows. What could it be?


https://reviews.llvm.org/D36354





More information about the cfe-commits mailing list