<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/104805/">http://git.reviewboard.kde.org/r/104805/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">hm considering that __attribute__ is not part of the standard anyways, removing it from our parser and workarounding it with such an empty macro sounds fine to me.
please add a unit test in cpp/tests/test_cppcodecompletion.cpp (ignore the file name...). there you have e.g. testPreprocessor() which shows you how to test this, e.g. by assuring
a)
#ifdef __attribute__
#define FOO 1
#else
#define FOO 0
#endif
FOO
=> preprocessed == 1
b)
#undef __attribute__
__attribute__(1)
=> preprocessed == "" (empty)</pre>
<br />
<p>- Milian</p>
<br />
<p>On May 1st, 2012, 11:36 a.m., Ivan Shapovalov wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for KDevelop.</div>
<div>By Ivan Shapovalov.</div>
<p style="color: grey;"><i>Updated May 1, 2012, 11:36 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">MinGW system headers tend to undefine __attribute__ (which is internally defined to no-op in the KDevelop preprocessor since C++ parser cannot handle it correctly in all cases).
Patch just adds "fixed" property to the definition.
Also, removed from parser some dead code related to __attribute__ parsing, since it handles only one case from possibly infinite number of these.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Used it with MinGW and normal system headers, no regressions detected. Unit-tests are passed.
BTW: I couldn't find out how to use the standard preprocessing environment (which has been modified) in preprocessor unit-tests, so no unit-tests added.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>languages/cpp/parser/lexer.cpp <span style="color: grey">(d097710)</span></li>
<li>languages/cpp/parser/parser.cpp <span style="color: grey">(172b6b6)</span></li>
<li>languages/cpp/parser/tokens.h <span style="color: grey">(77ab417)</span></li>
<li>languages/cpp/parser/tokens.cpp <span style="color: grey">(7df4bb9)</span></li>
<li>languages/cpp/setuphelpers.cpp <span style="color: grey">(59bb850)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/104805/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>