Bug 207377 - typeid's return value is not recognized by C++ parser
Summary: typeid's return value is not recognized by C++ parser
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Language Support: CPP (old) (show other bugs)
Version: git master
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 229335 255308 276090 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-14 19:54 UTC by Alexander
Modified: 2011-06-22 20:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander 2009-09-14 19:54:26 UTC
Version:           SVN (using KDE 4.3.1)
Compiler:          gcc 4.3.2 
OS:                Linux
Installed from:    SuSE RPMs

Consider the following example:

#include <typeinfo>

void f()
{
	std::type_info info = typeid(int);  // ok

	typeid(int).name();  // name has squiggles, no completion after typeid(int).
}


Well, that says it all. name() has squiggles, no std::typeinfo object member completion pops up after typeid(int).

Thanks
Comment 1 Milian Wolff 2010-06-16 00:20:08 UTC
confirmed
Comment 2 Milian Wolff 2010-06-16 00:40:17 UTC
*** Bug 229335 has been marked as a duplicate of this bug. ***
Comment 3 Milian Wolff 2010-10-26 17:11:05 UTC
*** Bug 255308 has been marked as a duplicate of this bug. ***
Comment 4 Milian Wolff 2011-06-22 20:19:51 UTC
*** Bug 276090 has been marked as a duplicate of this bug. ***
Comment 5 Milian Wolff 2011-06-22 20:24:11 UTC
Git commit eacac049e8c59ee0b2994ab4fc3c46dc83a71bee by Milian Wolff.
Committed on 22/06/2011 at 20:21.
Pushed by mwolff into branch 'master'.

proper typeid operator support

parser now also accepts expressions according to the spec alternatively to type-id's
expression parser associates the ::std::type_info type properly, hence code completion,
uses, etc. pp. work

lots of unit tests added as well

BUG: 207377

M  +32   -0    languages/cpp/cppduchain/expressionvisitor.cpp     
M  +1    -0    languages/cpp/cppduchain/expressionvisitor.h     
M  +39   -0    languages/cpp/cppduchain/tests/test_expressionparser.cpp     
M  +1    -0    languages/cpp/cppduchain/tests/test_expressionparser.h     
M  +1    -0    languages/cpp/cppduchain/type_visitor.cpp     
M  +5    -0    languages/cpp/cppduchain/usebuilder.cpp     
M  +2    -0    languages/cpp/cppduchain/usebuilder.h     
M  +12   -0    languages/cpp/parser/ast.h     
M  +7    -0    languages/cpp/parser/default_visitor.cpp     
M  +1    -0    languages/cpp/parser/default_visitor.h     
M  +2    -1    languages/cpp/parser/dumptree.cpp     
M  +13   -2    languages/cpp/parser/parser.cpp     
M  +20   -0    languages/cpp/parser/tests/test_parser.cpp     
M  +3    -0    languages/cpp/parser/tests/test_parser.h     
M  +2    -1    languages/cpp/parser/visitor.cpp     
M  +1    -0    languages/cpp/parser/visitor.h     

http://commits.kde.org/kdevelop/eacac049e8c59ee0b2994ab4fc3c46dc83a71bee