Visual Studio's Intellisense occasionally makes really dumb mistakes
So I'm using Visual Studio 2010, specifically the C++ packages. Everything's been great, with the exception of Intellisense. It is a wonderfully useful tool, when it works properly (which it usually does). However, it has this annoying quirk where every now and then, after editing a file, it completely craps out and flags random things as errors, when I'm sure they, and the rest of the file are 100% valid, no nonsense code.

The problem seems to lie with Intellisense's parser, as most of the errors are "undefined", it seems to be getting garbled versions of what is actually in the files.

Here's an example of something that Intellisense is convinced is illegal:

    #pragma once
    #ifndef TEXTUREMANAGER
    #define TEXTUREMANAGER
    
    blah blah
    
    #endif

Both the pragma and the ifndef/define/endif statements are flagged as errors, with the pragma's error being:

*"Error: Unrecognized preprocessing directive
Error: "ragma" is undefined"*

And the ifndef's error being:

*"Error: The endif is missing", with the #endif at the bottom of the file reporting: "The #if is missing".*

Evidently Intellisense is failing to properly parse my files, but there's no consistency to these occurrences. When they occur (which happens randomly), only some parts of the project are affected, and after forcing Visual Studio to rescan the entire project, they disappear.

This whole problem gets even weirder when you consider the fact that although Intellisense seems to be getting truncated bits of my files, syntax highlighting works perfectly fine with the items allegedly invalid. In the errors described above, although Intellisense is convinced the first line says "#ragma", it's still highlighted as a valid preprocessing directive (if I remove the 'p', so that it truly says "#ragma", it's color changes to black, to indicate an invalid directive).

I've tried Googling, and all I could find was a Microsoft Support Ticket, which seems to have abandoned without an answer.

FYI, I'm not using any unusual characters/keyboard languages (US-English), and the files compile fine.
Visual Studio's Intellisense occasionally makes really dumb mistakes
===

So I'm using Visual Studio 2010, specifically the C++ packages. Everything's been great, with the exception of Intellisense. It is a wonderfully useful tool, when it works properly (which it usually does). However, it has this annoying quirk where every now and then, after editing a file, it completely craps out and flags random things as errors, when I'm sure they, and the rest of the file are 100% valid, no nonsense code.

The problem seems to lie with Intellisense's parser, as most of the errors are "undefined", it seems to be getting garbled versions of what is actually in the files.

Here's an example of something that Intellisense is convinced is illegal:

    #pragma once
    #ifndef TEXTUREMANAGER
    #define TEXTUREMANAGER
    
    blah blah
    
    #endif

Both the pragma and the ifndef/define/endif statements are flagged as errors, with the pragma's error being:

*"Error: Unrecognized preprocessing directive
Error: "ragma" is undefined"*

And the ifndef's error being:

*"Error: The endif is missing", with the #endif at the bottom of the file reporting: "The #if is missing".*

Evidently Intellisense is failing to properly parse my files, but there's no consistency to these occurrences. When they occur (which happens randomly), only some parts of the project are affected, and after forcing Visual Studio to rescan the entire project, they disappear.

This whole problem gets even weirder when you consider the fact that although Intellisense seems to be getting truncated bits of my files, syntax highlighting works perfectly fine with the items allegedly invalid. In the errors described above, although Intellisense is convinced the first line says "#ragma", it's still highlighted as a valid preprocessing directive (if I remove the 'p', so that it truly says "#ragma", it's color changes to black, to indicate an invalid directive).

I've tried Googling, and all I could find was a Microsoft Support Ticket, which seems to have abandoned without an answer.

FYI, I'm not using any unusual characters/keyboard languages (US-English), and the files compile fine.