[LLVMbugs] [Bug 7417] New: fixits need to be de-duped somehow

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 18 22:10:26 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7417

           Summary: fixits need to be de-duped somehow
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: llvmbugs at cs.uiuc.edu, nlewycky at google.com


I've encountered a problem with clang -fixit: it emits multiple warnings, and
then we apply them in duplicate. This results in:

template <typename T> struct Derived : public Base<T> {
  void Work(T x) {
    this->this->DoThis(x);  // Invalid!
    this->this->DoThat(x);  // Invalid!
  }
};

when given the example on
clang.llvm.org/cxx_compatibility.html#dep_lookup_bases once you add:

void foo() {
  Derived<int> d1;
  Derived<char> d2;
  d1.Work(10);
  d2.Work(10);
}

to the bottom. What I would really like to see is clang continue parsing as
though the first fixit was applied, so that we never end up with duplicate
fixits in the first place. That makes the most sense to me and may reduce
diagnostic spam for the user, but I don't know how sensible that is to
implement.

-- 
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