Go To Definition does not work with decorated function declaration - by jschroedl

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 794130 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 7/16/2013 9:19:32 AM
Access Restriction Public


In a C++ project, create a global function in a .h file like this:
#define JEXP __declspec(dllexport)
JEXP int global_function();

In the .cpp file have
int global_function() { }

After a successful build  and run, in the .cpp file put the cursor on global_function and press F12. You will not be taken to the .h file!

This is a super-simplified example but is really causing problems for us. Is there a way we could have the intellisense parser ignore the JEXP symbol for it's match consideration?  

Sign in to post a comment.
Posted by jschroedl on 7/17/2013 at 10:39 AM
Yes, I created a cpp.hint with my macros and rebuilt the Intellisense database. Now, it is able to locate the functions when I press F12.

This may be completely undiscoverable by normal means but I'm very glad it's possible to work around the issue. Thanks!
Posted by Jason [MSFT] on 7/17/2013 at 8:39 AM
It sounds like hint files will be the solution. See http://msdn.microsoft.com/en-us/library/vstudio/dd997977.aspx
Posted by Helen [MSFT] on 7/16/2013 at 7:44 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Macy [MSFT] on 7/16/2013 at 9:52 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)