<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">
<div>I meant  the following (what I suggested earlier) will not work because t.a.err is empty.</div><div class="">
<div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">> ; RUN: cat %t.a.err | FileCheck --check-prefix=WARN-A %s</span></div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px">> WARN-A-NOT:  WARNING: Linking two modules of different target triples:</span></div>
</div>
<br></div><div class="gmail_extra">Your checkin is fine, but I think it is possible to simplify it with</div><div class="gmail_extra"><div class="gmail_extra">; RUN: llvm-link %s %S/Inputs/targettriple-a.ll -S 2>&1 | FileCheck %s --check-prefix=WARN-A</div>

<div class="gmail_extra">; RUN: llvm-link %s %S/Inputs/targettriple-b.ll -S 2>&1 | FileCheck %s --check-prefix=WARN-B<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">target triple = "e"</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">; WARN-A-NOT: WARNING: Linking two modules of different target triples:</div><div class="gmail_extra">; WARN-A: target triple = "e"</div><div class="gmail_extra">

<br></div><div class="gmail_extra">; WARN-B: WARNING: Linking two modules of different target triples:</div><div class="gmail_extra">; WARN-B: target triple = "e"</div></div></div></blockquote><div><br></div><div>
That could work too, but I think the original intent was to make sure that nothing gets emitted. I could change the test to:</div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra">
<div class="gmail_quote"><div>; WARN-A-NOT: WARNING:</div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div>To check that no warning got emitted, but at that point the existing check is strictly more general since it checks that nothing (including warnings) got emitted.</div>
<div><br></div><div>TL;DR: adding WARN-A-NOT is defensive since it's included in the other check, but removing the other check means we're testing for strictly less. I'm not sure that's a good idea.</div></div>
<br></div></div>