Skip to content
Commit cfd2528a authored by Rafael Espindola's avatar Rafael Espindola
Browse files

We already reported an error for

extern "C" {
  void test5_f() {
    extern int test5_b;
  }
}
static float test5_b;

This patch makes us report one for

extern "C" {
  void test6_f() {
    extern int test6_b;
  }
}
extern "C" {
  static float test6_b;
}

Not because we think the declaration would be extern C, but because of the rule:

An entity with C language linkage shall not be declared with the same name as an entity in global scope...

We were just not looking past the extern "C" to see if the decl was in global
scope.

llvm-svn: 176875
parent a5151271
Loading
Loading
Loading
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