Code analysis reports issue with macro __has_include__ even though g++/clang++ don't complain #9575
Labels
bug
Feature: Code Analysis
Related to integration with clang-tidy, cppcheck, cl.exe /analyze, etc.
fixed
Check the Milestone for the release in which the fix is or will be available.
Language Service
quick fix
verified
Bug has been reproduced
Milestone
Bug type: Language Service
Describe the bug
Steps to reproduce
[{
"resource": "/home/nick/has_include/has_include.cpp",
"owner": "clang-tidy",
"code": "clang-diagnostic-error",
"severity": 8,
"message": "function-like macro 'has_include' is not defined",
"source": "C/C++",
"startLineNumber": 3,
"startColumn": 5,
"endLineNumber": 3,
"endColumn": 18
}]
Expected behavior
The code analysis should not report this as the code compiles cleanly with g++/clang++.
Code sample and logs
See attached .tar.gz for project containing source and settings to repro. It's run on WSL Ubuntu 20.04.
Configurations in
c_cpp_properties.json
Logs from running
C/C++: Log Diagnostics
from the VS Code command paletteLogs from the language server logging
Screenshots
I've attached a screenshot showing the error.
Additional context
has_include.tar.gz
The text was updated successfully, but these errors were encountered: