C++: Add explanation.

This commit is contained in:
Geoffrey White
2020-09-04 14:55:55 +01:00
parent 96098c5244
commit 156a174cf4

View File

@@ -29,6 +29,11 @@ Function getConstructedFrom(Function f) {
* This should not happen in a single application but since we
* have a system wide view it is likely to happen for instance for
* the main function.
*
* Note: we use `getConstructedFrom` to ensure that we look at template
* functions rather than their instantiations. We get better results this way
* as the instantiation is artificial and may have inherited parameter names
* from the declaration rather than the definition.
*/
ParameterDeclarationEntry functionParameterNames(Function f, string name) {
exists(FunctionDeclarationEntry fe |