Fix build with Qt 5.9.1 and clang
ClosedPublic

Authored by elvisangelaccio on Jul 7 2017, 9:37 AM.

Details

Summary

Qt 5.9.1 expands Q_REQUIRED_RESULT to the [[nodiscard]] attribute (see
commit d254d8c19 in qtbase). This breaks the build with clang compilers
because [[nodiscard]] cannot be used at the end of a function
declaration:

error: 'nodiscard' attribute cannot be applied to types

For the record, GCC just issues a 'attribute ignored' warning when
[[nodiscard]] is used at the end of a declaration.

Test Plan

ki18n now builds with clang + Qt 5.9.1

Diff Detail

Repository
R249 KI18n
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
elvisangelaccio created this revision.Jul 7 2017, 9:37 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptJul 7 2017, 9:37 AM
elvisangelaccio edited the summary of this revision. (Show Details)Jul 7 2017, 9:38 AM
kfunk accepted this revision.Jul 7 2017, 10:37 AM
This revision is now accepted and ready to land.Jul 7 2017, 10:37 AM
This revision was automatically updated to reflect the committed changes.