Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370419 - Multiline macros and comments cause wrong hover
Summary: Multiline macros and comments cause wrong hover
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 05:45 EST by Marko Tomljenovic CLA
Modified: 2012-10-27 02:23 EDT (History)
3 users (show)

See Also:


Attachments
Hover only shows "Hello" instead of "Hello World" (13.14 KB, image/jpeg)
2012-03-22 02:24 EDT, Marko Tomljenovic CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Tomljenovic CLA 2012-02-02 05:45:05 EST
Build Identifier: 8.0.1

The following code

#define TEST "Hello" /* First word */\
"world!"

is not resolved to the correct value "Hello"\"world!" but to "Hello" only.
Leaving out the comment in the above #define, the intended define will be resolved.



Reproducible: Always
Comment 1 Markus Schorn CLA 2012-03-21 10:32:12 EDT
Works for me, I have tested using the following code:

#define TEST "Hello" /* First word */\
"world!";

void test() {
	char* x= TEST    // no syntax error, so the ; is picked up 
}
Comment 2 Marko Tomljenovic CLA 2012-03-22 02:24:24 EDT
Created attachment 213036 [details]
Hover only shows "Hello" instead of "Hello World"
Comment 3 Marko Tomljenovic CLA 2012-03-22 02:24:55 EDT
Then maybe it is only a hover tooltip problem. Take a look at the attached screenshot.
Comment 4 Markus Schorn CLA 2012-03-22 02:26:27 EDT
(In reply to comment #3)
> Then maybe it is only a hover tooltip problem. Take a look at the attached
> screenshot.

Looks like it, it won't affect the index.
Comment 5 Marko Tomljenovic CLA 2012-03-22 02:44:24 EDT
(In reply to comment #4)
> (In reply to comment #3)
> > Then maybe it is only a hover tooltip problem. Take a look at the attached
> > screenshot.
> 
> Looks like it, it won't affect the index.

Right. So it seems there is a bug in the hover. Can you please move this issue then to the right component?

Thank you
Comment 6 Marc-André Laperle CLA 2012-10-27 02:23:05 EDT
Starting from 8.1, the source hover is not shown when hovering on a definition, see Bug 359392. 

If you hover on this one:

char* x= TEST 

then this is displayed in the source hover:

"Hello" /* First word */\
"world!";

Which seems ideal to me.