[LLVMbugs] [Bug 16601] New: misleading fixit hint for insertion before nested name specifier

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jul 11 14:00:17 PDT 2013


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

            Bug ID: 16601
           Summary: misleading fixit hint for insertion before nested name
                    specifier
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

$ clang x.cc -std=c++11
x.cc:7:9: error: ISO C++11 does not allow access declarations; use using
      declarations instead
  Base::foo;
        ^
  using 
1 error generated.

That's the wrong place to put 'using'. However, if I run -fixit, it actually
does the right thing:

$ clang -cc1 -std=c++11 x.cc -fixit
x.cc:7:9: error: ISO C++11 does not allow access declarations; use using
declarations instead
  Base::foo;
        ^
  using 
x.cc:7:9: note: FIX-IT applied suggested code changes
1 error generated.
$ cat x.cc
struct Base {
  void foo(int);
};

struct Derived : public Base {
  void foo(float);
  using Base::foo;
};

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130711/4a3a3bf7/attachment.html>


More information about the llvm-bugs mailing list