summaryrefslogtreecommitdiff
path: root/include/clang/Sema/TemplateDeduction.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Sema/TemplateDeduction.h')
-rw-r--r--include/clang/Sema/TemplateDeduction.h27
1 files changed, 7 insertions, 20 deletions
diff --git a/include/clang/Sema/TemplateDeduction.h b/include/clang/Sema/TemplateDeduction.h
index f4a706ecb9ab2..d92cbab4fbcf8 100644
--- a/include/clang/Sema/TemplateDeduction.h
+++ b/include/clang/Sema/TemplateDeduction.h
@@ -53,7 +53,7 @@ class TemplateDeductionInfo {
public:
TemplateDeductionInfo(SourceLocation Loc, unsigned DeducedDepth = 0)
: Deduced(nullptr), Loc(Loc), HasSFINAEDiagnostic(false),
- DeducedDepth(DeducedDepth), Expression(nullptr) {}
+ DeducedDepth(DeducedDepth), CallArgIndex(0) {}
/// \brief Returns the location at which template argument is
/// occurring.
@@ -175,21 +175,12 @@ public:
/// FIXME: Finish documenting this.
TemplateArgument SecondArg;
- union {
- /// \brief The expression which caused a deduction failure.
- ///
- /// TDK_FailedOverloadResolution: this argument is the reference to
- /// an overloaded function which could not be resolved to a specific
- /// function.
- Expr *Expression;
-
- /// \brief The index of the function argument that caused a deduction
- /// failure.
- ///
- /// TDK_DeducedMismatch: this is the index of the argument that had a
- /// different argument type from its substituted parameter type.
- unsigned CallArgIndex;
- };
+ /// \brief The index of the function argument that caused a deduction
+ /// failure.
+ ///
+ /// TDK_DeducedMismatch: this is the index of the argument that had a
+ /// different argument type from its substituted parameter type.
+ unsigned CallArgIndex;
/// \brief Information on packs that we're currently expanding.
///
@@ -235,10 +226,6 @@ struct DeductionFailureInfo {
/// refers to, if any.
const TemplateArgument *getSecondArg();
- /// \brief Return the expression this deduction failure refers to,
- /// if any.
- Expr *getExpr();
-
/// \brief Return the index of the call argument that this deduction
/// failure refers to, if any.
llvm::Optional<unsigned> getCallArgIndex();