Closed Quuxplusone closed 8 years ago
Attached testcase-pp.zip
(782996 bytes, application/zip): A test case
Hello, any comment about this bug?
The same happens when parsing http://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/scenegraph/util/qsgtextureprovider.h. This is a real problem to us, could you please let me know how I can help further?
The bug also happens with QAbstractAudioOutput from http://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/multimedia/audio/qaudiosystem.h.
It happens with QAbstractAudioInput from http://code.qt.io/cgit/qt/qtmultimedia.git/tree/src/multimedia/audio/qaudiosystem.h too.
The bug, or at least part of it, can be reproduced by parsing this simple piece:
#define Q_SIGNALS protected
class MacroExpandedToAccessBug
{
Q_SIGNALS:
void signal() {}
};
The result is that signal() and the default members share the same
AccessSpecDecl pointer. However, this is wrong because at least the default
constructor in C++ is public, not protected (quotes from the C++ standard at
http://stackoverflow.com/a/32235317).
The bug, or at least the part of it exemplified by the C++ piece in my previous comment, occurs when using LLVM/Clang revisions 253162/253161 respectively.
It might be related that isImplicit() is false for all generated members when parsing the C++ sample.
It's great that you are reducing your inputs, but we are still missing a way
for us to reproduce your bug. Could you create a file that is using the
libclang API and compiles to a command-line executable that demonstrates the
bug you want to fix ?
This file along with the input header(s) should be self-contained, ideally we
would not need the windows SDK or all of Qt.
It turned out to be a bug in our code.
testcase-pp.zip
(782996 bytes, application/zip)