File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,6 @@ def debug_print(fmt, *args):
111
111
args = (inspect .currentframe ().f_back .f_lineno ,) + args
112
112
print (fmt % args )
113
113
114
-
115
114
else :
116
115
117
116
debug_caller_lineno = None
@@ -128,7 +127,6 @@ def trace_print(*args):
128
127
sys .stdout .write (" %s" % a )
129
128
sys .stdout .write ("\n " )
130
129
131
-
132
130
else :
133
131
134
132
def trace_print (* args ):
@@ -1470,7 +1468,7 @@ class Resolver(object):
1470
1468
C_MODIFIERS = "* & const constexpr static mutable" .split ()
1471
1469
C_MODIFIERS = set (C_MODIFIERS )
1472
1470
1473
- C_KEYWORDS = "extern virtual static explicit inline friend" .split ()
1471
+ C_KEYWORDS = "extern virtual static explicit inline friend constexpr " .split ()
1474
1472
C_KEYWORDS = set (C_KEYWORDS )
1475
1473
1476
1474
SubTypedefs = {} # TODO deprecate?
Original file line number Diff line number Diff line change @@ -2999,6 +2999,21 @@ def test_fn(self):
2999
2999
self .assertEqual (p ["defaultValue" ], "0.02" )
3000
3000
3001
3001
3002
+ class ConstExprFn_TestCase (unittest .TestCase ):
3003
+ def setUp (self ):
3004
+ self .cppHeader = CppHeaderParser .CppHeader (
3005
+ """
3006
+ constexpr int overloaded_constexpr(int a, int b, int c) { return a + b + c; }
3007
+ """ ,
3008
+ "string" ,
3009
+ )
3010
+
3011
+ def test_fn (self ):
3012
+ m = self .cppHeader .functions [0 ]
3013
+ self .assertEqual (m ["constexpr" ], True )
3014
+ self .assertEqual (m ["rtnType" ], "int" )
3015
+
3016
+
3002
3017
class DefaultEnum_TestCase (unittest .TestCase ):
3003
3018
def setUp (self ):
3004
3019
self .cppHeader = CppHeaderParser .CppHeader (
You can’t perform that action at this time.
0 commit comments