Предупреждения в QtCreator/clang
От: Chorkov Россия  
Дата: 09.10.18 08:55
Оценка:
При использовании Boost::numeric, а именно при
#include <boost/numeric/ublas/vector_sparse.hpp>

, QtCreator-овский плагин ClangCodeModel выдает фантомные предупреждения:

The code model could not parse an included file, which might lead slow or incorrect code completion and hilighting, for example.

config.hpp:36:46: error: too many arguments provided to function-like macro invocation
sparce_vector.h:1:1: note: in file included from D:\WB\_svn\reactors_library-wsr_fixes\matrix\inc\sparce_vector.h:1:
sparce_vector.h:7:10: note: in file included from D:\WB\_svn\reactors_library-wsr_fixes\matrix\inc\sparce_vector.h:7:
vector_sparse.hpp:16:10: note: in file included from C:\Programming\boost\boost\numeric\ublas\vector_sparse.hpp:16:
storage_sparse.hpp:17:10: note: in file included from C:\Programming\boost\boost\numeric\ublas\storage_sparse.hpp:17:
collection_size_type.hpp:11:10: note: in file included from C:\Programming\boost\boost\serialization\collection_size_type.hpp:11:
level.hpp:28:10: note: in file included from C:\Programming\boost\boost\serialization\level.hpp:28:
eval_if.hpp:17:10: note: in file included from C:\Programming\boost\boost\mpl\eval_if.hpp:17:
...
if.hpp:19:11: note: in file included from C:\Programming\boost\boost\preprocessor\control\if.hpp:19:
bool.hpp:17:11: note: in file included from C:\Programming\boost\boost\preprocessor\logical\bool.hpp:17:
config.hpp:102:8: note: macro 'BOOST_PP_EXPAND_I' defined here



Подозреваю, что для правильной работы boost-овской препроцессорной магии, нужно анализатору указать макросы препроцессора, соответствующие CLang, а не MSVC, но не могу сообразить какие...

Указание макроса __clang__ (в tools/C++/Additional preprocessor derictives), только меняет сообщение об ошибке:

The code model could not parse an included file, which might lead slow or incorrect code completion and hilighting, for example.

if.hpp:131:23: error: too many arguments provided to function-like macro invocation
vector_sparse.hpp:16:10: note: in file included from C:\Programming\boost\boost\numeric\ublas\vector_sparse.hpp:16:
storage_sparse.hpp:17:10: note: in file included from C:\Programming\boost\boost/numeric/ublas/storage_sparse.hpp:17:
collection_size_type.hpp:11:10: note: in file included from C:\Programming\boost\boost/serialization/collection_size_type.hpp:11:
level.hpp:28:10: note: in file included from C:\Programming\boost\boost/serialization/level.hpp:28:
eval_if.hpp:17:10: note: in file included from C:\Programming\boost\boost/mpl/eval_if.hpp:17:
expand.hpp:26:10: note: macro 'BOOST_PP_EXPAND_I' defined here


Компилятор cl 19.00.24215.1 (MSVC 2015),
Qt Creator 4.6.0, Based on Qt 5.10.1 (MSVC 2015, 64 bit)
ClangModelPlugin 4.6.0
qtcreator clang
Re: Предупреждения в QtCreator/clang
От: niXman Ниоткуда https://github.com/niXman
Дата: 21.10.18 02:23
Оценка:
смените компилятор.
пачка бумаги А4 стОит 2000 р, в ней 500 листов. получается, лист обычной бумаги стОит дороже имперского рубля =)
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.