[PATCH] D18868: [Sema] PR27155: Fix a template argument deduction bug with base classes
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 7 14:55:10 PDT 2016
rsmith added inline comments.
================
Comment at: lib/Sema/SemaTemplateDeduction.cpp:1424-1426
@@ -1423,2 +1423,5 @@
+ SmallVector<DeducedTemplateArgument, 8> DeducedOrig(Deduced.begin(),
+ Deduced.end());
+
// Try to deduce template arguments from the template-id.
----------------
Can you also make this saving (and restoring) of the old deduced arguments conditional on `TDF_DerivedClass` and the argument type being a class type? Maybe duplicate the `DeduceTemplateArguments` call and put one copy inside the `if (const RecordType *RecordT = ...` block and the other on the `else` path, instead of moving the copy earlier.
http://reviews.llvm.org/D18868
More information about the cfe-commits
mailing list