Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] false codan error

It sounds like a bug, but we need a testcase that reproduces it to fix it. The code snippet you posted doesn't reproduce the error as-is.


From: scalpel4k@xxxxxxxxx
To: cdt-dev@xxxxxxxxxxx
Date: Fri, 20 Sep 2013 15:18:20 +0200
Subject: [cdt-dev] false codan error

Hi guys,


I've come across some error in the codan checker, but I don't know how to describe the problem properly in a bug report.


I have the following code excerpt that compiles/runs fine when I use it from my code (I know this example can't work, I simply tried to focus on the problem).


template<typename _Handler_>

struct TestWrapper:

public _Handler_ {


using H = _Handler_;


typename _Handler_::Buffer _buf; // no error


static void testHandler() {


typename H::Buffer buf1(); // no error


typename H::Buffer buf2; // error: No such constructor for type '#0::Buffer'





The error is shown even if there's nothing refering to this declaration, so even when there are no specializations/uses anywhere in the code. I think the parser should not be able to tell me anything about Buffer in the first place. And then I don't know where that error itself comes from; in the real code there is an appropriate ctor.


Does anybody have an idea what is happening here?


bye Michi

_______________________________________________ cdt-dev mailing list cdt-dev@xxxxxxxxxxx

Back to the top