microsoft / microsoft/DirectXShaderCompiler
#pragma once cannot support path aliases
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
By using the -I <path> flag, it is possible to specify an additional root folder in which to look for headers.
This means that the same file can be included as:
#include "MyFile.h" // local include
#include "Root/../MyFile.h" // absolute include from the specified path
#pragma once considers the two paths above as different, and this causes the same file to be included twice.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the two include forms shown in the report and inspect the compiler's preprocessor handling of #pragma once and header path identity. Determine how the same physical header is tracked under aliased paths; done means both include forms are recognized as one file and the header is not processed twice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100