<div dir="ltr">No, there are no end-to-end execution tests that live in the clang or LLVM repositories and are expected to run before check-in. The IR FileCheck tests give us enough faith that everything is working properly.<div><br></div><div>Fortunately, it is *very* easy to self-host clang or build any other software you have access to and run its tests.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 8:10 PM, Nothing <span dir="ltr"><<a href="mailto:bluechristlove@163.com" target="_blank">bluechristlove@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div><div style="line-height:23.7999992370605px">Richard Smith,Thanks. </div><div style="line-height:23.7999992370605px">But in my opinion, the compiler should have such test for running behavior for stronger, more careful test, especially some code has running behavior(such as virtual function, exception and so on). So, if clang doesn't have this end-to-end test, how about LLVM?</div></div><div style="line-height:23.7999992370605px"><br></div><div style="line-height:23.7999992370605px">Best Regards</div><div><br></div><div>Wu Zhao</div><div><div class="h5"><br><br><br><div></div><div></div><br><pre><br>At 2015-01-21 11:28:48, "Richard Smith" <<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>> wrote:
>On Tue, Jan 20, 2015 at 6:49 PM, Nothing <<a href="mailto:bluechristlove@163.com" target="_blank">bluechristlove@163.com</a>> wrote:
>> Hi everyone!
>> I'm trying to write a translator to translate LLVM IR to another
>> IR(named 'X'). That's to say I use the result of Clang but do not use LLVM
>> Backend. You can think I use Clang + Another IR('X') + Another Backend(Can
>> recognize 'X'). Here, I want to know where is the test of Clang?
>>
>> First of all, I want to list the information I have known so far.
>> 1. clang-test repository in the LLVM
>> The standalone repository I found yesterday. I found many test files
>> in this folder but I didn't know whether it is the all test files of Clang,
>> because I found that these are mainly from gcc test suite, especially I
>> didn't know whether it contained C++11, C++1y test cases or not.
>>
>> 2. tests in the Clang repository
>> In the Clang repository, there is also one tests folder which has
>> 'SemaCXX', 'SemaTemplate' and so on. But I find that it is tested by verify
>> files. I think I need the running result(Because I use Clang, if I compile
>> it, it can compile perfectly). For example:
>>
>> // a.cc
>>
>> int func() {
>> int a = 1;
>> int b = 3;
>> return a + b;
>> }
>> int main() {
>> std::cout << func();
>> return 0;
>> }
>> if I run a.cc, the result will be 4. if I can have one 'expected_result'
>> file, I can know whether it is the correct result or not.
>>
>> The problem is that I do not whether Clang has this kind test suite, i.e.
>> one test file(such as a.cc), one expected result file(such as a.expected).
>
>The clang repository itself does not contain such end-to-end tests (we
>prefer to test that correct diagnostics or IR are generated for our
>pre-checkin unit tests), but we have some in the test-suite
>repository, see:
>
><a href="http://llvm.org/svn/llvm-project/test-suite/" target="_blank">http://llvm.org/svn/llvm-project/test-suite/</a>
><a href="http://llvm.org/docs/TestingGuide.html#test-suite" target="_blank">http://llvm.org/docs/TestingGuide.html#test-suite</a>
</pre></div></div></div><br><br><span title="neteasefooter"><span></span></span><br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>