[llvm] 446e793 - [SandboxIR] Fix warning when building on Windows with clang-cl. NFC.

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 11:44:23 PDT 2025


Author: Alexandre Ganea
Date: 2025-04-08T14:42:24-04:00
New Revision: 446e793d77286ea477c90778f28c168883526e56

URL: https://github.com/llvm/llvm-project/commit/446e793d77286ea477c90778f28c168883526e56
DIFF: https://github.com/llvm/llvm-project/commit/446e793d77286ea477c90778f28c168883526e56.diff

LOG: [SandboxIR] Fix warning when building on Windows with clang-cl. NFC.

This fixes:
```
[1230/3381] Building CXX object lib\Transforms\Vectorize\CMakeFiles\LLVMVectorize.dir\SandboxVectorizer\VecUtils.cpp.obj
In file included from C:\git\llvm-project\llvm\lib\Transforms\Vectorize\SandboxVectorizer\VecUtils.cpp:9:
In file included from C:\git\llvm-project\llvm\include\llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h:17:
C:\git\llvm-project\llvm\include\llvm/SandboxIR/Type.h(55,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]
   55 |   friend class CallBase;           // For LLVMTy.
      |                ^
      |                ::llvm::
C:\git\llvm-project\llvm\include\llvm/SandboxIR/Type.h(60,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]
   60 |   friend class CmpInst;            // For LLVMTy. TODO: Cleanup after
      |                ^
      |                ::llvm::
2 warnings generated.
```

Added: 
    

Modified: 
    llvm/include/llvm/SandboxIR/Type.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/SandboxIR/Type.h b/llvm/include/llvm/SandboxIR/Type.h
index 7d90168c06576..9ece89fcbd66c 100644
--- a/llvm/include/llvm/SandboxIR/Type.h
+++ b/llvm/include/llvm/SandboxIR/Type.h
@@ -23,18 +23,20 @@ namespace llvm::sandboxir {
 
 class Context;
 // Forward declare friend classes for MSVC.
-class PointerType;
-class VectorType;
+class ArrayType;
+class CallBase;
+class CmpInst;
+class ConstantDataSequential;
 class FixedVectorType;
-class ScalableVectorType;
-class IntegerType;
+class FPMathOperator;
 class FunctionType;
-class ArrayType;
+class IntegerType;
+class Module;
+class PointerType;
+class ScalableVectorType;
 class StructType;
 class TargetExtType;
-class Module;
-class FPMathOperator;
-class ConstantDataSequential;
+class VectorType;
 #define DEF_INSTR(ID, OPCODE, CLASS) class CLASS;
 #define DEF_CONST(ID, CLASS) class CLASS;
 #include "llvm/SandboxIR/Values.def"


        


More information about the llvm-commits mailing list