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
new expression parsing failure #8467
Comments
|
What exactly is the behaviour you want that you are not seeing? The call to |
|
When I am trying to run this query in order to check the allocation type |
|
Thanks for reporting this issue @MFaisalZaki. I've created an internal issue for tracking this. |
|
Hi @MFaisalZaki, Just for my understanding. When you tried to parse the placement new from your example, did you also When I locally try this and |
|
@jketema That's true; you must include |
|
Hi @MFaisalZaki Thanks for the clarification. There's definitely an issue here, which we'll keep tracking.
Note that the To compare the allocation type and the type of the placement pointer, a better approach is to use the predicates directly defined on import cpp
from NewExpr new, Expr placementPtr
where placementPtr = new.getPlacementPointer()
select placementPtr, placementPtr.getUnderlyingType().(PointerType).getBaseType(),
new.getAllocatedType().getUnderlyingType()For your example this give me: |
CodeQL fails to parse
newexpressions like:This issue arose when trying to implement SEI CERT C++ rules using CodeQL.
The text was updated successfully, but these errors were encountered: