<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'd like to add a fixit (or two) to suggest parentheses in the following expressions:</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="color: #000000;background-color: #fffffe;font-family: Consolas, ">
<div><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> struct</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> S {
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">float</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> value; };</span></div>
<div><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> S
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">operator</span><span style="color: rgb(163, 21, 21); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">""</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">
_f(</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">long</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">double</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> t);</span></div>
<br>
<div><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">void</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> test() {</span></div>
<div><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">int</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> i =
</span><span style="color: rgb(48, 48, 192); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">0x2e</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">+</span><span style="color: rgb(163, 21, 21); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">'a'</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">;
// fixit: (0x2e)+'a'<br>
</span></div>
<span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">float</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> j =
</span><span style="color: rgb(9, 136, 90); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">100.0</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">_e-</span><span style="color: rgb(9, 136, 90); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">10.0</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">;
// fixit: (100.0_e)-10.0<br>
</span>
<div><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">float</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> k =
</span><span style="color: rgb(9, 136, 90); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">100.0</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">_f.value; // fixit: (100.0_f).value<br>
</span></div>
<div><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">
</span><span style="color: rgb(0, 0, 255); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">int</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> l =
</span><span style="color: rgb(48, 48, 192); font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">0x2e</span><span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;">+i; // fixit:
(0x2e)+i<br>
</span></div>
<div><span></span></div>
</div>
<span style="font-family: Consolas, Courier, monospace; font-size: 10pt; line-height: normal;"> }</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
However, I am not sure of the correct way to do this.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Would someone, please, give me a quick tutorial or, if easier, point out an similar example in the clang code.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Many thanks,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Andy<br>
</div>
</body>
</html>