Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354583 - parser displays class's template base class member with an syntax error.
Summary: parser displays class's template base class member with an syntax error.
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-12 03:42 EDT by eocape CLA
Modified: 2011-08-17 04:15 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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();
   }
};