<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 16, 2009, at 1:28 AM, Cédric Venet wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br><br>I tried to compile my simple test:<br><br>#define __declspec<br>#include <vector><br><br>int main() {<br> std::vector<int> v;<br> return 0;<br>}<br><br>and for the first time the include of <vector> work (ie no parsing error), good. </div></blockquote><div><br></div><div>Yes, we're able to parse a bunch of libstdc++ headers now without spurious errors, but (as you've seen) we're a long way from being able to handle C++ programs.</div><br><blockquote type="cite"><div>(note that I am using clang on windows with the mingw 3.4.5 headers and that the define __declspec is needed. perhaps it should be added to  the predefined macro? as clang support the dllimport attribute)<br></div></blockquote><div><br></div><div>We have some support for parsing __declspec already, but I'm sure that we're missing it when parsing some C++ constructs. What kinds of problems are you seeing with __declspec?</div><div><br></div><blockquote type="cite"><div>now, the instanciation of the vector assert:<br><br>Assertion failed: false && "Unable to find declaration for the current instantiation", file ..\..\..\..\..\tools\clang\lib\Sema\SemaTemplateInstantiateDecl.cpp, line 1411<br></div></blockquote></div><div><br></div><div>FWIW, this is coming from an attempt to instantiate a default argument expression in a template (that refers to a typedef), e.g.,</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(186, 39, 161); ">template<span style="color: #000000"><</span>typename<span style="color: #000000"> </span><span style="color: #4f8087">T</span><span style="color: #000000">></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(186, 39, 161); ">struct<span style="color: #000000"> X1 {</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">  <span style="color: #ba27a1">typedef</span> T value_type;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(112, 57, 169); "><span style="color: #000000">  X1(</span><span style="color: #ba27a1">const</span><span style="color: #000000"> </span>value_type<span style="color: #000000">& </span><span style="color: #32595d">value</span><span style="color: #000000"> = </span>value_type<span style="color: #000000">());</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">};</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: #ba27a1">void</span> test_X1() {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">  X1<<span style="color: #ba27a1">int</span>> x1;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">}</div><div><font class="Apple-style-span" face="Menlo" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div></div><div>I should have a fix soon.</div><div><br><div><span class="Apple-tab-span" style="white-space:pre">       </span>- Doug</div></div></body></html>