[PATCH] D35216: [analyzer] Escape symbols when creating std::initializer_list.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 06:27:50 PDT 2017


NoQ marked an inline comment as done.
NoQ added a comment.

We've discussed it in person with Devin, and he provided more points to think about:

- If the initializer list consists of non-POD data, constructors of list's objects need to take the sub-region of the list's region as `this`-region In the current (v2) version of this patch, these objects are constructed elsewhere and then trivial-copied into the list's metadata pointer region, which may be incorrect. This is our overall problem with C++ constructors, which manifests in this case as well. Additionally, objects would need to be constructed in the analyzer's core, which would not be able to predict that it needs to take a checker-specific region as `this`-region, which makes it harder, though it might be mitigated by sharing the checker state traits.

- Because "ghost variables" are not material to the user, we need to somehow make super sure that they don't make it into the diagnostic messages.

So, because this needs further digging into overall C++ support and rises too many questions, i'm delaying a better approach to this problem and will fall back to the original trivial patch.


https://reviews.llvm.org/D35216





More information about the cfe-commits mailing list