Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356011 - Function default argument isn't correctly parsed
Summary: Function default argument isn't correctly parsed
Status: RESOLVED WORKSFORME
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-27 17:54 EDT by cybek cybek CLA
Modified: 2011-09-15 10:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cybek cybek CLA 2011-08-27 17:54:57 EDT
Build Identifier: 8.0.0.201106081058

Hi. I have declaration of function in header:
void ShowText(int x, int y, const std::string &text, Uint32 color32=0);
and when i use this function like:
ShowText(10, 10, strCameraPos);
parsed say that there isn't any function ShowText with 3 parameters.

Invalid arguments ' Candidates are: void ShowText(int, int, const 
	 std::basic_string<char,std::char_traits<char>,std::allocator<char>> &, unsigned int) '

Reproducible: Always

Steps to Reproduce:
1. Write in header void ShowText(int x, int y, const std::string &text, Uint32 color32=0);
2. Include header in cpp and try to use function like: 
char strCameraPos[128];
	sprintf(strCameraPos, "Camera: %dx%d", cameraX, cameraY);
	ShowText(10, 10, strCameraPos);
3. CDT show bug in this live with liveparser
Comment 1 Markus Schorn CLA 2011-09-07 02:43:05 EDT
I was not able to reproduce the problem. Do you also see it for the following code?
   #include "showtext.h"
   void test() {
      std::string x= "";
      ShowText(10, 10, x);
   }
Comment 2 cybek cybek CLA 2011-09-11 05:25:40 EDT
It looks like single error in CDT Indexer. I turned it off and applied. And again turned it on, and all is working good. Maybe some freeze in indexing or something.
Thanks for reply.
Comment 3 Markus Schorn CLA 2011-09-15 10:41:39 EDT
Please reopen the bugzilla, in case you can reproduce the issue.