Skip to content

[llvm][SandboxIR] Fix some clang-cl warnings on Windows #101660

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

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

DavidSpickett
Copy link
Collaborator

@DavidSpickett DavidSpickett commented Aug 2, 2024

[4958/6355] Building CXX object lib\SandboxIR\CMakeFiles\LLVMSandboxIR.dir\Tracker.cpp.obj In file included from C:\Work\david.spickett\llvm-project\llvm\lib\SandboxIR\Tracker.cpp:9: In file included from C:\Work\david.spickett\llvm-project\llvm\include\llvm/SandboxIR/Tracker.h:48: C:\Work\david.spickett\llvm-project\llvm\include\llvm/SandboxIR/Use.h(46,16): warning: unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]
   46 |   friend class CallBrInst;         // For constructor
      |                ^
      |                ::llvm::
In file included from C:\Work\david.spickett\llvm-project\llvm\lib\SandboxIR\Tracker.cpp:13:
C:\Work\david.spickett\llvm-project\llvm\include\llvm/SandboxIR/SandboxIR.h(1433,16): warning:
unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]
 1433 |   friend class PtrToInt; // For constructor.
      |                ^
      |                ::llvm::

First one I think is a missing forward declaration and I couldn't find the right class for the second one but it appears to be unused anyway.

[4958/6355] Building CXX object lib\SandboxIR\CMakeFiles\LLVMSandboxIR.dir\Tracker.cpp.obj
In file included from C:\Work\david.spickett\llvm-project\llvm\lib\SandboxIR\Tracker.cpp:9:
In file included from C:\Work\david.spickett\llvm-project\llvm\include\llvm/SandboxIR/Tracker.h:48:
C:\Work\david.spickett\llvm-project\llvm\include\llvm/SandboxIR/Use.h(46,16): warning:
unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]
   46 |   friend class CallBrInst;         // For constructor
      |                ^
      |                ::llvm::
In file included from C:\Work\david.spickett\llvm-project\llvm\lib\SandboxIR\Tracker.cpp:13:
C:\Work\david.spickett\llvm-project\llvm\include\llvm/SandboxIR/SandboxIR.h(1433,16): warning:
unqualified friend declaration referring to type outside of the nearest enclosing namespace is a Microsoft extension; add a nested name specifier [-Wmicrosoft-unqualified-friend]
 1433 |   friend class PtrToInt; // For constructor.
      |                ^
      |                ::llvm::

First one I think is a missing forward declaration and I couldn't find
the right class for the second one but it appears to be unused anyway.
@DavidSpickett DavidSpickett requested a review from vporpo August 2, 2024 12:13
Copy link

github-actions bot commented Aug 2, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@vporpo vporpo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, thanks for the fix!

@DavidSpickett DavidSpickett merged commit c24fb45 into llvm:main Aug 5, 2024
4 of 7 checks passed
@DavidSpickett DavidSpickett deleted the sandbox-warn branch August 5, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants