Code Inspector not finding basic C++ type mismatch

Running the Code Inspector does not pickup basic issues like type mismatches. 

  • int test = "string";
  • This is not found until compile time

I have tried with the bundled GDB and CMake versions as well an older version I had been previously using 

  • Cmake 2.8.4
  • GDB 7.2.6

Any ideas what this might be?

0

Hi Sean.

It correctly works for me in CLion 1.2.4:




0

One thing to consider is that if the file in question is not being picked up as a project file, many things will not work.  To be considered part of your project I think that the file must be either:

a) referenced in some target in your CMakeLists.txt

or for header files

b) included in a file that meets condition a)

The best way to check this is to see if the file is grey in the Project sidebar - if so it's not considered a project file by CLion.

Note: This is based on my experience so far - its quite possible I'm getting some things wrong.  If anybody from JB can correct/verify that'd be great.

 

0
Avatar
Permanently deleted user

Thanks Anna and Matt.

I think you are correct Matt. I don't think my project is loaded correctly. I do have custom CMakeLists.txt files within the project and I am attempting to load it into CLion. I will look into this and post back.

0

请先登录再写评论。