barannikov88 added inline comments.

================
Comment at: clang/lib/Sema/SemaChecking.cpp:7986
+
+    if (!firstArgType->isAnyPointerType()) {
+      QualType expectedType = Context.getPointerType(firstArgType);
----------------
barannikov88 wrote:
> Instead of directly checking for the pointer type, it is better to call 
> `checkBuiltinArgument`, which will handle many corner cases.
> See the uses of this function in this file.
> 
It looks like this whole block can be replaced by a single function call.



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

https://reviews.llvm.org/D149514

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

Reply via email to