| Summary: | Correct source code in gcc results in CPPASTProblemDeclaration with CDT | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Alfred Wang <alfred.wang> |
| Component: | cdt-parser | Assignee: | Project Inbox <cdt-parser-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 7.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 333200 *** |
Build Identifier: CDT 7.0, org.eclipse.cdt.core_5.2.0.201006141710.jar The following source code is compiled and linked OK in GCC. But CDT will report CPPASTProblemDeclaration. # 1 "case3.cpp" # 1 "<built-in>" # 1 "<command line>" # 1 "case3.cpp" namespace sc_core { class sc_module { }; class sc_module_name { public: sc_module_name() {} }; } class A { public: A() {} A(const char *str) {} }; struct B : ::sc_core::sc_module { typedef B SC_B; B (::sc_core::sc_module_name )://this declaration results in CPPASTProblemDeclaration. i(1) ,a("test") { } B() {} int i; A a; }; int main() { B::SC_B bi; return 0; } Reproducible: Always Steps to Reproduce: 1.Prepare CDT and let the upper source code as input 2.Get a 'IASTTranslationUnit' object. Then get all declarations. 3.There are five declarations in the third CPPASTSimnpleDeclaration. The second one of the five declarations is CPPASTProblemDeclaration.