<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Overridden virtual functions now require the override keyword"
   href="http://llvm.org/bugs/show_bug.cgi?id=21101">21101</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Overridden virtual functions now require the override keyword
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>tools
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>TableGen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fjahanian@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I will be checking in a patch which will warn when overriding methods do not
have
the 'override' keyword. 'override' is a c++11 addition. We need a top-level 
facility which flags that certain generated methods override virtual functions
and
therefore require 'override' keyword added to their declaration. Without this
feature, we will be getting the following warnings:

In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/ARM/ARMFastISel.cpp:142:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/ARM/ARMGenFastISel.inc:2301:10:
warning: 'fastEmit_r' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill) {
         ^                                                                     
    ~
                                                                               
    ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:329:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/ARM/ARMFastISel.cpp:142:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/ARM/ARMGenFastISel.inc:3918:10:
warning: 'fastEmit_rr' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill, unsigned Op1, bool Op1IsKill) {
         ^                                                                     
                                   ~
                                                                               
                                   ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:334:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, unsigned
Op0,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/ARM/ARMFastISel.cpp:142:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/ARM/ARMGenFastISel.inc:4268:10:
warning: 'fastEmit_rri' overrides a member function but is not marked
'override' [-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_rri(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill, unsigned Op1, bool Op1IsKill, uint64_t imm2) {
         ^                                                                     
                                                   ~
                                                                               
                                                   ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:352:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_rri(MVT VT, MVT RetVT, unsigned Opcode,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/ARM/ARMFastISel.cpp:142:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/ARM/ARMGenFastISel.inc:5175:10:
warning: 'fastEmit_ri' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill, uint64_t imm1) {
         ^                                                                     
                    ~
                                                                               
                    ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:340:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, unsigned
Op0,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/ARM/ARMFastISel.cpp:142:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/ARM/ARMGenFastISel.inc:6260:10:
warning: 'fastEmit_i' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t imm0) {
         ^                                                           ~
                                                                     ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:366:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t
Imm);
                   ^

and:
llvm[2]: Compiling StackColoring.cpp for Debug+Asserts build
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/X86/X86FastISel.cpp:80:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/X86/X86GenFastISel.inc:2411:10:
warning: 'fastEmit_r' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill) {
         ^                                                                     
    ~
                                                                               
    ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:329:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_r(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/X86/X86FastISel.cpp:80:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/X86/X86GenFastISel.inc:7067:10:
warning: 'fastEmit_rr' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill, unsigned Op1, bool Op1IsKill) {
         ^                                                                     
                                   ~
                                                                               
                                   ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:334:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_rr(MVT VT, MVT RetVT, unsigned Opcode, unsigned
Op0,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/X86/X86FastISel.cpp:80:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/X86/X86GenFastISel.inc:8516:10:
warning: 'fastEmit_rri' overrides a member function but is not marked
'override' [-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_rri(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill, unsigned Op1, bool Op1IsKill, uint64_t imm2) {
         ^                                                                     
                                                   ~
                                                                               
                                                   ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:352:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_rri(MVT VT, MVT RetVT, unsigned Opcode,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/X86/X86FastISel.cpp:80:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/X86/X86GenFastISel.inc:9568:10:
warning: 'fastEmit_ri' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, unsigned Op0, bool
Op0IsKill, uint64_t imm1) {
         ^                                                                     
                    ~
                                                                               
                    ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:340:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_ri(MVT VT, MVT RetVT, unsigned Opcode, unsigned
Op0,
                   ^
In file included from
/Users/jahanian/sandbox/llvm-tot/lib/Target/X86/X86FastISel.cpp:80:
/Users/jahanian/sandbox/llvm-override-build/lib/Target/X86/X86GenFastISel.inc:9803:10:
warning: 'fastEmit_i' overrides a member function but is not marked 'override'
[-Wwarn-missing-override-on-overriding-method]
unsigned fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t imm0) {
         ^                                                           ~
                                                                     ) override
/Users/jahanian/sandbox/llvm-tot/include/llvm/CodeGen/FastISel.h:366:20: note:
overridden virtual function is here
  virtual unsigned fastEmit_i(MVT VT, MVT RetVT, unsigned Opcode, uint64_t
Imm);</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>