Bug 343476 - git origin/1.13 searchtest.cpp fails to build with clang
Summary: git origin/1.13 searchtest.cpp fails to build with clang
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: server (other bugs)
Version First Reported In: GIT (master)
Platform: Compiled Sources Other
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-28 19:49 UTC by RJVB
Modified: 2016-02-18 11:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2015-01-28 19:49:10 UTC
clang 3.5 fails to build searchtest.cpp from the 1.13 branch head:

akonadi-1.13.1/server/tests/unittest/searchtest.cpp:124:30: error: no matching conversion for functional-style cast from 'void' to 'QVector<qint64>'
                          << QVector<qint64>({ col4.id(), col5.id(), col7.id() });
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/qt4/QtCore/qvector.h:121:14: note: candidate constructor not viable: cannot convert initializer list argument to 'int'
    explicit QVector(int size);
             ^
/opt/local/include/qt4/QtCore/qvector.h:123:12: note: candidate constructor not viable: cannot convert initializer list argument to 'const QVector<long long>'
    inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
           ^
/opt/local/include/qt4/QtCore/qvector.h:120:12: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); }
           ^
/opt/local/include/qt4/QtCore/qvector.h:122:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    QVector(int size, const T &t);
    ^


Reproducible: Always

Steps to Reproduce:
1. checkout akonadi git c733429f
2. cmake -DCMAKE_CXX_COMPILER=clang (etc)
3. make

Actual Results:  
akonadi-1.13.1/server/tests/unittest/searchtest.cpp:124:30: error: no matching conversion for functional-style cast from 'void' to 'QVector<qint64>'
                          << QVector<qint64>({ col4.id(), col5.id(), col7.id() });
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/qt4/QtCore/qvector.h:121:14: note: candidate constructor not viable: cannot convert initializer list argument to 'int'
    explicit QVector(int size);
             ^
/opt/local/include/qt4/QtCore/qvector.h:123:12: note: candidate constructor not viable: cannot convert initializer list argument to 'const QVector<long long>'
    inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
           ^
/opt/local/include/qt4/QtCore/qvector.h:120:12: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); }
           ^
/opt/local/include/qt4/QtCore/qvector.h:122:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    QVector(int size, const T &t);
    ^

plus similar errors in the same file

Expected Results:  
no errors

This error exists only in searchtest.cpp; tested both on OS X 10.9 and KUbuntu 14.04 with clang 3.5 .
Comment 1 Daniel Vrátil 2016-02-18 11:05:36 UTC
Fixed in 1.13 branch (c23607679fa1451f0c6890bd4a5656c07d519853) over a year ago, forgot to close this bug.