[llvm] 766ec7d - [SandboxIR] Silence warning with Clang 19.1.0 on Windows

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 04:37:42 PDT 2024


Author: Alexandre Ganea
Date: 2024-09-20T07:37:21-04:00
New Revision: 766ec7d50f207b7e17f23b16bdf4fca1cdc8dd23

URL: https://github.com/llvm/llvm-project/commit/766ec7d50f207b7e17f23b16bdf4fca1cdc8dd23
DIFF: https://github.com/llvm/llvm-project/commit/766ec7d50f207b7e17f23b16bdf4fca1cdc8dd23.diff

LOG: [SandboxIR] Silence warning with Clang 19.1.0 on Windows

This fixes:
```
[1832/3777] Building CXX object
lib\SandboxIR\CMakeFiles\LLVMSandboxIR.dir\SandboxIR.cpp.obj
In file included from
C:\src\git\llvm-project\llvm\lib\SandboxIR\SandboxIR.cpp:9:
C:\src\git\llvm-project\llvm\include\llvm/SandboxIR/SandboxIR.h(4400,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]
 4400 |   friend class TargetExtType; // For LLVMCtx.
       |                ^
             |                ::llvm::
	     1 warning generated.
```

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/SandboxIR/SandboxIR.h b/llvm/include/llvm/SandboxIR/SandboxIR.h
index 572568f2257519..fcc03b3014f99d 100644
--- a/llvm/include/llvm/SandboxIR/SandboxIR.h
+++ b/llvm/include/llvm/SandboxIR/SandboxIR.h
@@ -4397,7 +4397,7 @@ class Context {
                         // is complete
   friend class IntegerType;   // For LLVMCtx.
   friend class StructType;    // For LLVMCtx.
-  friend class TargetExtType; // For LLVMCtx.
+  friend class ::llvm::TargetExtType; // For LLVMCtx.
   Tracker IRTracker;
 
   /// Maps LLVM Value to the corresponding sandboxir::Value. Owns all


        


More information about the llvm-commits mailing list