errors that aren't? or: diff btwn "solid red dot" error and "hollow red dot" error?
-
when i build a certain file (CAudioUnicChain.cpp), i see this:
Note the "issues" tab at the bottom shows zero issues, and the compile output shows zero issues too. yet in the editor we see errors.eg: "use of undeclared identifier 'CAudioUnit'" and "unknown type name AudioUnit"
this is confusing since CAudioUnit and AudioUnit are DEFINITELY declared previously (in CAudioUnitChain.h"), with no errors shown in the header. here's another take (where it DOES show issues even though i didn't compile anything):
and in here you can see in the header that CAudioUnit is DEFINITELY declared, and no errors in it's decl.i note that this confusion doesn't happen with SOLID red dot errors, only HOLLOW red dot errors.
so what gives?
also different question: when i go to the "Issues" tab and click the "clear" button (little broom icon), the issues STILL show in the editor window. Why is that?
-
Have a glance here.
I personally use the "classical" code model because I find it faster, less buggy and less distracting. But that's me and my habits. Many people (greatly) appreciate the additional in-code annotations that come from the clang code model. -
To clarify @kshegunov's link, "solid" errors come from your compiler and they are only generated during compilation. "Hollow" errors come from the static code analyzer and they are generated in real time (in other words, they update while you code).
While the real time analysis can show us errors earlier, they can also cause lags and sometimes the analyzer ends up in a "stale" state (I suspect your screenshot is suffering from this). In the case of stale errors, closing the file and re-opening it will force the analyzer to refresh, removing the wrong "hollow" error.
If there's a disagreement between the compiler and the analyzer, always go with the compiler. If you want to disable the static analyzer altogether, turn off the Clang Code Model.
-
how does one turn off the clang code model? i looked and don't see it
-
@davecotter said in errors that aren't? or: diff btwn "solid red dot" error and "hollow red dot" error?:
how does one turn off the clang code model? i looked and don't see it
See @kshegunov's link