<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 3, 2015 at 9:42 AM, Peter Stirling <span dir="ltr"><<a href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>I've done a bit of debugging to find
the source of the crash:<br>
<br>
Sema::LazilyCreateBuiltin() calls Sema::PushOnScopeChains()
passing Sema.TUScope, and PushOnScopeChains() doesn't test for
nullptr. <br>
<br>
It appears that TUScope is always null (or at least by the time of
the first check for error-free instantiation it is null). Is this
expected?</div></div></blockquote><div><br></div><div>Yes, the TUScope only lives until the end of the TU. If you want to do more template instantiation after parsing, you can call Preprocessor::enableIncrementalProcessing() to let Clang know that the end of the main source file isn't the end of the TU.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000"><div><div><div class="h5">
On 01/06/15 11:45, Peter Stirling wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div>Trying this again...<br>
<br>
Using this code:<br>
<br>
if(inInstantiation) {<br>
std::cerr << wrapGreen("testing ", colour) <<
declToString(d) << "(";<br>
bool seen = false;<br>
for(auto param : d->params()) {<br>
if(seen) {<br>
std::cerr << ", ";<br>
}<br>
seen = true;<br>
std::cerr <<
wrapGreen(typeToString(param->getType()), colour);<br>
}<br>
std::cerr << ")\n";<br>
clang::Sema::SFINAETrap trap(sema);<br>
sema.InstantiateFunctionDefinition(d->getParent()->getLocation(),
d, true, true);<br>
if(trap.hasErrorOccurred()) {<br>
std::cerr << wrapRed("test failed\n", colour);<br>
return false;<br>
}<br>
else {<br>
std::cerr << wrapGreen("test passed\n", colour);<br>
}<br>
}<br>
<br>
I was hoping to find out if there were instantiation errors with
methods. However on my test TU it crashes with the backtrace in
my previous email. In a simpler TU it doesn't crash, but it also
doesn't work! Here is the last page of its output:<br>
<br>
testing std::__1::pair<int const, int
const>::swap(std::__1::pair<int const, int const>&)<br>
In file included from
/home/peter/Programming/llvm/extra-dir/quaff/test.cc:1:<br>
In file included from
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/utility:157:<br>
In file included from
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/__tuple:16:<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/type_traits:3592:38:
error: no matching function for call to 'swap'<br>
_NOEXCEPT_(_NOEXCEPT_(swap(*_VSTD::declval<_ForwardIterator1>(),<br>
^~~~<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/__config:362:34:
note: expanded from macro '_NOEXCEPT_'<br>
# define _NOEXCEPT_(x) noexcept(x)<br>
^<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/__config:362:34:
note: expanded from macro '_NOEXCEPT_'<br>
# define _NOEXCEPT_(x) noexcept(x)<br>
^<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/utility:391:16:
note: in instantiation of exception specification for
'iter_swap<const int *, const int *>' requested here<br>
_VSTD::iter_swap(&first, &__p.first);<br>
^<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/utility:253:30:
note: in instantiation of member function
'std::__1::pair<const int, const int>::swap' requested
here<br>
struct _LIBCPP_TYPE_VIS_ONLY pair<br>
^<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/type_traits:3573:5:
note: candidate template ignored: disabled by 'enable_if' [with
_Tp = const int]<br>
is_move_constructible<_Tp>::value &&<br>
^<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/type_traits:3595:5:
error: no matching function for call to 'swap'<br>
swap(*__a, *__b);<br>
^~~~<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/utility:391:16:
note: in instantiation of function template specialization
'std::__1::iter_swap<const int *, const int *>' requested
here<br>
_VSTD::iter_swap(&first, &__p.first);<br>
^<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/utility:253:30:
note: in instantiation of member function
'std::__1::pair<const int, const int>::swap' requested
here<br>
struct _LIBCPP_TYPE_VIS_ONLY pair<br>
^<br>
/home/peter/Programming/llvm/ninja/bin/../include/c++/v1/type_traits:3573:5:
note: candidate template ignored: disabled by 'enable_if' [with
_Tp = const int]<br>
is_move_constructible<_Tp>::value &&<br>
^<br>
test passed<br>
testing std::__1::pair<int const, int const>::~pair()<br>
test passed<br>
testing std::__1::pair<int const, int const>::~pair()<br>
test passed<br>
Handled 517 functions<br>
Handled 120 functions that didn't require a wrapper<br>
Skipped 264 functions due to unsafe types<br>
Excluded 2 functions, due to function or type name blacklist<br>
Skipped 4 deleted functions<br>
Handled 429 instantiated template methods<br>
sending output to
/home/peter/Programming/llvm/extra-dir/quaff/test.cc.json<br>
Saw 281 type(s) and 364 qual-type(s)<br>
6 errors generated.<br>
Error while processing
/home/peter/Programming/llvm/extra-dir/quaff/test.cc.<br>
<br>
So, the SFINAETrap is returning false from hasErrorOccurred()
even though, clearly, errors are happening. How am I supposed to
use it?<br>
<br>
On 09/05/15 22:00, Peter Stirling wrote:<br>
</div>
<blockquote type="cite">
<div>I forgot to mention that I'm also
spamming each test as it's performed, the last few lines of
which are:<br>
<br>
std::__1::__tuple_like<std::__1::pair<TagLib::String,
TagLib::StringList> const>::operator =<br>
std::__1::pair<unsigned long, unsigned long>::operator =<br>
std::__1::pair<unsigned long, unsigned long>::operator =<br>
std::__1::pair<unsigned long, unsigned long>::swap<br>
std::__1::pair<TagLib::String const,
TagLib::StringList>::operator =<br>
<br>
So it appears to be crashing on the first instantiation of
std::pair::operator= with a const type<br>
<br>
On 09/05/15 21:36, Peter Stirling wrote:<br>
</div>
<blockquote type="cite">
<div>On 04/05/15 19:00, Reid Kleckner
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Sat, May 2, 2015 at 2:06 PM,
Peter Stirling <span dir="ltr"><<a href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
<div>
<div>On 28/04/15 23:31, Reid Kleckner wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Wed, Apr 15,
2015 at 10:25 PM, Peter Stirling <span dir="ltr"><<a href="mailto:peter@pjstirling.plus.com" target="_blank">peter@pjstirling.plus.com</a>></span>
wrote:
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
Visitor::RequestCompleteType()
calls
Sema::RequireCompleteType()
(which IMO has the wrong name,
it returns false on what I would
consider, from the name,
success).<br>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>Much has been made about the
sense of boolean return values in
Clang. It isn't consistent or sane,
but such is life. =/</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div> So, I don't construct the
specializations for methods
directly in my code, I assume
that some of the instantiation
is performed by
RequireCompleteType(), but
surely if I checked for SFINAE
at that level then I would lose
EVERY methods for
std::pair<int const, int
const> and not just the ones
that involve mutation?</div>
</div>
</blockquote>
<div><br>
</div>
<div>I think RequireCompleteType won't
instantiate all the member
functions, like operator=, but you
can look it up, and ask for an
instantiation of it.</div>
</div>
</div>
</div>
</blockquote>
<br>
</div>
</div>
Perhaps I misunderstand what you mean by
'instantiate' but this doesn't seem to be the
case. When I walk the CXXRecordDecl for
'std::pair<int const, int const>' there ARE
declarations for the methods that require
mutation. My tool scans the AST for functions and
methods and outputs a file containing functions
that invoke the ones it finds, which is then
compiled into a shared library, so what I want is
protection against functions that can't be called.<br>
<br>
How do I go about asking for an instantiation of a
method on its own?<br>
</div>
</blockquote>
</div>
<br>
</div>
<div class="gmail_extra">Right, instantiating the class
will create decls of all the member functions, but the
bodies will be empty because C++ essentially requires
that they be parsed lazily. I'd have to lookup the
detailed mechanics, but you should be able to look at
the method decl, figure out that it needs instantiation,
instantiate it, and put the error trap around that.</div>
</div>
</blockquote>
<br>
I added the following test:<br>
<br>
if(inInstantiation) {<br>
clang::Sema::SFINAETrap trap(sema);<br>
sema.InstantiateFunctionDefinition(d->getParent()->getLocation(),
d, true, true);<br>
if(trap.hasErrorOccurred()) {<br>
return false;<br>
}<br>
}<br>
<br>
Now I'm hitting a seg-fault (null pointer) deep inside clang:<br>
<br>
Program received signal SIGSEGV, Segmentation fault.<br>
clang::Scope::getEntity (this=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/Sema/Scope.h:310<br>
310 DeclContext *getEntity() const { return Entity; }<br>
(gdb) bt<br>
#0 clang::Scope::getEntity (this=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/Sema/Scope.h:310<br>
#1 0x00007ffff535cdaf in clang::Sema::PushOnScopeChains
(this=0x6b6e00, D=0x38392c8, S=0x0, AddToContext=true) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaDecl.cpp:1190<br>
#2 0x00007ffff535ef9a in clang::Sema::LazilyCreateBuiltin
(this=0x6b6e00, II=0x69f638, ID=370, S=0x0,
ForRedeclaration=false, Loc=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaDecl.cpp:1778<br>
#3 0x00007ffff572247e in LookupBuiltin (S=..., R=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaLookup.cpp:544<br>
#4 0x00007ffff5722240 in clang::Sema::LookupName
(this=0x6b6e00, R=..., S=0x0, AllowBuiltinCreation=true) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaLookup.cpp:1426<br>
#5 0x00007ffff572362c in clang::Sema::LookupParsedName
(this=0x6b6e00, R=..., S=0x0, SS=0x7ffffffea958,
AllowBuiltinCreation=true, EnteringContext=false) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaLookup.cpp:1868<br>
#6 0x00007ffff5524491 in clang::Sema::ActOnIdExpression
(this=0x6b6e00, S=0x0, SS=..., TemplateKWLoc=..., Id=...,
HasTrailingLParen=true, IsAddressOfOperand=false, <br>
CCC=std::unique_ptr<clang::CorrectionCandidateCallback>
containing 0x0, IsInlineAsmIdentifier=false,
KeywordReplacement=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:2114<br>
#7 0x00007ffff5523d96 in
clang::Sema::DefaultVariadicArgumentPromotion (this=0x6b6e00,
E=0x38383f0, CT=clang::Sema::VariadicConstructor,
FDecl=0x878b20) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:936<br>
#8 0x00007ffff55367c6 in clang::Sema::GatherArgumentsForCall
(this=0x6b6e00, CallLoc=..., FDecl=0x878b20, Proto=0x878ad0,
FirstParam=0, Args=..., AllArgs=...,
CallType=clang::Sema::VariadicConstructor,
AllowExplicit=false, <br>
IsListInitialization=false) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:4477<br>
#9 0x00007ffff5426487 in clang::Sema::CompleteConstructorCall
(this=0x6b6e00, Constructor=0x878b20, ArgsPtr=..., Loc=...,
ConvertedArgs=..., AllowExplicit=false,
IsListInitialization=false)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp:11427<br>
#10 0x00007ffff56f4184 in
clang::InitializationSequence::Perform (this=0x7ffffffebff0,
S=..., Entity=..., Kind=..., Args=..., ResultType=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaInit.cpp:6189<br>
#11 0x00007ffff56fe47b in
clang::Sema::PerformCopyInitialization (this=0x6b6e00,
Entity=..., EqualLoc=..., Init=..., TopLevelOfInitList=false,
AllowExplicit=false)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaInit.cpp:7495<br>
#12 0x00007ffff55364e9 in clang::Sema::GatherArgumentsForCall
(this=0x6b6e00, CallLoc=..., FDecl=0x3839080, Proto=0x3839010,
FirstParam=0, Args=..., AllArgs=...,
CallType=clang::Sema::VariadicDoesNotApply,
AllowExplicit=false, <br>
IsListInitialization=false) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:4433<br>
#13 0x00007ffff5535c19 in clang::Sema::ConvertArgumentsForCall
(this=0x6b6e00, Call=0x3839240, Fn=0x3839228, FDecl=0x3839080,
Proto=0x3839010, Args=..., RParenLoc=..., IsExecConfig=false)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:4378<br>
#14 0x00007ffff5538209 in clang::Sema::BuildResolvedCallExpr
(this=0x6b6e00, Fn=0x3839228, NDecl=0x3839080, LParenLoc=...,
Args=..., RParenLoc=..., Config=0x0, IsExecConfig=false)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:4964<br>
#15 0x00007ffff57b4ad2 in FinishOverloadedCallExpr
(SemaRef=..., S=0x0, Fn=0x3839190, ULE=0x3837ab8,
LParenLoc=..., Args=..., RParenLoc=..., ExecConfig=0x0,
CandidateSet=0x7ffffffee548, Best=0x7ffffffee510, <br>
OverloadResult=clang::OR_Success,
AllowTypoCorrection=true) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaOverload.cpp:10798<br>
#16 0x00007ffff57b47cd in clang::Sema::BuildOverloadedCallExpr
(this=0x6b6e00, S=0x0, Fn=0x3837ab8, ULE=0x3837ab8,
LParenLoc=..., Args=..., RParenLoc=..., ExecConfig=0x0,
AllowTypoCorrection=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaOverload.cpp:10871<br>
#17 0x00007ffff5525999 in clang::Sema::ActOnCallExpr
(this=0x6b6e00, S=0x0, Fn=0x3837ab8, LParenLoc=...,
ArgExprs=..., RParenLoc=..., ExecConfig=0x0,
IsExecConfig=false)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:4768<br>
#18 0x00007ffff5975fee in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildCallExpr
(this=0x7fffffff2738, Callee=0x3837ab8, LParenLoc=...,
Args=..., RParenLoc=..., ExecConfig=0x0)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:1833<br>
#19 0x00007ffff5975f26 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformCallExpr
(this=0x7fffffff2738, E=0x8d8a08) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:7617<br>
#20 0x00007ffff5967982 in (anonymous
namespace)::TemplateInstantiator::TransformCallExpr
(this=0x7fffffff2738, CE=0x8d8a08) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:823<br>
#21 0x00007ffff595e10a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr
(this=0x7fffffff2738, E=0x8d8a08) at
tools/clang/include/clang/AST/StmtNodes.inc:299<br>
#22 0x00007ffff597fbb2 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDecltypeType
(this=0x7fffffff2738, TLB=..., TL=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:4922<br>
#23 0x00007ffff5954aa6 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType
(this=0x7fffffff2738, TLB=..., T=...) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/AST/TypeNodes.def:88<br>
#24 0x00007ffff59539bf in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType
(this=0x7fffffff2738, DI=0x8d8aa8) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3706<br>
#25 0x00007ffff597404d in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument
(this=0x7fffffff2738, Input=..., Output=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3441<br>
#26 0x00007ffff597332a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArguments<clang::TemplateArgumentLocContainerIterator<clang::TemplateSpecializationTypeLoc>
> (this=0x7fffffff2738, <br>
First=..., Last=..., Outputs=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3661<br>
#27 0x00007ffff5971f79 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType
(this=0x7fffffff2738, TLB=..., TL=..., Template=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:5213<br>
#28 0x00007ffff5971c34 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTSIInObjectScope
(this=0x7fffffff2738, TL=..., ObjectType=...,
UnqualLookup=0x0, SS=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3854<br>
#29 0x00007ffff5990278 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTypeInObjectScope
(this=0x7fffffff2738, TL=..., ObjectType=...,
UnqualLookup=0x0, SS=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3813<br>
#30 0x00007ffff59604c8 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformNestedNameSpecifierLoc
(this=0x7fffffff2738, NNS=..., ObjectType=...,
FirstQualifierInScope=0x0)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3189<br>
#31 0x00007ffff59817be in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentNameType
(this=0x7fffffff2738, TLB=..., TL=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:5434<br>
#32 0x00007ffff5954f1a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType
(this=0x7fffffff2738, TLB=..., T=...) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/AST/TypeNodes.def:101<br>
#33 0x00007ffff59539bf in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType
(this=0x7fffffff2738, DI=0x8d8cc0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3706<br>
#34 0x00007ffff59537ff in clang::Sema::SubstType
(this=0x6b6e00, T=0x8d8cc0, Args=..., Loc=..., Entity=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1472<br>
#35 0x00007ffff59581e7 in clang::Sema::SubstBaseSpecifiers
(this=0x6b6e00, Instantiation=0x3837850, Pattern=0x8d8440,
TemplateArgs=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1810<br>
#36 0x00007ffff5958675 in clang::Sema::InstantiateClass
(this=0x6b6e00, PointOfInstantiation=...,
Instantiation=0x3837850, Pattern=0x8d8440, TemplateArgs=...,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1971<br>
#37 0x00007ffff595a361 in
clang::Sema::InstantiateClassTemplateSpecialization
(this=0x6b6e00, PointOfInstantiation=...,
ClassTemplateSpec=0x3837850,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2427<br>
#38 0x00007ffff5a157c1 in clang::Sema::RequireCompleteTypeImpl
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5290<br>
#39 0x00007ffff5a150f6 in clang::Sema::RequireCompleteType
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5117<br>
#40 0x00007ffff52aa25a in
clang::Sema::RequireCompleteType<clang::SourceRange>
(this=0x6b6e00, Loc=..., T=..., DiagID=2256, Args=...) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/Sema/Sema.h:1303<br>
#41 0x00007ffff53ff108 in clang::Sema::CheckBaseSpecifier
(this=0x6b6e00, Class=0x38362d8, SpecifierRange=...,
Virtual=false, Access=clang::AS_public, TInfo=0x38379e0,
EllipsisLoc=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp:1454<br>
#42 0x00007ffff595828a in clang::Sema::SubstBaseSpecifiers
(this=0x6b6e00, Instantiation=0x38362d8, Pattern=0x8d94d8,
TemplateArgs=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1822<br>
#43 0x00007ffff5958675 in clang::Sema::InstantiateClass
(this=0x6b6e00, PointOfInstantiation=...,
Instantiation=0x38362d8, Pattern=0x8d94d8, TemplateArgs=...,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1971<br>
#44 0x00007ffff595a361 in
clang::Sema::InstantiateClassTemplateSpecialization
(this=0x6b6e00, PointOfInstantiation=...,
ClassTemplateSpec=0x38362d8,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2427<br>
#45 0x00007ffff5a157c1 in clang::Sema::RequireCompleteTypeImpl
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5290<br>
#46 0x00007ffff5a150f6 in clang::Sema::RequireCompleteType
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5117<br>
#47 0x00007ffff52aa25a in
clang::Sema::RequireCompleteType<clang::SourceRange>
(this=0x6b6e00, Loc=..., T=..., DiagID=2259, Args=...) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/Sema/Sema.h:1303<br>
#48 0x00007ffff52a5c38 in
clang::Sema::RequireCompleteDeclContext (this=0x6b6e00,
SS=..., DC=0x3836310) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp:212<br>
#49 0x00007ffff552c8ec in
clang::Sema::BuildQualifiedDeclarationNameExpr (this=0x6b6e00,
SS=..., NameInfo=..., IsAddressOfOperand=false,
RecoveryTSI=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:2294<br>
#50 0x00007ffff5976d14 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentScopeDeclRefExpr
(this=0x7fffffff75b8, QualifierLoc=..., TemplateKWLoc=...,
NameInfo=..., TemplateArgs=0x0, <br>
IsAddressOfOperand=false, RecoveryTSI=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:2402<br>
#51 0x00007ffff5976ac0 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr
(this=0x7fffffff75b8, E=0x7d1a50, IsAddressOfOperand=false,
RecoveryTSI=0x0)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:8997<br>
#52 0x00007ffff5969433 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr
(this=0x7fffffff75b8, E=0x7d1a50)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:8963<br>
#53 0x00007ffff595e47c in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr
(this=0x7fffffff75b8, E=0x7d1a50) at
tools/clang/include/clang/AST/StmtNodes.inc:433<br>
#54 0x00007ffff59743e4 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArgument
(this=0x7fffffff75b8, Input=..., Output=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3480<br>
#55 0x00007ffff597332a in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateArguments<clang::TemplateArgumentLocContainerIterator<clang::TemplateSpecializationTypeLoc>
> (this=0x7fffffff75b8, <br>
First=..., Last=..., Outputs=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3661<br>
#56 0x00007ffff5971f79 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType
(this=0x7fffffff75b8, TLB=..., TL=..., Template=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:5213<br>
#57 0x00007ffff598143b in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformTemplateSpecializationType
(this=0x7fffffff75b8, TLB=..., TL=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:5112<br>
#58 0x00007ffff5954dfd in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType
(this=0x7fffffff75b8, TLB=..., T=...) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/AST/TypeNodes.def:98<br>
#59 0x00007ffff59539bf in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformType
(this=0x7fffffff75b8, DI=0x7d1c48) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:3706<br>
#60 0x00007ffff59537ff in clang::Sema::SubstType
(this=0x6b6e00, T=0x7d1c48, Args=..., Loc=..., Entity=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1472<br>
#61 0x00007ffff59581e7 in clang::Sema::SubstBaseSpecifiers
(this=0x6b6e00, Instantiation=0x3836030, Pattern=0x7d1578,
TemplateArgs=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1810<br>
#62 0x00007ffff5958675 in clang::Sema::InstantiateClass
(this=0x6b6e00, PointOfInstantiation=...,
Instantiation=0x3836030, Pattern=0x7d1578, TemplateArgs=...,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1971<br>
#63 0x00007ffff595a361 in
clang::Sema::InstantiateClassTemplateSpecialization
(this=0x6b6e00, PointOfInstantiation=...,
ClassTemplateSpec=0x3836030,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2427<br>
#64 0x00007ffff5a157c1 in clang::Sema::RequireCompleteTypeImpl
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5290<br>
#65 0x00007ffff5a150f6 in clang::Sema::RequireCompleteType
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5117<br>
#66 0x00007ffff52aa25a in
clang::Sema::RequireCompleteType<clang::SourceRange>
(this=0x6b6e00, Loc=..., T=..., DiagID=2256, Args=...) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/Sema/Sema.h:1303<br>
#67 0x00007ffff53ff108 in clang::Sema::CheckBaseSpecifier
(this=0x6b6e00, Class=0x3835810, SpecifierRange=...,
Virtual=false, Access=clang::AS_public, TInfo=0x38361b0,
EllipsisLoc=...)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp:1454<br>
#68 0x00007ffff595828a in clang::Sema::SubstBaseSpecifiers
(this=0x6b6e00, Instantiation=0x3835810, Pattern=0x7d1e20,
TemplateArgs=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1822<br>
#69 0x00007ffff5958675 in clang::Sema::InstantiateClass
(this=0x6b6e00, PointOfInstantiation=...,
Instantiation=0x3835810, Pattern=0x7d1e20, TemplateArgs=...,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1971<br>
#70 0x00007ffff595a361 in
clang::Sema::InstantiateClassTemplateSpecialization
(this=0x6b6e00, PointOfInstantiation=...,
ClassTemplateSpec=0x3835810,
TSK=clang::TSK_ImplicitInstantiation, Complain=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:2427<br>
#71 0x00007ffff5a157c1 in clang::Sema::RequireCompleteTypeImpl
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5290<br>
#72 0x00007ffff5a150f6 in clang::Sema::RequireCompleteType
(this=0x6b6e00, Loc=..., T=..., Diagnoser=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaType.cpp:5117<br>
#73 0x00007ffff52aa25a in
clang::Sema::RequireCompleteType<clang::SourceRange>
(this=0x6b6e00, Loc=..., T=..., DiagID=2259, Args=...) at
/home/peter/Programming/llvm/llvm/tools/clang/include/clang/Sema/Sema.h:1303<br>
#74 0x00007ffff52a5c38 in
clang::Sema::RequireCompleteDeclContext (this=0x6b6e00,
SS=..., DC=0x3835848) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp:212<br>
#75 0x00007ffff552c8ec in
clang::Sema::BuildQualifiedDeclarationNameExpr (this=0x6b6e00,
SS=..., NameInfo=..., IsAddressOfOperand=false,
RecoveryTSI=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExpr.cpp:2294<br>
#76 0x00007ffff5976d14 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::RebuildDependentScopeDeclRefExpr
(this=0x7fffffffbac8, QualifierLoc=..., TemplateKWLoc=...,
NameInfo=..., TemplateArgs=0x0, <br>
IsAddressOfOperand=false, RecoveryTSI=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:2402<br>
#77 0x00007ffff5976ac0 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr
(this=0x7fffffffbac8, E=0x9a8628, IsAddressOfOperand=false,
RecoveryTSI=0x0)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:8997<br>
#78 0x00007ffff5969433 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformDependentScopeDeclRefExpr
(this=0x7fffffffbac8, E=0x9a8628)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:8963<br>
#79 0x00007ffff595e47c in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr
(this=0x7fffffffbac8, E=0x9a8628) at
tools/clang/include/clang/AST/StmtNodes.inc:433<br>
#80 0x00007ffff596339c in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformBinaryOperator
(this=0x7fffffffbac8, E=0x9a8818) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:7704<br>
#81 0x00007ffff595dca3 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExpr
(this=0x7fffffffbac8, E=0x9a8818) at
tools/clang/include/clang/AST/StmtNodes.inc:157<br>
#82 0x00007ffff5955af2 in clang::TreeTransform<(anonymous
namespace)::TemplateInstantiator>::TransformExceptionSpec
(this=0x7fffffffbac8, Loc=..., ESI=..., Exceptions=...,
Changed=@0x7fffffffba7f: false)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/TreeTransform.h:4697<br>
#83 0x00007ffff59559ea in clang::Sema::SubstExceptionSpec
(this=0x6b6e00, New=0x7ffff0b023a8, Proto=0x9a8840, Args=...)
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp:1611<br>
#84 0x00007ffff59aca2b in
clang::Sema::InstantiateExceptionSpec (this=0x6b6e00,
PointOfInstantiation=..., Decl=0x7ffff0b023a8) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:3193<br>
#85 0x00007ffff5518b88 in clang::Sema::ResolveExceptionSpec
(this=0x6b6e00, Loc=..., FPT=0x7ffff0b02470) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp:162<br>
#86 0x00007ffff53839f5 in clang::Sema::ActOnStartOfFunctionDef
(this=0x6b6e00, FnBodyScope=0x0, D=0x7ffff0b023a8) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaDecl.cpp:10475<br>
#87 0x00007ffff59ad779 in
clang::Sema::InstantiateFunctionDefinition (this=0x6b6e00,
PointOfInstantiation=..., Function=0x7ffff0b023a8,
Recursive=true, DefinitionRequired=true)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:3449<br>
#88 0x0000000000428f79 in QuaffVisitor::CanBeSafeToHandle
(this=0x694b30, d=0x7ffff0b023a8, inInstantiation=true) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/quaff-visitor.cc:179<br>
#89 0x000000000042a46f in QuaffVisitor::VisitCXXMethod
(this=0x694b30, d=0x7ffff0b023a8, instantiation=true) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/quaff-visitor.cc:388<br>
#90 0x000000000040dd50 in Walker::Traverse (this=0x694c40,
d=0x7ffff0b023a8) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:64<br>
#91 0x000000000040e28d in Walker::TraverseCXXRecord
(this=0x694c40, d=0x7ffff0bf1218) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:96<br>
#92 0x000000000040df33 in Walker::TraverseClassTemplate
(this=0x694c40, d=0x96d750) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:109<br>
#93 0x000000000040dbce in Walker::Traverse (this=0x694c40,
d=0x96d750) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:45<br>
#94 0x000000000040e0b2 in Walker::TraverseNamespace
(this=0x694c40, d=0x95ea20) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:119<br>
#95 0x000000000040dc25 in Walker::Traverse (this=0x694c40,
d=0x95ea20) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:51<br>
#96 0x000000000040e0b2 in Walker::TraverseNamespace
(this=0x694c40, d=0x95e9b8) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:119<br>
#97 0x000000000040dc25 in Walker::Traverse (this=0x694c40,
d=0x95e9b8) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:51<br>
#98 0x000000000040d8d2 in Walker::TraverseTranslationUnit
(this=0x694c40, d=0x693bd0) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/walker.cc:17<br>
#99 0x000000000040d054 in Consumer<Options,
QuaffVisitor>::HandleTranslationUnit (this=0x694b20,
context=...) at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/consumer.hh:21<br>
#100 0x00007ffff1f9dab6 in clang::ParseAST (S=...,
PrintStats=false, SkipFunctionBodies=false) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Parse/ParseAST.cpp:151<br>
#101 0x00007ffff610824f in
clang::ASTFrontendAction::ExecuteAction (this=0x660f50) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:536<br>
#102 0x00007ffff6107d50 in clang::FrontendAction::Execute
(this=0x660f50) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:439<br>
#103 0x00007ffff60b4f5f in
clang::CompilerInstance::ExecuteAction (this=0x7fffffffd368,
Act=...) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:814<br>
#104 0x00007ffff77bca6e in
clang::tooling::FrontendActionFactory::runInvocation
(this=0x7fffffffde88, Invocation=0x6612a0, Files=0x65f4f0,
DiagConsumer=0x0) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Tooling/Tooling.cpp:272<br>
#105 0x00007ffff77bc979 in
clang::tooling::ToolInvocation::runInvocation
(this=0x7fffffffdb80, BinaryName=0x65fec8
"/home/peter/Programming/llvm/clang/bin/quaff",
Compilation=0x65aae0, Invocation=0x6612a0)<br>
at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Tooling/Tooling.cpp:249<br>
#106 0x00007ffff77bc211 in clang::tooling::ToolInvocation::run
(this=0x7fffffffdb80) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Tooling/Tooling.cpp:235<br>
#107 0x00007ffff77bd3aa in clang::tooling::ClangTool::run
(this=0x7fffffffdea8, Action=0x7fffffffde88) at
/home/peter/Programming/llvm/llvm/tools/clang/lib/Tooling/Tooling.cpp:364<br>
#108 0x000000000040873d in main (argc=5, argv=0x7fffffffe178)
at
/home/peter/Programming/llvm/llvm/tools/clang/tools/extra/quaff/main.cc:149<br>
<br>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
cfe-dev mailing list
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div></div></div>
<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></div>