[PATCH] D60899: [analyzer] Unbreak body farms in presence of multiple declarations.

2019-04-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. With body farms, i think, the current declaration also remains unchanged, we're just getting a shining new `CompoundStmt` as a body in the middle of nowhere, i.e., `ADC->getDecl()->getBody()` isn't the same as `ADC->getBody()`. Which is, yeah, still weird :) Repository:

[PATCH] D60899: [analyzer] Unbreak body farms in presence of multiple declarations.

2019-04-22 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL358946: [analyzer] Unbreak body farms in presence of multiple declarations. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D60899: [analyzer] Unbreak body farms in presence of multiple declarations.

2019-04-22 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin added a comment. > Mmm, what are the pros and cons? This is how we do it in the ASTImporter. It allows us to correctly handle redeclarations with and without bodies - the declarations in the current AST remain unchanged but a new declaration appears. But it can be a kind of a profes

[PATCH] D60899: [analyzer] Unbreak body farms in presence of multiple declarations.

2019-04-22 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D60899#1473412 , @a_sidorin wrote: > the correct solution is to synthesize a shining new function and include it > into the redeclaration chain. Mmm, what are the pros and cons? Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D60899: [analyzer] Unbreak body farms in presence of multiple declarations.

2019-04-20 Thread Aleksei Sidorin via Phabricator via cfe-commits
a_sidorin accepted this revision. a_sidorin added a comment. This revision is now accepted and ready to land. Hi Artem, This looks good to me. However, it seems to me that the correct solution is to synthesize a shining new function and include it into the redeclaration chain. This requires much

[PATCH] D60899: [analyzer] Unbreak body farms in presence of multiple declarations.

2019-04-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a_sidorin, rnkovacs, mikhail.ramalho, Szelethus, baloghadamsoftware, Charusso. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, jfb, a.sidorin, JDevlieghere, szepet, kristof.beyls, javed.absar. Herald added a project: