]> granicus.if.org Git - clang/commitdiff
Don't discard increment/decrement on function pointers. It's kind of
authorEli Friedman <eli.friedman@gmail.com>
Sat, 7 Mar 2009 07:01:10 +0000 (07:01 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 7 Mar 2009 07:01:10 +0000 (07:01 +0000)
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

lib/Sema/SemaExpr.cpp

index 9ddee607015a698ba91fabb60ff9cb0cdbf4e89f..79be16252097847c9a86bdab0de6ffe4686c6e5a 100644 (file)
@@ -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,