From: Eli Friedman Date: Sat, 7 Mar 2009 07:01:10 +0000 (+0000) Subject: Don't discard increment/decrement on function pointers. It's kind of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=25a30d0c3337a4f7bd1fb585e2becc6736e806fa;p=clang Don't discard increment/decrement on function pointers. It's kind of difficult to come up with a testcase because the code generation for this construct is broken. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66325 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 9ddee60701..79be162520 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -3554,7 +3554,6 @@ QualType Sema::CheckIncrementDecrementOperand(Expr *Op, SourceLocation OpLoc, Diag(OpLoc, diag::ext_gnu_ptr_func_arith) << ResType << Op->getSourceRange(); - return QualType(); } else { DiagnoseIncompleteType(OpLoc, PT->getPointeeType(), diag::err_typecheck_arithmetic_incomplete_type,