Skip to content

Commit

Permalink
C++: Don't generate parameter nodes for bodyless parameters when ther…
Browse files Browse the repository at this point in the history
…e is a summary of the enclosing function.
  • Loading branch information
MathiasVP committed Jan 24, 2025
1 parent cda629b commit ad80b36
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ class CastNode extends Node {
}

cached
private newtype TDataFlowCallable =
newtype TDataFlowCallable =
TSourceCallable(Cpp::Declaration decl) {
not decl instanceof FlowSummaryImpl::Public::SummarizedCallable
} or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ private newtype TIRDataFlowNode =
TFinalGlobalValue(Ssa::GlobalUse globalUse) or
TInitialGlobalValue(Ssa::GlobalDef globalUse) or
TBodyLessParameterNodeImpl(Parameter p, int indirectionIndex) {
not exists(TSummarizedCallable(p.getFunction())) and
// Rule out parameters of catch blocks.
not exists(p.getCatchBlock()) and
// We subtract one because `getMaxIndirectionsForType` returns the maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ postWithInFlow
| test.cpp:1077:10:1077:11 | swap output argument | PostUpdateNode should not be the target of local flow. |
viableImplInCallContextTooLarge
uniqueParameterNodeAtPosition
| ../../../include/iterator.h:22:3:22:10 | iterator | *0 | ../../../include/iterator.h:22:3:22:10 | [summary param] *0 in iterator | Parameters with overlapping positions. |
| ../../../include/iterator.h:22:3:22:10 | iterator | *0 | ../../../include/iterator.h:22:67:22:71 | *other | Parameters with overlapping positions. |
uniqueParameterNodePosition
uniqueContentApprox
identityLocalStep
Expand Down

0 comments on commit ad80b36

Please sign in to comment.