[LLVMbugs] [Bug 9418] New: Can't find a member of a base template

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 7 03:07:53 PST 2011


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

           Summary: Can't find a member of a base template
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: filcab at gmail.com
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


Created an attachment (id=6288)
 --> (http://llvm.org/bugs/attachment.cgi?id=6288)
Erroneous program minimized with delta

Clang++ can't compile a file which g++ compiles cleanly. Only if I help clang a
bit (by complying with its error message) will it compile the file.

filcab at fry:/stuff/src/android/src> g++ -c aaa.cpp
filcab at fry:/stuff/src/android/src> echo $?
0
filcab at fry:/stuff/src/android/src> clang++ -c aaa.cpp
aaa.cpp:27:3: warning: control reaches end of non-void function [-Wreturn-type]
  }
  ^
aaa.cpp:18:13: error: use of undeclared identifier 'indexOfKey'                 
    int i = indexOfKey (key);
            ^
            this->                                                              
aaa.cpp:26:30: note: in instantiation of member function
'android::DefaultKeyedVector<char,            
      char>::valueFor' requested here
    int sym = mNestedSymbols.valueFor (name);
                             ^
aaa.cpp:6:9: note: must qualify identifier to find this declaration in
dependent base class            
    int indexOfKey (const KEY & key) const;
        ^
1 warning and 1 error generated.

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