Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 issue[C/C++]: parse member with postfix-definition
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

48103749
Junior Member

10 Posts

Posted - Aug 16 2020 :  04:04:06 AM  Show Profile  Reply with Quote
my va vesion:





and parse result:
(it's code in "audio_coding_module.cc" in webrtc, and there is many other similar code)




as you can see:
there are many class-members parsed as white, such as encode_buffer_, expected_codec_ts_......which is actually not parsed successfully.
this failure is caused by the postfix-definition "RTC_GUARDED_BY"----it's the special postfix-def in webrtc.


when do "ctrl+alt+F" to find reference of those class-member in visual-studio, there will be an error for this kind of member-var:








is it possible to fix this issue? or by some special va-setting?.
it really sucks when do the code-review in this issue.

Thx for reading and look forward to the reply!~~



Edited by - 48103749 on Aug 16 2020 04:17:13 AM

feline
Whole Tomato Software

United Kingdom
18746 Posts

Posted - Aug 17 2020 :  08:57:40 AM  Show Profile  Reply with Quote
I am seeing the same problem here, and have a solution that works in my test situation.

I am using a "va_stdafx.h" file, which is explained here:

https://support.wholetomato.com/default.asp?W302

and using the file content:

#define RTC_GUARDED_BY(acm_mutex_) 

to tell VA to ignore this macro after the variable.

This file should be placed in the same directory as your .SLN or .VCXPROJ file. Are you working with a .SLN file, or are you working with a CMake build, or something else?

In my test I have simply cloned the webrtc repositiry with git, and then placed the "va_stdafx.h" file in the root folder, and told Visual Studio 2019 to open this root folder directly. VA is then picking up and using this file. Since VA looks for the file directly there is no need to try adding this file to your solution, but if you are building with CMake, or something else that picks up all .h files in this root directory this might cause problems.

This file is used to help VA's parser with difficult code, and can be used to work around odd effects. After modifying this file you need to rebuild the VA symbol database for the changes to take effect:

VA Options -> Performance -> General -> Rebuild symbol databases

zen is the art of being at one with the two'ness
Go to Top of Page

48103749
Junior Member

10 Posts

Posted - Aug 18 2020 :  12:20:46 PM  Show Profile  Reply with Quote
Great!~~~
This suggestion seems to be suitable for my problem.
Let me have a try!~~~

It's so kind of you!
Go to Top of Page

48103749
Junior Member

10 Posts

Posted - Aug 18 2020 :  12:39:55 PM  Show Profile  Reply with Quote
I tried, yes, that's damn it good!~

and now, the colorful world comes back:





Thx a lot!~~~

Edited by - 48103749 on Aug 18 2020 12:42:04 PM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000