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
 Feature Requests
 Add more C++ keywords to default dictionary.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

alex.postlethwaite
Senior Member

39 Posts

Posted - Dec 06 2018 :  06:18:07 AM  Show Profile  Reply with Quote
When VAX Spelling correction is enabled, it offers to change

[[nodiscard]]
into "no discard"

Similarly with
[[fallthrough]]


Could these (and others I probably haven't noticed) be added to the built in dictionary?

feline
Whole Tomato Software

United Kingdom
19023 Posts

Posted - Dec 07 2018 :  09:27:52 AM  Show Profile  Reply with Quote
What file type are you seeing this in? What sort of code is this happening with? A quick search for [[nodiscard]] got me to this page, with the following sample code:

https://softwareengineering.stackexchange.com/questions/363169/whats-the-reason-for-not-using-c17s-nodiscard-almost-everywhere-in-new-c

[[nodiscard]]       bool f_nodiscard()      { return true; };
[[maybe_noinspect]] bool f_maybe_noinspect(){ return true; };

          f_nodiscard();               // Warning, value is discarded
bool b1 = f_nodiscard();               // Warning, value is uninspected
bool b2 = f_nodiscard(); if(b2);       // OK,      value is inspected

          f_maybe_noinspect();         // Warning, value is discarded
bool b3 = f_maybe_noinspect();         // OK,      value may be not inspected
bool b4 = f_maybe_noinspect(); if(b4); // OK,      value is inspected

"uninspected" in the comment is the only thing in these code lines that VA is picking up or underlining as a spelling error for me. Or are you using these markers inside comment blocks?

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

alex.postlethwaite
Senior Member

39 Posts

Posted - Dec 07 2018 :  09:46:31 AM  Show Profile  Reply with Quote
This was in a C++ file.

It seems like the behaviour changes based on the code layout.

I got a spelling underline with


[[nodiscard]]
int blah(int * p)
{
	return 0;
}


but it disappears when I change it to


[[nodiscard]] int blah(int * p)
{
	return 0;
}


and put the whole signature on one line.




Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19023 Posts

Posted - Dec 07 2018 :  11:37:33 AM  Show Profile  Reply with Quote
I am seeing the same problem here now I know how to format the code correctly. We should not be spell checking attributes, even if they are on their own line in the code:

case=132728

For now, as a work around, you can try right clicking and adding the attributes that VA is seeing to your custom dictionary.

zen is the art of being at one with the two'ness
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