Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-tidy: bugprone-unchecked-optional-access regression (hang) from 15.0.7 to 16.0.6 #69298

Open
Dushistov opened this issue Oct 17, 2023 · 4 comments
Labels
clang-tidy hang Compiler hang (infinite loop)

Comments

@Dushistov
Copy link

test.zip

With attached file if you run (with clang/llvm 15.0.7):

for i in $(seq 1 10); do clang-tidy test.cpp -checks='-*,bugprone-unchecked-optional-access'  -- --std=c++17; done

all works fine.

But with clang/llvm 16.0.6

it hangs on time from 2 minutes to more then several hours.

And it happens randomly, some times run takes several seconds, some times minutes or hours.
On my machine, running the clang-tidy (16.0.6) 10 times results in a 100% hang.

@EugeneZelenko
Copy link
Contributor

Could you please try 17 or main branch? https://godbolt.org should be helpful.

@Dushistov
Copy link
Author

I can not find clang-tidy in godbolt, but I was able to install 17.0.3 on Linux machine.
Looks like 17.0.3 contains fix, at least no hangs, and clang-tidy works fast enought.

@EugeneZelenko
Copy link
Contributor

@Dushistov: You need to add relevant tool in addition to compiler on GodBolt.

@neoncube2
Copy link

Possible duplicate of #69369?

@firewave firewave added the hang Compiler hang (infinite loop) label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy hang Compiler hang (infinite loop)
Projects
None yet
Development

No branches or pull requests

4 participants