daca.cfg: Turned macros into functions to avoid problems with macros like 'MIN(a,b,c)'.

This commit is contained in:
orbitcowboy 2019-04-05 09:28:15 +02:00
parent 45a7038fbb
commit 1b9b5168d0
1 changed files with 25 additions and 4 deletions

View File

@ -1,7 +1,28 @@
<?xml version="1.0"?>
<def format="2">
<!-- This configuration is used in daca@home and contains some common practice macros which are helpful for daca analysis. -->
<define name="MAX(a,b)" value="(((a) &gt; (b)) ? (a) : (b))"/>
<define name="MIN(a,b)" value="(((a) &lt; (b)) ? (a) : (b))"/>
<!-- This configuration is used in daca@home and contains some common practice macros and functions which are helpful for daca analysis. -->
<function name="MIN">
<use-retval/>
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue>arg1&lt;arg2?arg1:arg2</returnValue>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
</function>
<function name="MAX">
<use-retval/>
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue>arg1&gt;arg2?arg1:arg2</returnValue>
<arg nr="1" direction="in">
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-uninit/>
</arg>
</function>
</def>