Skip to content

__has_include marked as error #4193

@luni64

Description

@luni64

Type: LanguageService

Describe the bug

  • OS and Version: Win10
  • VS Code Version: 1.38.0
  • C/C++ Extension Version: 0.25.1
  • Compiler: GCC

In the snippet below intellisense marks __has_include as error but it compiles without problems

#if __has_include("somefile.h")
#include "somefile.h"  // has constexpr int someVal=1 in it. 
#else
constexpr int someVal = 0;
#endif

image

Expected behavior
Should not be marked as an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServiceWorks in VSSo we'd need to fix it for VS Code to reach parity.bugfixedCheck the Milestone for the release in which the fix is or will be available.parserquick fix

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions