[LLVMbugs] [Bug 13868] New: Nondeterministic order of diagnostics
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Sep 18 13:01:43 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13868
Bug #: 13868
Summary: Nondeterministic order of diagnostics
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: zaffanella at cs.unipr.it
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 9228
--> http://llvm.org/bugs/attachment.cgi?id=9228
Test program showing diagnostic ordering issue.
Using a (debug+assert) build of clang r164159, we are observing
nondeterministic ordering of the diagnostics produced for the attached file
nondet-diag.cc.
(Side note: issue was initially observed as a nondeterministic order in the
invocation of callback ASTConsumer::HandleCXXImplicitFunctionInstantiation.)
First output obtained lists first method m1 and then m2:
========================================================
$ Debug+Asserts/bin/clang++ -fsyntax-only nondet-diag.cc
nondet-diag.cc:20:8: error: virtual function 'B<int>::m1' has more than one
final overrider in 'E<int>'
struct E : D1<T>, D2<T> {
^
nondet-diag.cc:24:10: note: in instantiation of template class 'E<int>'
requested here
E<int> e;
^
nondet-diag.cc:3:16: note: overridden virtual function is here
virtual void m1();
^
nondet-diag.cc:9:8: note: final overrider of 'B<int>::m1' in 'D1<int>'
void m1();
^
nondet-diag.cc:15:8: note: final overrider of 'B<int>::m1' in 'D2<int>'
void m1();
^
nondet-diag.cc:20:8: error: virtual function 'B<int>::m2' has more than one
final overrider in 'E<int>'
struct E : D1<T>, D2<T> {
^
nondet-diag.cc:4:16: note: overridden virtual function is here
virtual void m2();
^
nondet-diag.cc:10:8: note: final overrider of 'B<int>::m2' in 'D1<int>'
void m2();
^
nondet-diag.cc:16:8: note: final overrider of 'B<int>::m2' in 'D2<int>'
void m2();
^
2 errors generated.
========================================================
On another run, output lists first method m2 and then m1:
========================================================
$ Debug+Asserts/bin/clang++ -fsyntax-only nondet-diag.cc
nondet-diag.cc:20:8: error: virtual function 'B<int>::m2' has more than one
final overrider in 'E<int>'
struct E : D1<T>, D2<T> {
^
nondet-diag.cc:24:10: note: in instantiation of template class 'E<int>'
requested here
E<int> e;
^
nondet-diag.cc:4:16: note: overridden virtual function is here
virtual void m2();
^
nondet-diag.cc:10:8: note: final overrider of 'B<int>::m2' in 'D1<int>'
void m2();
^
nondet-diag.cc:16:8: note: final overrider of 'B<int>::m2' in 'D2<int>'
void m2();
^
nondet-diag.cc:20:8: error: virtual function 'B<int>::m1' has more than one
final overrider in 'E<int>'
struct E : D1<T>, D2<T> {
^
nondet-diag.cc:3:16: note: overridden virtual function is here
virtual void m1();
^
nondet-diag.cc:9:8: note: final overrider of 'B<int>::m1' in 'D1<int>'
void m1();
^
nondet-diag.cc:15:8: note: final overrider of 'B<int>::m1' in 'D2<int>'
void m1();
^
2 errors generated.
========================================================
Usually, some 3 or 4 runs are enough.
--
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