]> granicus.if.org Git - clang/commit
Make sure the good old "function/array conversion" is done to function parameters.
authorSteve Naroff <snaroff@apple.com>
Sun, 5 Aug 2007 02:16:31 +0000 (02:16 +0000)
committerSteve Naroff <snaroff@apple.com>
Sun, 5 Aug 2007 02:16:31 +0000 (02:16 +0000)
commit69625f4925646669f68caa234cd9133261acaaa1
tree38ff7829a6bd8b2ac57bc75849f100bc017df7c8
parent94f05e36488fd08e404ac409d3bcb1db1da1bd4d
Make sure the good old "function/array conversion" is done to function parameters.

This resulted in the following error...

[dylan:clang/test/Parser] admin% cat parmvardecl_conversion.c
// RUN: clang -parse-ast-check %s

void f (int p[]) { p++; }

[dylan:clang/test/Parser] admin% clang -parse-ast-check parmvardecl_conversion.c
Errors seen but not expected:
  Line 3: cannot modify value of type 'int []'

With this fix, the test case above succeeds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40831 91177308-0d34-0410-b5e6-96231b3b80d8
Sema/SemaExpr.cpp
include/clang/AST/Decl.h
test/Parser/parmvardecl_conversion.c [new file with mode: 0644]