Commit Graph
4 Commits
Author SHA1 Message Date
Ofek a62c5a84b5 Fix #5889: add block-lookahead logic to processAST (#5903)
The code here assumes a top-level AST subtree can be in 3 states:
1. The header line indicates it's system code (e.g. includes `/usr`
etc.)
 2. The header line indicates it's user code (includes `<source>`)
3. The header contains no such info (typically it includes `<invalid
sloc>`)

For the 3rd case this PR looks-ahead inside the current subtree and
decides based on its contents.
This is enough to filter out `<vector>` or `<string>` contents, as
demonstrated in issue #5889 (added a test). This solution holds also for
the case from issue #3849.
2023-12-28 16:10:09 +02:00
Patrick Quist c934dede0a Allow more ast lines while trying to keep out non-user-source (#3860) 2022-07-14 00:48:51 +02:00
Arseniy Zaostrovnykh 9b94ce7bab Fix #1346: truncating nested top-level declarations (#2626) 2021-04-27 11:32:47 -05:00
Arseniy ZaostrovnykhandArseniy Zaostrovnykh 23b152b298 Colorize the LLVM AST to match the colors of the source (#2511)
Colour the AST view with the same colors as the source code

* Add a couple of trivial test cases for processAstOutput
* Fix the processAstOutput test, ad a test for a file with #include
* Send individual lines for the AST output
* Parse the source lines for AST
* Register as a contributor
* Factor out the LlvmAstParser into a separate file

Co-authored-by: Arseniy Zaostrovnykh <arseniy.zaostrovnykh@sonarsource.com>
2021-03-22 13:21:08 -05:00