<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sun, Jan 29, 2017 at 10:21 AM Richard Smith via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">rsmith accepted this revision.<br class="gmail_msg">
rsmith added inline comments.<br class="gmail_msg">
This revision is now accepted and ready to land.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
Comment at: lib/AST/ExternalASTSource.cpp:33<br class="gmail_msg">
+ExternalASTSource::hasExternalDefinitions(unsigned ID) {<br class="gmail_msg">
+  return EK_ReplyHazy;<br class="gmail_msg">
+}<br class="gmail_msg">
----------------<br class="gmail_msg">
dblaikie wrote:<br class="gmail_msg">
> rsmith wrote:<br class="gmail_msg">
> > You should add support for this function to `clang::MultiplexExternalSemaSource` too.<br class="gmail_msg">
> Done - though is there any test coverage I should add? Not sure exactly when/where/how this is used.<br class="gmail_msg">
><br class="gmail_msg">
> Also only made a rough guess at what the right behavior is here. It could be a bit more obvious if I made "hasExternalDefinitions" return Optional<ExtKind> - then when we find an ExternalASTSource that owns the ID (are the IDs unique across the MultiplexExternalSemaSource? I assume they have to be, but thought they'd only be valid within a single Module... guess I'm confused in a few ways - certainly haven't thought about it in great detail) we'd know to stop asking other sources. Probably not worth it unless there's a lot of sources?<br class="gmail_msg">
You could test this with `-chain-include`. I don't think there's any other in-tree way to get multiple external sources.<br class="gmail_msg"></blockquote><div><br></div><div>Ah - guess that doesn't make for very interesting testing, then - since I wouldn't be able to make those external sources with interesting differences in ExtDefs, I think? Happy to chat more if it's worth testing/I've not understood how to exercise this.<br><br>- Dave</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D28845" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28845</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>