Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[clang] #include <//foo.h> incorrectly normalized to #include <foo.h> #133174

Open
zygoloid opened this issue Mar 26, 2025 · 2 comments
Open

[clang] #include <//foo.h> incorrectly normalized to #include <foo.h> #133174

zygoloid opened this issue Mar 26, 2025 · 2 comments
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party

Comments

@zygoloid
Copy link
Collaborator

Clang weirdly accepts for example

#include <//stddef.h>

but rejects with any other number of leading /s other than zero. It looks like something may be going wrong with the normalization of // -> / that is resulting in zero slashes at the start of the filename.

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Mar 26, 2025
@EugeneZelenko EugeneZelenko added clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed clang Clang issues not falling into any other category labels Mar 26, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 26, 2025

@llvm/issue-subscribers-clang-frontend

Author: Richard Smith (zygoloid)

Clang weirdly accepts for example ```c++ #include <//stddef.h> ``` but rejects with any other number of leading `/`s other than zero. It looks like something may be going wrong with the normalization of `//` -> `/` that is resulting in zero slashes at the start of the filename.

@AaronBallman AaronBallman added the confirmed Verified by a second party label Mar 27, 2025
@AaronBallman
Copy link
Collaborator

The issue does not reproduce on Windows (unsurprisingly given the difference in directory separators).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" confirmed Verified by a second party
Projects
None yet
Development

No branches or pull requests

4 participants