[PATCH] D40737: [clang-tidy] WIP Resubmit hicpp-multiway-paths-covered without breaking test

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 09:46:27 PST 2017


JonasToth added a comment.

@sbenza and @klimek the issue that occurs here is probably ASTMatchers related, thats why I added you.

The problem:

This patch introduces a stack overflow when building with `RelWithDebInfo` that is caught by the sanitizers. I isolated the issue in the big switch statements that has 256 case labels. On label 200 the overflow occurs, that is noted with a comment.
What I found while debugging is, that no matter which matcher I use the overflow occurs. The toplevel function is `parseAST` and then executing the frontend actions.

I think the problem is that every case label adds multiple recursive function calls coming from the nature of how case labels are stored in the AST. That produces the massive stack. Is there a way I could work around this Issue in the check?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D40737





More information about the cfe-commits mailing list