@@ -1325,7 +1325,7 @@ import IsUnreachableInCall
13251325 * Holds if access paths with `c` at their head always should be tracked at high
13261326 * precision. This disables adaptive access path precision for such access paths.
13271327 */
1328- predicate forceHighPrecision ( Content c ) { none ( ) }
1328+ predicate forceHighPrecision ( Content c ) { c instanceof ElementContent }
13291329
13301330/** Holds if `n` should be hidden from path explanations. */
13311331predicate nodeIsHidden ( Node n ) {
@@ -1396,7 +1396,8 @@ private predicate unionHasApproxName(Cpp::Union u, string s) { s = u.getName().c
13961396cached
13971397private newtype TContentApprox =
13981398 TFieldApproxContent ( string s ) { fieldHasApproxName ( _, s ) } or
1399- TUnionApproxContent ( string s ) { unionHasApproxName ( _, s ) }
1399+ TUnionApproxContent ( string s ) { unionHasApproxName ( _, s ) } or
1400+ TElementApproxContent ( )
14001401
14011402/** An approximated `Content`. */
14021403class ContentApprox extends TContentApprox {
@@ -1427,6 +1428,10 @@ private class UnionApproxContent extends ContentApprox, TUnionApproxContent {
14271428 final override string toString ( ) { result = s }
14281429}
14291430
1431+ private class ElementApproxContent extends ContentApprox , TElementApproxContent {
1432+ final override string toString ( ) { result = "ElementApprox" }
1433+ }
1434+
14301435/** Gets an approximated value for content `c`. */
14311436pragma [ inline]
14321437ContentApprox getContentApprox ( Content c ) {
@@ -1441,6 +1446,9 @@ ContentApprox getContentApprox(Content c) {
14411446 u = c .( UnionContent ) .getUnion ( ) and
14421447 unionHasApproxName ( u , prefix )
14431448 )
1449+ or
1450+ c instanceof ElementContent and
1451+ result instanceof ElementApproxContent
14441452}
14451453
14461454/**
@@ -1700,6 +1708,14 @@ class DataFlowSecondLevelScope extends TDataFlowSecondLevelScope {
17001708/** Gets the second-level scope containing the node `n`, if any. */
17011709DataFlowSecondLevelScope getSecondLevelScope ( Node n ) { result .getANode ( ) = n }
17021710
1711+ /**
1712+ * Gets the maximum number of indirections to use for `ElementContent`.
1713+ *
1714+ * This should be equal to the largest number of stars (i.e., `*`s) in any
1715+ * `Element` content across all of our MaD summaries, sources, and sinks.
1716+ */
1717+ int getMaxElementContentIndirectionIndex ( ) { result = 5 }
1718+
17031719/**
17041720 * Module that defines flow through iterators.
17051721 * For example,
0 commit comments