[flang-commits] [flang] 7330c9b - [flang] Fix -Wunneeded-internal-declaration in DirectivesCommon.h (NFC)

Jie Fu via flang-commits flang-commits at lists.llvm.org
Wed Sep 4 04:47:28 PDT 2024


Author: Jie Fu
Date: 2024-09-04T19:46:27+08:00
New Revision: 7330c9b033f29bd92b99db6282c0f71de64122ab

URL: https://github.com/llvm/llvm-project/commit/7330c9b033f29bd92b99db6282c0f71de64122ab
DIFF: https://github.com/llvm/llvm-project/commit/7330c9b033f29bd92b99db6282c0f71de64122ab.diff

LOG: [flang] Fix -Wunneeded-internal-declaration in DirectivesCommon.h (NFC)

/llvm-project/flang/lib/Lower/DirectivesCommon.h:910:1:
error: 'static' function 'peelOuterConvert' declared in header file should be declared 'static inline' [-Werror,-Wunneeded-internal-declaration]
peelOuterConvert(Fortran::semantics::SomeExpr &expr) {
^
1 error generated.

Added: 
    

Modified: 
    flang/lib/Lower/DirectivesCommon.h

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/DirectivesCommon.h b/flang/lib/Lower/DirectivesCommon.h
index d8b1f1f3e43621..d2060e77ce5305 100644
--- a/flang/lib/Lower/DirectivesCommon.h
+++ b/flang/lib/Lower/DirectivesCommon.h
@@ -906,7 +906,7 @@ struct PeelConvert {
   }
 };
 
-static Fortran::semantics::SomeExpr
+static inline Fortran::semantics::SomeExpr
 peelOuterConvert(Fortran::semantics::SomeExpr &expr) {
   if (auto peeled = PeelConvert::visit(expr))
     return *peeled;


        


More information about the flang-commits mailing list