Skip to content
Snippets Groups Projects
Commit 44d1e0af authored by Olivier Goffart's avatar Olivier Goffart
Browse files

Functions declared in a scope should not hide previous declaration in earlier scopes

This code should be an error:

 void foo(int);
 void f3() {
   int foo(float);
   {
     float foo(int); // expected-error {{functions that differ only in their return type cannot be overloaded}}
   }
 }

the foo(float) function declared at function scope should not hide the float(int)
while trying to redeclare functions.

Differential Revision: http://reviews.llvm.org/D19763

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272961 91177308-0d34-0410-b5e6-96231b3b80d8
parent 9ff2a182
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment