================
@@ -5325,12 +5386,31 @@ Sema::DeduceAutoType(TypeLoc Type, Expr *Init, QualType
&Result,
TDK != TemplateDeductionResult::Success)
return TDK;
}
-
// Could be null if somehow 'auto' appears in a non-deduced context.
if (Deduced[0].getKind() != TemplateArgument::Type)
return TemplateDeductionResult::Incomplete;
DeducedType = Deduced[0].getAsType();
+#ifndef NDEBUG
+ if (FastPathUsed) {
+ // Ignore differences due only to QualType sugar.
+ if (FastPathDeducedType != DeducedType) {
+ llvm::errs() << "Deducing: ";
+ Type.dump();
+ Init->dump();
+ llvm::errs() << "Fast-path deduced type: ";
+ FastPathDeducedType.dump();
+
+ llvm::errs() << "Slow-path deduced type: ";
+ DeducedType.dump();
+ }
----------------
zyn0217 wrote:
We shouldn't print debugging infos in either debug or release mode.
Assertions are enough.
https://github.com/llvm/llvm-project/pull/188196
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits