[LLVMbugs] [Bug 12809] New: Error recovery can trigger Assertion `!EnteredScope && "Already entered the scope!"'
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun May 13 18:48:48 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12809
Bug #: 12809
Summary: Error recovery can trigger Assertion `!EnteredScope &&
"Already entered the scope!"'
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: hfinkel at anl.gov
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 8542
--> http://llvm.org/bugs/attachment.cgi?id=8542
reduced test case (provided by Craig Schroeder)
Running clang trunk on:
namespace std {template<bool T> struct copy<T>{};template(std::copy_a<T>(n));}
Results in the following:
t4.cpp:1:40: error: explicit specialization of non-template struct 'copy'
namespace std {template<bool T> struct copy<T>{};template(std::copy_a<T>(n));}
^ ~~~
t4.cpp:1:64: error: no template named 'copy_a' in namespace 'std'; did you mean
'copy'?
namespace std {template<bool T> struct copy<T>{};template(std::copy_a<T>(n));}
~~~~~^~~~~~
copy
t4.cpp:1:40: note: 'copy' declared here
namespace std {template<bool T> struct copy<T>{};template(std::copy_a<T>(n));}
^
t4.cpp:1:71: error: use of undeclared identifier 'T'
namespace std {template<bool T> struct copy<T>{};template(std::copy_a<T>(n));}
^
clang:
/src/llvm-trunk-writable/tools/clang/lib/Parse/../../include/clang/Parse/Parser.h:1901:
void clang::Parser::DeclaratorScopeObj::EnterDeclaratorScope(): Assertion
`!EnteredScope && "Already entered the scope!"' failed.
Interestingly, If you rename "copy" or "copy_a" to
something else (eg, "c" and "c_a"), the assertion is avoided.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list