Open lucianthorr opened 1 year ago
Hi @lucianthorr . I'm able to repro this in VS. (We share the same IntelliSense engine as VS). It looks like our IntelliSense engine does not support the V.xyzw
syntax, referred to here: https://clang.llvm.org/docs/LanguageExtensions.html
I've opened an issue against our IntelliSense engine, internally. (1656306)
For future me, because I found this thread from two years previous while trying to debug the very same erroneous squiggles, this the best fix I've found so far. https://github.com/microsoft/vscode-cpptools/issues/1231#issuecomment-837528890
Environment
c_cpp_properties.json settings that I've tried
"intelliSenseMode": "macos-gcc-arm64",
and"intelliSenseMode": "macos-clang-arm64",
Bug Summary and Steps to Reproduce
Bug Summary: Intellisense reports an error
expression must have class type but it has type "vector4"C/C++(153)
but it doesn't register as an error during compilation. Xcode does not report this code as problematic either.Steps to reproduce: define a vector
typedef float vector4 __attribute__((ext_vector_type(4)));
Refer to a value in the vector using (x, y, z, w) rather than indexing
Intellisense returns
expression must have class type but it has type "vector4"C/C++(153)
Expected behavior
I don't think this should be reported as an error in Intellisense.
If the error is correct then is there something obvious that I'm missing in the c_cpp_properties.json?
Code sample and Logs