C++: Simplify getConstructedFrom.

This commit is contained in:
Geoffrey White
2020-09-04 14:52:01 +01:00
parent 2472b40b31
commit 96098c5244

View File

@@ -16,10 +16,7 @@ import cpp
* is not from a template instantiation.
*/
Function getConstructedFrom(Function f) {
exists(Function mid |
f.isConstructedFrom(mid) and
result = getConstructedFrom(mid)
)
f.isConstructedFrom(result)
or
not f.isConstructedFrom(_) and
result = f