]> granicus.if.org Git - clang/commit
Error if an extern C declaration matches a previous hidden extern C declaration.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 12 Mar 2013 15:13:56 +0000 (15:13 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 12 Mar 2013 15:13:56 +0000 (15:13 +0000)
commit10b1d1cf5ebb14b672d6b0c88f5160ad3cf1e988
treea1b90a311d385ee7e782570da34d814c0cfeaf45
parent6c18af24456000e4b7289bc024519efdb796229a
Error if an extern C declaration matches a previous hidden extern C declaration.

Without this patch we produce an error for

extern "C" {
  void f() {
    extern int b;
  }
}
extern "C" {
  extern float b;
}

but not for

extern "C" {
  void f() {
    extern int b;
  }
}
extern "C" {
  float b;
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176867 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaDecl.cpp
test/SemaCXX/function-redecl.cpp