Reformat code does not work properly

Why CLion 'Reformat Code' keeps on format my code like following?

Why you put gtest header next line?

And, BTW, the original code(without Reformating) compliles perfectly without any warning or error.

5 comments
Comment actions Permalink

Hello!

On what build system is your project based?

Do you happen to have the "This file doesn't belong to any project target" warning message at the top of this file?

-1
Comment actions Permalink

Anna Falevskaya

WSL.

And you know what? I can compile and run my code properly.

 

But Functions like 'Reformat Code' and 'File structure' all suddenly went wrong.

0
Comment actions Permalink

And Jumping does not work any more either

0
Comment actions Permalink

CMake works fine in CLion

0
Comment actions Permalink
  1. Do you happen to have the "This file doesn't belong to any project target" warning message at the top of this file?
  2. Do you have any in the idea.log (Help | Show Log in...)?
0

Please sign in to leave a comment.