CLion is not analyzing C++ headers until opening files

I just updated to 2020.2.4 from 2020.2.3 and have noticed, what seems to be, an IDE-breaking bug.

 

A simple example:

std::array<int, 3> myArray;

void foo() {
myArray. // Here, the context menu did not popup. And using the keyboard shortcut did nothing as well.

When I navigated to the declaration or definition of std::array, I find that the header had not yet been analyzed, indicated by the "Analyzing..." text at the top-right of the editor. After it finished analyzing, the context menu worked.

This occurs for, what seems to be, every header file not in my projects.

Further, if encapsulation is involved, the context menu never shows. E.g,:

class Foo {
private:
std::array<int, 3> myArray;
public:
inline const std::array<int, 3>& getMyArray() const { return myArray; }
}

std::shared_ptr<Foo> foo;
// Neither
foo->
// or
foo->getMyArray().
// will trigger the context menu even after headers for both classes are analyzed.

 

Thanks for your help.

0

Hello!

Does the issue happen in a default "Hello, World!" project (`File | New Project` > `C++ Executable` > `Create`)?

0

请先登录再写评论。