<div dir="ltr">Hi Ted,<br><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 20 August 2014 07:18, Ted Kremenek <span dir="ltr"><<a href="mailto:kremenek@apple.com" target="_blank">kremenek@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div class=""><br><div><blockquote type="cite"><div>On Aug 16, 2014, at 5:47 AM, Gábor Horváth <<a href="mailto:xazax.hun@gmail.com" target="_blank">xazax.hun@gmail.com</a>> wrote:</div>
<br><div><span style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Sorry for my oversight about the turned off asserts, I guess we need to iterate a bit more on the patch.</span></div>
</blockquote></div><br></div><div>Hi Gábor,</div><div><br></div><div>Sounds good!</div><div><br></div><div>The attached patch appears to generate new warnings when compiled:</div><div><br></div><div><div> lib/StaticAnalyzer/Core/BugReporter.cpp:3091:30: warning: unused variable 'LCtx' [-Wunused-variable]</div>
<div> const LocationContext *LCtx = E->getLocationContext();</div><div> ^</div></div><div><br></div></div></blockquote><div><br></div><div>Fixed.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div></div><div>I'm also still seeing assertion failures, but this time in other tests:</div><div><br></div><div><div>Assertion failed: (NumEnteredSourceFiles == 0 && "Cannot reenter the main file!"), function EnterMainSourceFile, file lib/Lex/Preprocessor.cpp, line 484.</div>
<div>0 clang 0x000000010cfcb668 llvm::sys::PrintStackTrace(__sFILE*) + 40</div><div>1 clang 0x000000010cfcbb54 SignalHandler(int) + 564</div><div>2 libsystem_platform.dylib 0x00007fff8f835f1a _sigtramp + 26</div>
<div>3 clang 0x000000010e7775e9 guard variable for isAllowedIDChar(unsigned int, clang::LangOptions const&)::C99AllowedIDChars + 58369</div><div>4 clang 0x000000010cfcb906 abort + 22</div>
<div>5 clang 0x000000010cfcb8e1 __assert_rtn + 81</div><div>6 clang 0x000000010e27c449 clang::Preprocessor::EnterMainSourceFile() + 537</div><div>7 clang 0x000000010d874e7b clang::ParseAST(clang::Sema&, bool, bool) + 187</div>
<div>8 clang 0x000000010d1ce1d3 clang::FrontendAction::Execute() + 67</div><div>9 clang 0x000000010d1a1b7c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 972</div>
<div>10 clang 0x000000010d208bc5 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4149</div><div>11 clang 0x000000010c699834 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 804</div>
<div>12 clang 0x000000010c697fa4 main + 8788</div><div>13 libdyld.dylib 0x00007fff97fa15c9 start + 1</div><div>Stack dump:</div><div>0.<span style="white-space:pre-wrap"> </span>Program arguments:/trunk-RelWithDebInfo/./bin/clang -cc1 -internal-isystem/trunk-RelWithDebInfo/bin/../lib/clang/3.6.0/include -Wall -fsyntax-only clang/test/Misc/serialized-diags-single-issue.c /clang/test/Misc/serialized-diags-single-issue.c -serialize-diagnostic-file/trunk-RelWithDebInfo/tools/clang/test/Misc/Output/serialized-diags-single-issue.c.tmp</div>
<div>1.<span style="white-space:pre-wrap"> </span><eof> parser at end of file</div><div>/cmake-make/trunk-RelWithDebInfo/tools/clang/test/Misc/Output/serialized-diags-single-issue.c.script: line 6: 56078 Illegal instruction: 4 trunk-RelWithDebInfo/./bin/clang -cc1 -internal-isystem/trunk-RelWithDebInfo/bin/../lib/clang/3.6.0/include -Wall -fsyntax-only /clang/test/Misc/serialized-diags-single-issue.c /clang/test/Misc/serialized-diags-single-issue.c -serialize-diagnostic-file/trunk-RelWithDebInfo/tools/clang/test/Misc/Output/serialized-diags-single-issue.c.tmp</div>
</div><div><br></div><div><br></div><div>and</div><div><br></div><div><div>Assertion failed: (NumEnteredSourceFiles == 0 && "Cannot reenter the main file!"), function EnterMainSourceFile, file /llvm-trunk/tools/clang/lib/Lex/Preprocessor.cpp, line 484.</div>
<div>0 clang 0x00000001105fa668 llvm::sys::PrintStackTrace(__sFILE*) + 40</div><div>1 clang 0x00000001105fab54 SignalHandler(int) + 564</div><div>2 libsystem_platform.dylib 0x00007fff8f835f1a _sigtramp + 26</div>
<div>3 libsystem_platform.dylib 0x00007fff65330764 _sigtramp <a href="tel:%2B%203585058916" value="+3585058916" target="_blank">+ 3585058916</a></div><div>4 clang 0x00000001105fa906 abort + 22</div><div>
5 clang 0x00000001105fa8e1 __assert_rtn + 81</div><div>6 clang 0x00000001118ab449 clang::Preprocessor::EnterMainSourceFile() + 537</div><div>7 clang 0x0000000110ea3e7b clang::ParseAST(clang::Sema&, bool, bool) + 187</div>
<div>8 clang 0x0000000110b48c7b clang::CodeGenAction::ExecuteAction() + 123</div><div>9 clang 0x00000001107fd1d3 clang::FrontendAction::Execute() + 67</div><div>10 clang 0x00000001107d0b7c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 972</div>
<div>11 clang 0x0000000110837bc5 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4149</div><div>12 clang 0x000000010fcc8834 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 804</div>
<div>13 clang 0x000000010fcc6fa4 main + 8788</div><div>14 libdyld.dylib 0x00007fff97fa15c9 start + 1</div><div>Stack dump:</div><div>0.<span style="white-space:pre-wrap"> </span>Program arguments: /cmake-make/trunk-RelWithDebInfo/./bin/clang -cc1 -internal-isystem cmake-make/trunk-RelWithDebInfo/bin/../lib/clang/3.6.0/include -triple x86_64-apple-macosx10.9.0 -include /clang/test/PCH/local_static.h -fsyntax-only clang/test/PCH/local_static.cpp -emit-llvm -o cmake-make/trunk-RelWithDebInfo/tools/clang/test/PCH/Output/local_static.cpp.tmp.no_pch.ll /clang/test/PCH/local_static.cpp</div>
<div>1.<span style="white-space:pre-wrap"> </span><eof> parser at end of file</div><div>/cmake-make/trunk-RelWithDebInfo/tools/clang/test/PCH/Output/local_static.cpp.script: line 5: 57780 Illegal instruction: 4 /cmake-make/trunk-RelWithDebInfo/./bin/clang -cc1 -internal-isystem /cmake-make/trunk-RelWithDebInfo/bin/../lib/clang/3.6.0/include -triple x86_64-apple-macosx10.9.0 -include clang/test/PCH/local_static.h -fsyntax-only /clang/test/PCH/local_static.cpp -emit-llvm -o /cmake-make/trunk-RelWithDebInfo/tools/clang/test/PCH/Output/local_static.cpp.tmp.no_pch.ll /clang/test/PCH/local_static.cpp</div>
</div><div><br></div><div>Are you seeing these failures as well?</div><div><br></div></div></blockquote><div><br></div><div>It looks like in some scenarios the preprocessor was reused even though the source file was not a model file. I have fixed this issue as well.<br>
<br></div><div>Thanks,<br></div><div>Gábor<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><div>Thanks,</div>
<div>Ted</div><div><br></div><div><br></div></div></blockquote></div><br></div></div>