<div>Hi Jordan,</div><div>I understand it's overall purpose now. However, need some more clarity. So does this mean that if system-header-simulator.h is included </div><div>in a test file all system function declarations in system headers will be overridden by those in system-header-simulator.h ?</div>
<div>In effect, i want to know what #pragma clang system_header" means or what it does? </div><div>I know #pragma clang is a directive to clang and it is informing something about system headers to clang but precisely what is my question.</div>
<div>Does it also mean that it should be possible to compile a test file invoking system functions by just including system-header-simulator.h </div><div>file and not including the system headers directly ? </div><div>I did try by including malloc in test file div-zero.cpp and including system-header-simulator.h instead of stdlib.h, but fails to compile.</div>
<div><br></div><div>Thanks in advance.</div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote">
On Fri, Feb 1, 2013 at 2:39 PM, Csaba Raduly <span dir="ltr"><<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thu, Jan 31, 2013 at 6:23 PM, Jordan Rose  wrote:<br>
> Hi, Jyoti. The static analyzer treats some functions differently if they<br>
> come from a system header -- for example, it is assumed that system<br>
> functions do not arbitrarily free() their parameters, and that some bugs<br>
> found in system headers cannot be fixed by the user and should be<br>
> suppressed. system-header-simulator.h uses "#pragma clang system_header" so<br>
> that this behavior can be tested without relying on the actual headers on<br>
> your system.<br>
<br>
</div>There ought to be a comment to that effect :)<br>
<span><font color="#888888"><br>
Csaba<br>
--<br>
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>
The Tao of math: The numbers you can count are not the real numbers.<br>
Life is complex, with real and imaginary parts.<br>
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds<br>
"People disagree with me. I just ignore them." -- Linus Torvalds<br>
</font></span></blockquote></div><br>
</div></div></blockquote></div><br>