Bug 276090

Summary: Can't parse typeid expression
Product: [Applications] kdevelop Reporter: Wolfgang Bangerth <bangerth>
Component: Language Support: CPP (old)Assignee: kdevelop-bugs-null
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: NOR    
Version: 4.2.1   
Target Milestone: 4.2.0   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Wolfgang Bangerth 2011-06-19 23:26:11 UTC
Version:           4.2.1
OS:                Linux

KDevelop can't properly parse typeid expressions as in this file:
................
#include <typeinfo>

void f()
{
  int i;
  typeid(i).name();
}
.........................
The "Problems" tool view reports the following:
- Unexpected token "." in line 6 (source: parser)
- Declaration not found: name in line 6 (source: semantic analysis)

If I change the code to read "typeid(1)", i.e. with a value, it replaces the
first problem by
- Unexpected token "number_literal"

Best
 W.

Reproducible: Always
Comment 1 Milian Wolff 2011-06-22 20:19:51 UTC

*** This bug has been marked as a duplicate of bug 207377 ***
Comment 2 Aleix Pol 2013-03-31 00:51:04 UTC
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively