Skip to content

clang-cl should be compatible to cl.exe regarding extern "C" handling in namespaces #24569

Closed as not planned
@gjasny

Description

@gjasny
mannequin
Bugzilla Link 24195
Version trunk
OS All
Blocks #14079
CC @XVilka,@DougGregor,@rnk

Extended Description

Hello,

I try to use libclang to parse some source files. But the error is also visible in clang-cl (r242653 nightly build).

The error originates from boost interprocess headers which declare windows.h functions different than windows.h. The error got a work-around in later boost versions but unfortunately we are stuck with 1.50 for a while.

It boils down to Visual Studio Compiler accepting the following, but clang-cl does not:

extern "C" void foo(int a);
 
namespace bar {
    extern "C" void foo(long b);
}

In the boost case the functions get pointers to different structures.

Could you modify clang to accept this oddity with enabled ms-extensions / ms-compatibility like cl.exe does?

Thanks,
Gregor

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillac++clang:frontendLanguage frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateplatform:windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions