[cfe-dev] Recent regression in static analyzer

Devin Coughlin via cfe-dev cfe-dev at lists.llvm.org
Mon Jan 9 16:34:06 PST 2017


Thanks for the report Miklos!

I filed https://llvm.org/bugs/show_bug.cgi?id=31592 <https://llvm.org/bugs/show_bug.cgi?id=31592> to track this.

Devin

> On Jan 9, 2017, at 7:47 AM, Miklos Vajna via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Hi,
> 
> On Sun, Jan 8, 2017 at 12:37 AM, Miklos Vajna via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
>> And sorry for not making the sample more minimal, this code is
>> originally part of LibreOffice's filter/source/msfilter/rtfutil.cxx,
>> this is already a quite small part of the preprocessed source. :-)
> 
> Here is an (I think) minimal reproducer:
> 
> ----
> struct S;
> 
> template <typename T> struct C {
> public:
>  C(const S &left_, const T &right_) : left(left_), right(right_) {}
> 
> private:
>  const S &left;
>  const T &right;
> };
> 
> template <typename T, int N>
> inline T operator+(const T &left, const char (&right)[N]) {
>  return C<const char[N]>(left, right);
> }
> 
> struct S {
>  template <typename T> S(T &) {}
> 
>  template <typename T> S(const C<T> &) {}
> };
> 
> S f() { return S("{") + "}"; }
> ----
> 
> Thanks,
> 
> Miklos
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170109/e97a2ef3/attachment.html>


More information about the cfe-dev mailing list