Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360609 - Methods in C++ temporary objects are not recognized
Summary: Methods in C++ temporary objects are not recognized
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 01:15 EDT by vagran CLA
Modified: 2011-10-31 09:46 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vagran CLA 2011-10-12 01:15:23 EDT
Build Identifier: 20110916-0149

In the following code:
MyFunction(MyClass(constrArg).MyMethod());
method MyMethod() of the temporary object of class MyClass is not recognized (error "Method 'MyMethod' could not be resolved") as well as the result of the expression "MyClass(constrArg).MyMethod()" is not correctly recognized.

Reproducible: Always

Steps to Reproduce:
1. Create code "MyFunction(MyClass(constrArg).MyMethod());" in C++ CDT project. C++ code analysis error will appear as well as MyMethod declaration will not be found by IDE (if you point on it and press F3).
Comment 1 vagran CLA 2011-10-12 01:17:17 EDT
CDT version 8.0.0.201109151620.
Comment 2 Markus Schorn CLA 2011-10-31 09:46:04 EDT
I have tested with:

struct A {
	A(int);
	int m();
};

void f(int);
void test() {
	f(A(1).m());
}