https://bugs.llvm.org/show_bug.cgi?id=45731

            Bug ID: 45731
           Summary: __builtin_FUNCTION() inconsistent on path separator on
                    Windows
           Product: clang
           Version: 10.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]

Given the following

src/main.cpp
src/header.h

And the following code:

//header.h
#include <iostream>

void test()
{
    std::cout << __builtin_FILE() << '\n';
}

=====

//main.cpp
#include "header.h"

int main()
{
    test();
    std::cout << __builtin_FILE() << '\n';
}

======

I get the following output

src/header.h
src\main.cpp

Discovered this when implementing srd::source_location for Microsoft here

https://github.com/microsoft/STL/pull/664#issuecomment-621063583

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to