<div dir="ltr"><div class="gmail_extra">What sort of thoughts were you looking for? :) Yes, it's a bug; I'll take a look.</div><div class="gmail_extra"><br></div><div class="gmail_extra">-Eli</div><div class="gmail_extra">
<br><div class="gmail_quote">On Wed, Jul 3, 2013 at 3:37 PM, Faisal Vali <span dir="ltr"><<a href="mailto:faisalv@gmail.com" target="_blank">faisalv@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Eli,<br>
Sometime around r185450<br>
[<a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130701/083020.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130701/083020.html</a>],<br>
the following fragment now causes an assertion violation - any thoughts?<br>
<br>
int test(double d) {<br>
struct Local {<br>
template<class T> T foo(T t) {<br>
return t;<br>
}<br>
};<br>
return Local{}.foo(d);<br>
}<br>
<br>
Here is the assertion violation:<br>
<br>
Assertion failed: !isLocalContainerContext(DC), file<br>
..\..\..\..\..\llvm\tools\clang\lib\AST\ItaniumM<br>
angle.cpp, line 1474<br>
Stack dump:<br>
0. Program arguments: c:\clang-trunk\build\bin\Debug\clang.exe<br>
-cc1 -triple i686-pc-win32 -emit-<br>
llvm-bc -disable-free -main-file-name test.cpp -mrelocation-model<br>
static -mdisable-fp-elim -fmath-err<br>
no -masm-verbose -mconstructor-aliases -target-cpu pentium4<br>
-coverage-file test.cpp.bc -resource-dir<br>
c:\clang-trunk\build\bin\Debug\..\lib\clang\3.4 -internal-isystem<br>
c:\clang-trunk\build\bin\Debug\..\l<br>
ib\clang\3.4\include -internal-isystem C:\Program Files<br>
(x86)\Microsoft Visual Studio 10.0\VC\include<br>
-internal-isystem C:\Program Files (x86)\Microsoft<br>
SDKs\Windows\v7.0A\\include -std=c++1y -fdeprecat<br>
ed-macro -ferror-limit 19 -fmessage-length 101 -mstackrealign<br>
-fms-extensions -fms-compatibility -fms<br>
c-version=1300 -fdelayed-template-parsing -fobjc-runtime=gcc<br>
-fobjc-default-synthesize-properties -fc<br>
xx-exceptions -fexceptions -fdiagnostics-show-option<br>
-fcolor-diagnostics -vectorize-loops -o test.cpp<br>
.bc -x c++ c:\clang-trunk\clang-trunk-fv\tests\test.cpp<br>
1. <eof> parser at end of file<br>
2. c:\clang-trunk\clang-trunk-fv\tests\test.cpp:10:5: LLVM IR<br>
generation of declaration 'test'<br>
3. c:\clang-trunk\clang-trunk-fv\tests\test.cpp:10:5: Generating<br>
code for declaration 'test'<br>
4. c:\clang-trunk\clang-trunk-fv\tests\test.cpp:12:25: Mangling<br>
declaration 'test(double)::Local<br>
::foo'<br>
0x52738A0B (0x0000000A 0x00000000 0x052BC728 0x52804BA6),<br>
_get_pgmptr() + 0x21B bytes(s)<br>
0x5281433E (0x052BC820 0x052BC73C 0x02F8C08F 0xCCCCCCCC), abort() +<br>
0x1E bytes(s)<br>
0x52804BA6 (0x044BD69C 0x044BD6D8 0x000005C2 0x052BC930), _wassert() +<br>
0xD6 bytes(s)<br>
0x030E700E (0x055ECAD4 0x00000000 0x052BC930 0x00000000), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
lePrefix() + 0x8E bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1474 +<br>
0x<br>
2A byte(s)<br>
0x030E7090 (0x055ECB50 0x00000000 0x00000000 0x052BC8D0), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
lePrefix() + 0x110 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1487<br>
0x030E726E (0x055ECDE0 0x00000000 0x055ECDE0 0xCCCCCCCC), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
leTemplatePrefix() + 0x6E bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1<br>
534<br>
0x030E66E2 (0x055ED210 0x055ECB50 0x00000001 0x052BC8A8), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
leNestedName() + 0xA2 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1254<br>
0x030E69E6 (0x055ED210 0xCCCCCCCC 0xCCCCCCCC 0xCCCCCCCC), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
leLocalName() + 0x226 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 1331<br>
0x030E4C71 (0x055ED210 0x052BC930 0xCCCCCCCC 0xCCCCCCCC), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
leName() + 0xB1 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 569<br>
0x030E4AF7 (0x055ED210 0x052BC920 0xCCCCCCCC 0xCCCCCCCC), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
leFunctionEncoding() + 0x27 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line<br>
464<br>
0x030E4A48 (0x055ED210 0x044BECCC 0x00000002 0x052BCABC), `anonymous<br>
namespace'::CXXNameMangler::mang<br>
le() + 0xE8 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 452 +<br>
0xC byte(<br>
s)<br>
0x030ECB27 (0x055ED210 0x052BC974 0x052BCCE8 0x052BD2A0), `anonymous<br>
namespace'::ItaniumMangleContext<br>
::mangleName() + 0x117 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\ast\itaniummangle.cpp, line 3529<br>
+ 0x1B byte(s)<br>
0x01D3F4DE (0x052BCAD8 0x055ED210 0xCCCCCCCC 0xCCCCCCCC),<br>
clang::CodeGen::CodeGenModule::getMangledNa<br>
me() + 0x2AE bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\codegen\codegenmodule.cpp, line<br>
441 + 0x35<br>
byte(s)<br>
0x01D42ACA (0x055ED210 0x0044EC8C 0x00000000 0x052BCDF4),<br>
clang::CodeGen::CodeGenModule::GetAddrOfFun<br>
ction() + 0x6A bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\codegen\codegenmodule.cpp, line<br>
1434<br>
0x01ECD5EC (0x052BCE08 0x055ED2E8 0x00000000 0x052BD0CC),<br>
clang::CodeGen::CodeGenFunction::EmitCXXMem<br>
berCallExpr() + 0x94C bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\codegen\cgexprcxx.cpp, line 320 +<br>
0x1D byte(s)<br>
0x01EB9375 (0x052BCE08 0x055ED2E8 0x00000000 0xCCCCCCCC),<br>
clang::CodeGen::CodeGenFunction::EmitCallEx<br>
pr() + 0x105 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\codegen\cgexpr.cpp, line 2845 +<br>
0x14 byte(<br>
s)<br>
0x01F03A19 (0x055ED2E8 0x052BD124 0x052BCE54 0x01F0249D), `anonymous<br>
namespace'::ScalarExprEmitter::V<br>
isitCallExpr() + 0x69 bytes(s),<br>
c:\clang-trunk\llvm\tools\clang\lib\codegen\cgexprscalar.cpp, line 28<br>
2 + 0x1D byte(s)<br>
<br>
[More...]<br>
<br>
Thanks!<br>
<span class=""><font color="#888888"><br>
Faisal Vali<br>
</font></span></blockquote></div><br></div></div>