D22455: Fix code completion for nameless structs/unions with the same member

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Wed Jul 24 15:01:24 BST 2019


kossebau added a comment.


  Seems the introduced QStringLiteral as default argument here in the template method `executeCompletionTest()` makes ubuntu bionic's GNU 7.4.0 C++ compiler screw up. At least there is some timely coincidence that the KDevelop builds on neon CI started to fail after this commit, with this error:
  
    05:00:37 [100%] Building CXX object plugins/clang/tests/CMakeFiles/test_codecompletion.dir/test_codecompletion.cpp.o
    05:00:37 plugins/clang/tests/CMakeFiles/test_codecompletion.dir/build.make:62: recipe for target 'plugins/clang/tests/CMakeFiles/test_codecompletion.dir/test_codecompletion.cpp.o' failed
    05:00:37 make[4]: Leaving directory '/workspace/build/obj-x86_64-linux-gnu'
    05:00:37 /tmp/ccrWtnBp.s: Assembler messages:
    05:00:37 /tmp/ccrWtnBp.s:65174: Error: symbol `_ZZNK12_GLOBAL__N_1UlvE_clEvE15qstring_literal' is already defined
    05:00:37 /tmp/ccrWtnBp.s:68144: Error: symbol `_ZZNK12_GLOBAL__N_1UlvE_clEvE15qstring_literal' is already defined
    05:00:37 make[4]: *** [plugins/clang/tests/CMakeFiles/test_codecompletion.dir/test_codecompletion.cpp.o] Error 1
    05:00:37 CMakeFiles/Makefile2:18121: recipe for target 'plugins/clang/tests/CMakeFiles/test_codecompletion.dir/all' failed
    05:00:37 make[3]: *** [plugins/clang/tests/CMakeFiles/test_codecompletion.dir/all] Error 2
  
  from https://build.neon.kde.org/job/bionic_unstable_extras_kdevelop_bin_amd64/220/console
  
  The symbols demangled is "(anonymous namespace)::{lambda()#1}::operator()() const::qstring_literal", thus this is the "static const QStaticStringData<Size> qstring_literal" from the QStringLiteral macro code about which it seems to complain being defined 3x. Though this is in a lambda, which should be instantiated each time when used, no? how could we clash here...
  [15:48] <volker|office> the symbol is not including the template arguments, but might be created per instantiation of  the template
  [15:49] <volker|office> it's the same content in all cases, so either the compiler merges them, or it needs to give them a unique name
  
  Seems we need to work-around by not using the QStringLiteral here, and have to pass things explicitly for now.
  
  Fail related to this commit confirmed by:
  [15:58] <Riddellll> buscher: frinring it fails to link locally but when I revert d1f58562046494b78e17c50c2fdab5c2800d9aaf <https://phabricator.kde.org/R32:d1f58562046494b78e17c50c2fdab5c2800d9aaf> it's all good

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D22455

To: buschinski, #kdevelop, apol
Cc: kossebau, kdevelop-devel, hmitonneau, christiant, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190724/5419074c/attachment.html>


More information about the KDevelop-devel mailing list