[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    [Kde-bindings] smokegen and mf_explicit flag
From:       Chris Burel <chrisburel () gmail ! com>
Date:       2015-10-09 17:58:05
Message-ID: CAPOisTvYXKz+DOpKtGN_1=X+D_DZgKewGDKk6TFMe6ss5trM1Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hey everyone,
I've been working on a replacement for the existing smokegen tool, that is
based on clang's AST instead of the existing parser from kdevelop.  I'm
currently trying to get it to generate the smokedata.cpp file for qtcore.

One thing I'm noticing is that the mf_explicit flag doesn't seem to be
correctly applied to all explicit constructors.  It only shows up for 5 of
them:

QBool::QBool(bool)
QLatin1Char::QLatin1Char(char)
QLatin1String::QLatin1String(const char*)
QTextDecoder::QTextDecoder(const QTextCodec*)
QTextEncoder::QTextEncoder(const QTextCodec*)

Clang's parser turns up a lot more.  For example:
QAbstractEventDispatcher::QAbstractEventDispatcher(QObject *)
QAbstractItemModel::QAbstractItemModel(QObject *)
QAbstractListModel::QAbstractListModel(QObject *)

Looking at the headers for these classes, these constructors are indeed
marked "explicit".  Is this an error in the existing parser, or does the
mf_explicit flag mean more than just "the constructor was declared with the
explicit keyword"?

-Chris

[Attachment #5 (text/html)]

<div dir="ltr"><div><div><div>Hey everyone,<br></div>I&#39;ve been working on a \
replacement for the existing smokegen tool, that is based on clang&#39;s AST instead \
of the existing parser from kdevelop.   I&#39;m currently trying to get it to \
generate the smokedata.cpp file for qtcore.<br><br></div>One thing I&#39;m noticing \
is that the mf_explicit flag doesn&#39;t seem to be correctly applied to all explicit \
constructors.   It only shows up for 5 of \
them:<br><br>QBool::QBool(bool)<br>QLatin1Char::QLatin1Char(char)<br>QLatin1String::QLatin1String(const \
char*)<br>QTextDecoder::QTextDecoder(const \
QTextCodec*)<br>QTextEncoder::QTextEncoder(const \
QTextCodec*)<br><br></div>Clang&#39;s parser turns up a lot more.   For \
example:<br><div><div>QAbstractEventDispatcher::QAbstractEventDispatcher(QObject \
*)<br>QAbstractItemModel::QAbstractItemModel(QObject \
*)<br>QAbstractListModel::QAbstractListModel(QObject *)<br><br></div><div>Looking at \
the headers for these classes, these constructors are indeed marked \
&quot;explicit&quot;.   Is this an error in the existing parser, or does the \
mf_explicit flag mean more than just &quot;the constructor was declared with the \
explicit keyword&quot;?<br><br></div><div>-Chris<br></div><div><br></div></div></div>


[Attachment #6 (text/plain)]

_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic