Sitelet https://web.archive.org/web/20221121050242im_/https://github.com/github/codeql/pull/11314
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

C++: Fix flow out of const member functions #11314

Open
wants to merge 2 commits into
base: mathiasvp/replace-ast-with-ir-use-usedataflow
Choose a base branch
from

Conversation

MathiasVP
Copy link
Contributor

@MathiasVP MathiasVP commented Nov 16, 2022

This implements #5196, but for IR-based use-use dataflow library. The motivation for this "hack" is to get flow in the following example (which I've taken from our library tests):

class C_const_member_function {
  char* data_;
public:
  char* data() const { return data_; }
};

void test_with_const_member(char* source) {
  C_const_member_function c;
  memcpy(c.data(), source, 16);
  sink(c.data()); // $ ast,ir
}

and apparently, this was also the missing flow for some of the smart pointer tests 🎉.

@MathiasVP MathiasVP requested a review from a team as a code owner Nov 16, 2022
@github-actions github-actions bot added the C++ label Nov 16, 2022
@MathiasVP MathiasVP added the no-change-note-required This PR does not need a change note label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C++ no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant