Skip to content

Fatal error: intrin0.h yvals_core.h - RC1021: invalid preprocessor command 'include_next' #126979

Open
@ianalexis

Description

@ianalexis

After upgrading Visual Studio 2022, my project automatically switched from using LLVM Clang 18.1.1 to 19.1.1. As a result, I encountered the following error during compilation:
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\lib\clang\19\include\yvals_core.h(11): fatal error RC1021: invalid preprocessor command 'include_next'
I am not familiar with the purpose of yvals_core.h, but if I comment out line 11 in this file, the project compiles successfully.

//===----- yvals_core.h - Internal MSVC STL core header -------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// Only include this if we are aiming for MSVC compatibility.
#ifndef _MSC_VER
//#include_next <yvals_core.h>
#else

#ifndef __clang_yvals_core_h
#define __clang_yvals_core_h

#include_next <yvals_core.h>

#ifdef _STL_INTRIN_HEADER
#undef _STL_INTRIN_HEADER
#define _STL_INTRIN_HEADER <intrin0.h>
#endif

#endif
#endif

This file appears to be new in version 19, introduced due to LLVM issue #53520 and implemented in Pull Request #75711.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions