cbalint13 opened a new pull request, #15940:
URL: https://github.com/apache/tvm/pull/15940

   Fix compilation warnings for clang.
   
   ---
   
   The warnings was:
   ```
   BUILD/tvm/src/target/llvm/llvm_instance.cc:84:81: warning: reference to 
stack memory associated with parameter 'Obj' returned [-Wreturn-stack-address]
      84 |   friend ArrayRef<SubtargetFeatureKV>& featViewer(MCSubtargetInfo 
Obj) { return Obj.*Member; }
         |                                                                      
           ^~~
   BUILD/tvm/src/target/llvm/llvm_instance.cc:833:49: 
    warning: cast from 'const llvm::MCSubtargetInfo *' to 
'llvm::MCSubtargetInfo *' drops const qualifier [-Wcast-qual]
     833 |       llvm::featViewer(*(llvm::MCSubtargetInfo*)MCInfo);
         |                                                 ^
   BUILD/tvm/src/target/llvm/llvm_instance.cc:84:81: 
    warning: reference to stack memory associated with parameter 'Obj' returned 
[-Wreturn-stack-address]
      84 |   friend ArrayRef<SubtargetFeatureKV>& featViewer(MCSubtargetInfo 
Obj) { return Obj.*Member; }
         |                                                                      
           ^~~
   BUILD/tvm/src/target/llvm/llvm_instance.cc:833:13: note: in instantiation of 
member function 'llvm::featViewer' requested here
     833 |       llvm::featViewer(*(llvm::MCSubtargetInfo*)MCInfo);
         |           
   ```
   ```
   $ rpm -q clang
   clang-17.0.2-1.fc40.x86_64
   ```
   
   Cc: @junrushao 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to