I have a CPP file with some typedef's and variables declarations. These do not appear to get recognized by the parser unless I have the declaration right before the usage in the .cpp file. Reproducible: Always Actual Results: Parser flags valid code as error. Expected Results: Parser should not flag these as errors. Here is an example: typedef map<int, afdx_hdl_t> TX_PORT_MAP_T; typedef struct VL_ENTRY_T { afdx_hdl_t VL_Hdl; TX_PORT_MAP_T portMap; }VL_ENTRY; typedef map<int, VL_ENTRY> TX_VL_MAP_T; TX_VL_MAP_T m_TxVlMap; ..... TX_VL_MAP_T::iterator vlMapIter = m_TxVlMap.find(txVLInfo.VL_ID); I show these errors with the parser unless the above declarations appear immediately above the usage. Problem in Semantic analysis 'TX_VL_MAP_T' (aka 'int') is not a class, namespace, or enumeration m_TxVlMap Problem in Semantic analysis Member reference base type 'TX_VL_MAP_T' (aka 'int') is not a structure or union This code compiles with no warnings/errors.
Forgot one typedef: typedef int afdx_hdl_t;
The whole problem was relying on the Makefile to supply the include paths. Apparently KDevelop does not parse pkg-config entires in the Makefile. I added the needed include files paths in Kdevelop and resolved the problem.
I would like to add a comment that may help others stumbling across this issue. If there are any RED issues reported in Problems for include files, the parser will not work. You must resolve these problems in order for the parser to work again.