Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Document Method Should Ignore _Use_decl_annoations

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
[email protected] Posted - Jul 31 2015 : 11:18:16 AM
The Refactor... Document Method feature is terrific. However, in parsing and filling-in the RETURNS value, it does not know to ignore the compiler declaration "_Use_decl_annotations" preceding a method's return type. This is used with SAL Annotations to indicate that the implementation should use the annotations that are present in the header.

For example:

_Use_decl_annotations_
VOID
FooResetUartWorker(WDFWORKITEM WorkItem)
{
// Function body here
}

When you select the method name, and tell VAX to Document Method, if your method template includes return values, the string _Use_decl_annotations_ winds-up in the documentation, and the "VOID" ends up on a line by itself as follows:

///////////////////////////////////////////////////////////////////////////////
//
// FooResetUartWorker
//
//
// INPUTS:
//
// WorkItem
//
//
// OUTPUTS:
//
// None.
//
// RETURNS:
//
// _Use_decl_annotations_
VOID
//
///////////////////////////////////////////////////////////////////////////////

This isn't a tragedy, but it *does* cause VS 2013 to parse the "VOID", and start marking everything following as an error. Which causes VS to hang for a few seconds, before you can go in and fix the formatting.

It seems that Document Method knows to ignore things like "__forceinline"... with the increased emphasis Microsoft is placing on SAL Annotations, and their increasing acceptance, it would be *very* helpful if Document Method could ignore these annotations as well.

Of course, the whole topic of VAX understanding SAL Annotations themselves (and ignoring them in method declarations) is a separate issue. It would be nice if the annotations themselves were understood and skipped over. But it would *really* be a big help if the _Use_decl_annotations_ at least was ignored.
2   L A T E S T    R E P L I E S    (Newest First)
[email protected] Posted - Aug 07 2015 : 11:32:00 AM
Thank you for the very considerate answer to what is, I'm sure, a rather unique problem.
accord Posted - Aug 07 2015 : 11:29:49 AM
I am seeing the same effect here, thank you for the clear description:

case=84805

For now, as a (clunky) workaround, putting VOID and _Use_decl_annotations_ on the same line would not result in a compiler error.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000