<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Il giorno 27/dic/2011, alle ore 00:06, Richard Smith ha scritto:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>Take a look at the output of clang -Xclang -ast-dump-xml -S -o -. Testcase:<br><br>typedef unsigned size_t; size_t n = ~size_t(0);<br><br>Before:<br><br>  (CXXFunctionalCastExpr 0x5b08100 <col:38, col:46> 'size_t':'unsigned int'<br>functional cast to size_t <NoOp><br>    (ImplicitCastExpr 0x5f7b0e8 <col:45> 'size_t':'unsigned int' <IntegralCast><br><br>After:<br><br>  (CXXFunctionalCastExpr 0x58ae778 <col:44, col:46> 'size_t':'unsigned int'<br>functional cast to size_t <IntegralCast><br><br>On the one hand, the cast expression is fixed. On the other, the source range<br>for this cast is now incorrect. It was:<br><br>typedef unsigned size_t; size_t n = ~size_t(0);<br>                                     ~~~~~~~~~<br><br>... and now is:<br><br>typedef unsigned size_t; size_t n = ~size_t(0);<br>                                           ~~~<br></div></blockquote><div><br></div><div>Ok, this new patch resolve this problem.</div><div>Another two failed tests remain, always in the Index area:</div><div><br></div><div><div>FAIL: Clang :: Index/get-cursor.cpp (2194 of 4105)</div><div>******************** TEST 'Clang :: Index/get-cursor.cpp' FAILED ********************</div><div>Script:</div><div>--</div><div>c-index-test -cursor-at=/Users/gigabytes/llvm/tools/clang/test/Index/get-cursor.cpp:14:23 /Users/gigabytes/llvm/tools/clang/test/Index/get-cursor.cpp | FileCheck -check-prefix=CHECK-VALUE-REF /Users/gigabytes/llvm/tools/clang/test/Index/get-cursor.cpp</div><div>Exit Code: 1</div><div>Command Output (stderr):</div><div>--</div><div>/Users/gigabytes/llvm/tools/clang/test/Index/get-cursor.cpp:55:21: error: expected string not found in input</div><div>// CHECK-VALUE-REF: DeclRefExpr=value:10:12</div><div>                    ^</div><div><stdin>:1:1: note: scanning from here</div><div>CompoundStmt=</div><div>^</div><div>--</div><div><br></div><div>********************</div><div>FAIL: Clang :: Index/recursive-cxx-member-calls.cpp (2236 of 4105)</div><div>******************** TEST 'Clang :: Index/recursive-cxx-member-calls.cpp' FAILED ********************</div><div>Script:</div><div>--</div><div>c-index-test -test-annotate-tokens=/Users/gigabytes/llvm/tools/clang/test/Index/recursive-cxx-member-calls.cpp:1:1:186:1 /Users/gigabytes/llvm/tools/clang/test/Index/recursive-cxx-member-calls.cpp 2>&1 | FileCheck -check-prefix=CHECK-tokens /Users/gigabytes/llvm/tools/clang/test/Index/recursive-cxx-member-calls.cpp</div><div>c-index-test -test-load-source all /Users/gigabytes/llvm/tools/clang/test/Index/recursive-cxx-member-calls.cpp 2>&1 | FileCheck /Users/gigabytes/llvm/tools/clang/test/Index/recursive-cxx-member-calls.cpp</div><div>--</div><div>Exit Code: 1</div><div>Command Output (stderr):</div><div>--</div><div>/Users/gigabytes/llvm/tools/clang/test/Index/recursive-cxx-member-calls.cpp:964:18: error: expected string not found in input</div><div>// CHECK-tokens: Punctuation: ")" [105:62 - 105:63] CXXFunctionalCastExpr=</div><div>                 ^</div><div><stdin>:777:1: note: scanning from here</div><div>Punctuation: ")" [105:62 - 105:63] CallExpr=StringSwitch:87:12</div><div>^</div><div><br></div><div>The first is very strange. If I get the output of c-index-test -test-annotate-tokens, I correctly find the DeclRefExpr=value:10:12 line. If I try the tested command line, at offset 14:23 (which should be 14:21)</div><div>the output is CompoundStmt=. There's something I'm missing about how this check works.</div></div><div><br></div><div>Any clue? The point is always the same: I can't understand if my patch breaks something or if the tests have simply to be adapted to the new AST structure.</div><br><blockquote type="cite"><div><br>- Richard<br><br></div></blockquote></div><br><div>Thank you,</div><div>Nicola</div><div><br></div><div></div></body></html>