<div dir="ltr">Hi Anton, and welcome! Richard (CCed) will tell us if this is indeed a clang bug. I can give you some general comments in the meantime:<div><br></div><div>Patches that need review are sent to cfe-commits or attached to Phabricator (code review tool we use). They mostly go unnoticed in bugzilla.</div><div><br></div><div>Please use clang-format to format the code.</div><div><br></div><div>We'll need a test for this. It's also a good practice to provide a code sample that demonstrates the issue when reporting a bug (this is what usually ends up being your test). Have a look at existing test infrastructure, namely -verify switch and expected-error "annotation". The test should probably go to test/SemaTemplate/temp_class_spec.cpp</div><div><br></div><div>auto const ThisPartialSpec should be const auto *ThisPartialSpec<br></div><div><br></div><div>auto InstantiatedFrom should beĀ auto *InstantiatedFrom<br></div><div><br></div><div>Other than that your code looks good, but I can't really comment on the logic.</div><div><br></div><div>Nikola</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 11:45 PM, Anton Bikineev <span dir="ltr"><<a href="mailto:ant.bikineev@gmail.com" target="_blank">ant.bikineev@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
I'm sorry to partially duplicate this post from cfe-commits,<br>
but probably that was wrong place to ask this question.<br>
<br>
I recently found that Clang doesn't behave similiar as GCC<br>
in case of partial specialization ater implicit or explicit<br>
specialization of class template. GCC gives diagnostic like<br>
<br>
"error: partial specialization of 'A<const T*>' after instantiation of<br>
'A<const char*>'"<br>
<br>
while Clang just ignores it and instantiates previously declared<br>
templates by lookup. I looked over the Standard and found:<br>
<br>
C++ [temp.class.spec]p1:<br>
"A partial specialization shall be declared before the first<br>
use of a class template specialization that would make use of<br>
the partial specialization as the result of an implicit or explicit<br>
instantiation in every translation unit in which such a use occurs;<br>
no diagnostic is required."<br>
<br>
So it seems to me that GCC has a right behaviour for this. I also<br>
submitted a bug <a href="http://llvm.org/bugs/show_bug.cgi?id=21156" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=21156</a> and<br>
wrote a patch, which I attached to bug. I just was wondering,<br>
does this patch really make sense? I'm newbie in Clang and my code<br>
may be incorrect but I would be extremely thankful if someone<br>
could review it (if it really makes sense).<br>
<br>
I'm also not sure, probably Clang has its own politics for this.<br>
If so, what is a reason of such behavior?<br>
<br>
<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>
</blockquote></div><br></div>