Unverified Commit 37c19f9a authored by Alejandro Álvarez Ayllón's avatar Alejandro Álvarez Ayllón Committed by GitHub
Browse files

[analyzer] UnixAPIMisuseChecker Get O_CREAT from preprocessor (#81855)

Now calling `open` with the `O_CREAT` flag and no mode parameter will
raise an issue in any system that defines `O_CREAT`.

The value for this flag is obtained after the full source code has been
parsed, leveraging `checkASTDecl`.
Hence, any `#define` or `#undefine` of `O_CREAT` following an `open` may
alter the results. Nevertheless, since redefining reserved identifiers
is UB, this is probably ok.
parent c7799fad
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment