[flang-commits] [flang] ed2b70e - [flang] Fix a warning

Kazu Hirata via flang-commits flang-commits at lists.llvm.org
Wed Feb 1 13:54:57 PST 2023


Author: Kazu Hirata
Date: 2023-02-01T13:54:51-08:00
New Revision: ed2b70ea6ab7675ae61be0297ee15b08f4cc3a10

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

LOG: [flang] Fix a warning

This patch fixes:

  flang/lib/Evaluate/check-expression.cpp:509:3: error: default label
  in switch which covers all enumeration values
  [-Werror,-Wcovered-switch-default]

Added: 
    

Modified: 
    flang/lib/Evaluate/check-expression.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Evaluate/check-expression.cpp b/flang/lib/Evaluate/check-expression.cpp
index f0e2bc8f4f5e..6cf1f8504708 100644
--- a/flang/lib/Evaluate/check-expression.cpp
+++ b/flang/lib/Evaluate/check-expression.cpp
@@ -506,8 +506,6 @@ static bool IsPermissibleInquiry(const semantics::Symbol &firstSymbol,
     return object && object->type() &&
         object->type()->category() == semantics::DeclTypeSpec::Character &&
         !object->type()->characterTypeSpec().length().isDeferred();
-  default:
-    break;
   }
   // TODO: Handle non-deferred LEN type parameters of PDTs
   return false;


        


More information about the flang-commits mailing list