Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354583

Summary: parser displays class's template base class member with an syntax error.
Product: [Tools] CDT Reporter: eocape <eocape>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
Status: RESOLVED WORKSFORME QA Contact: Markus Schorn <mschorn.eclipse>
Severity: major    
Priority: P3 CC: cdtdoug
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description eocape CLA 2011-08-12 03:42:46 EDT
Build Identifier: 20110615-0604

the following statement:
m_kvPages[i].Page<K1, V1>::SetPageID(i);
where "Page" is a templated base class with template parameter "K1","V1","SetPageID" is surely one of its member. The line is marked by the error :
"Multiple markers at this line - Function 'SetPageID' could not be resolved - Write Occurrence of 'SetPageID'", so the auto formatter cannot work because it thought there's syntax error. There's no such error in Helios release.

Reproducible: Always

Steps to Reproduce:
1.Define a base template class with some public function members.
2.Define a derived class which inherits the base template class(do not use partial specialization or full specialization)
3.Define a template function which uses an instance of the derived class and its public function from its base class.
4.The parser marks it as a syntax error.
Comment 1 Markus Schorn CLA 2011-08-17 04:15:24 EDT
I cannot reproduce the issue, I have tried with the code below. Please provide a code snippet and reopen the bug.


template<typename T> struct CT {
  int m();
};
template<typename T> struct DT : CT<T> {
  void f() {
    DT<T> d= *this;
    d.CT<T>::m();
   }
};