aaron.ballman added a comment.

I just realized that we may need some additional test coverage for `scanf`, as 
that interface also uses `ArgType::matchesType()`: 
https://github.com/llvm/llvm-project/blob/5686f06d7fc02b7e2ab1eceb56f3830b6fdf7301/clang/lib/AST/ScanfFormatString.cpp#L511
 but I think that's the last thing remaining on the patch.



================
Comment at: clang/lib/AST/FormatString.cpp:480-481
+              break;
+            case BuiltinType::Half:
+            case BuiltinType::Float16:
+            case BuiltinType::Float:
----------------
fcloutier wrote:
> aaron.ballman wrote:
> > Should these be checking for `T == C.FloatTy` to return 
> > `NoMatchPromotionTypeConfusion`?
> I don't think it's necessary. `T` is the format specifier's expected type, 
> and no format specifier expects a `float` (due to floating-point types being 
> promoted to `double` by default argument promotion), so there's never a case 
> where `T` is `FloatTy`.
Ah good point!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158318/new/

https://reviews.llvm.org/D158318

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to