clang-tidy generating 'use of undeclared identifier' #11637
Replies: 2 comments 3 replies
-
clang-tidy/clang doesn't understand those __builtin identifiers so in order to get it to work something in the configuration needs to be set such that clang-tidy/clang doesn't see those. Whether it's fixable or not depends on how the ia32intrin.h is defined, i.e. what |
Beta Was this translation helpful? Give feedback.
-
I've been able to pare the issue down to something I can share that maybe someone else can repro. VSCode version: 1.84.0 (On a mac if it matters, but using Remote-SSH) test.cpp: c_cpp_properties.json configuration:
clang-tidy command line:
clang-tidy output:
|
Beta Was this translation helpful? Give feedback.
-
My apologies if this question doesn't belong here.
I have clang-tidy setup. When I run it, it reports numerous 'use of undeclared identifier' errors. The code in question compiles (with gcc) and runs without issue. Here's a sampling of the errors. (I couldn't find a way to copy all the errors)
ia32intrin.h[Ln 41, Col 10]: use of undeclared identifier '__builtin_ia32_bsrsi'
ia32intrin.h[Ln 122, Col 10]: use of undeclared identifier '__builtin_ia32_rolqi'; did you mean '__builtin_ia32_korqi'?
ia32intrin.h[Ln 127, Col 19]: use of undeclared identifier '__builtin_ia32_addss'
I did find #9898 which seems to address a similar issue, but using "--extra-arg=-mno-sse2" doesn't change anything. Not to mention I'm using 1.18.1 which seems as if it should incorporate the fix.
Any suggestions how to resolve this?
Thanks,
Jeff
Beta Was this translation helpful? Give feedback.
All reactions