Ris-Bali updated this revision to Diff 518153.
Ris-Bali added a comment.

Clang-format fix


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

https://reviews.llvm.org/D149514

Files:
  clang/lib/Sema/SemaChecking.cpp


Index: clang/lib/Sema/SemaChecking.cpp
===================================================================
--- clang/lib/Sema/SemaChecking.cpp
+++ clang/lib/Sema/SemaChecking.cpp
@@ -7981,6 +7981,14 @@
         DefaultFunctionArrayLvalueConversion(FirstArg);
     if (FirstArgResult.isInvalid())
       return true;
+    Qualtype firstArgType = FirstArgResult.get()->getType();
+
+    if (!firstArgType->isAnyPointerType()) {
+      Qualtype expectedType = Context.getPointerType(firstArgType);
+      return Diag(FirstArg->getBeginLoc(),
+                  diag::err_typecheck_convert_incompatible)
+             << firstArgType << expectedType << 1 << 0 << 0;
+    }
     TheCall->setArg(0, FirstArgResult.get());
   }
 


Index: clang/lib/Sema/SemaChecking.cpp
===================================================================
--- clang/lib/Sema/SemaChecking.cpp
+++ clang/lib/Sema/SemaChecking.cpp
@@ -7981,6 +7981,14 @@
         DefaultFunctionArrayLvalueConversion(FirstArg);
     if (FirstArgResult.isInvalid())
       return true;
+    Qualtype firstArgType = FirstArgResult.get()->getType();
+
+    if (!firstArgType->isAnyPointerType()) {
+      Qualtype expectedType = Context.getPointerType(firstArgType);
+      return Diag(FirstArg->getBeginLoc(),
+                  diag::err_typecheck_convert_incompatible)
+             << firstArgType << expectedType << 1 << 0 << 0;
+    }
     TheCall->setArg(0, FirstArgResult.get());
   }
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to