[flang-commits] [flang] ec3956b - Some more from-the-hip ctad-maybe-unsupported fixes for flang

David Blaikie via flang-commits flang-commits at lists.llvm.org
Tue Aug 16 09:04:04 PDT 2022


Author: David Blaikie
Date: 2022-08-16T16:03:49Z
New Revision: ec3956b6e63c1524d6b024ba5db9ffcd7281ada0

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

LOG: Some more from-the-hip ctad-maybe-unsupported fixes for flang

Added: 
    

Modified: 
    flang/include/flang/Evaluate/expression.h
    flang/include/flang/Parser/instrumented-parser.h
    flang/lib/Parser/basic-parsers.h

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Evaluate/expression.h b/flang/include/flang/Evaluate/expression.h
index 90309affbe25..bce5fc6750b7 100644
--- a/flang/include/flang/Evaluate/expression.h
+++ b/flang/include/flang/Evaluate/expression.h
@@ -263,6 +263,14 @@ struct ComplexComponent
   bool isImaginaryPart{true};
 };
 
+template <int KIND>
+ComplexComponent(bool, const Expr<Type<TypeCategory::Complex, KIND>> &)
+    -> ComplexComponent<KIND>;
+
+template <int KIND>
+ComplexComponent(bool, Expr<Type<TypeCategory::Complex, KIND>> &&)
+    -> ComplexComponent<KIND>;
+
 template <int KIND>
 struct Not : public Operation<Not<KIND>, Type<TypeCategory::Logical, KIND>,
                  Type<TypeCategory::Logical, KIND>> {

diff  --git a/flang/include/flang/Parser/instrumented-parser.h b/flang/include/flang/Parser/instrumented-parser.h
index 9d958b97c9b0..1770744ac714 100644
--- a/flang/include/flang/Parser/instrumented-parser.h
+++ b/flang/include/flang/Parser/instrumented-parser.h
@@ -75,6 +75,10 @@ template <typename PA> class InstrumentedParser {
   const PA parser_;
 };
 
+template <typename PA>
+InstrumentedParser(const MessageFixedText &, const PA &)
+    -> InstrumentedParser<PA>;
+
 template <typename PA>
 inline constexpr auto instrumented(
     const MessageFixedText &tag, const PA &parser) {

diff  --git a/flang/lib/Parser/basic-parsers.h b/flang/lib/Parser/basic-parsers.h
index e2355a7526ae..330ede958263 100644
--- a/flang/lib/Parser/basic-parsers.h
+++ b/flang/lib/Parser/basic-parsers.h
@@ -193,6 +193,9 @@ template <typename PA> class MessageContextParser {
   const PA parser_;
 };
 
+template <typename PA>
+MessageContextParser(MessageFixedText, PA) -> MessageContextParser<PA>;
+
 template <typename PA>
 inline constexpr auto inContext(MessageFixedText context, PA parser) {
   return MessageContextParser{context, parser};
@@ -241,6 +244,9 @@ template <typename PA> class WithMessageParser {
   const PA parser_;
 };
 
+template <typename PA>
+WithMessageParser(MessageFixedWidth, PA) -> WithMessageParser<PA>;
+
 template <typename PA>
 inline constexpr auto withMessage(MessageFixedText msg, PA parser) {
   return WithMessageParser{msg, parser};


        


More information about the flang-commits mailing list