File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -810,6 +810,32 @@ class code_typet:public typet
810
810
return !p.empty () && p.front ().get_this ();
811
811
}
812
812
813
+ /* ******************************************************************\
814
+ Function: code_typet::get_this
815
+
816
+ Purpose:
817
+ Get the this parameter for the current function type
818
+
819
+ Inputs:
820
+ thisParameter: An output parameter to receive the parametert for
821
+ the this parameter for the current function
822
+
823
+ Outputs:
824
+ true if the current function type does not have a this parameter
825
+
826
+ \*******************************************************************/
827
+ bool get_this (const parametert *&thisParameter) const
828
+ {
829
+ const parameterst ¶ms=parameters ();
830
+ if (params.empty ())
831
+ return true ; // No parameters to function
832
+ const parametert &possible_fn_this=params.front ();
833
+ if (!possible_fn_this.get_this ())
834
+ return true ; // No this parameter to function
835
+ thisParameter=&possible_fn_this;
836
+ return false ;
837
+ }
838
+
813
839
bool is_KnR () const
814
840
{
815
841
return get_bool (ID_C_KnR);
You can’t perform that action at this time.
0 commit comments