Commit cedc390d authored by Bill Wendling's avatar Bill Wendling
Browse files

--- Merging r128210 into '.':

U    test/SemaCXX/goto.cpp
U    lib/Sema/SemaDecl.cpp

llvm-svn: 128255
parent dce4b0ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -499,7 +499,7 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext) {
    // isn't strictly lexical, which breaks name lookup. Be careful to insert
    // the label at the appropriate place in the identifier chain.
    for (I = IdResolver.begin(D->getDeclName()); I != IEnd; ++I) {
      DeclContext *IDC = (*I)->getLexicalDeclContext();
      DeclContext *IDC = (*I)->getLexicalDeclContext()->getRedeclContext();
      if (IDC == CurContext) {
        if (!S->isDeclScope(*I))
          continue;
+12 −2
Original line number Diff line number Diff line
// RUN: %clang_cc1 -fsyntax-only -verify -fblocks %s
// RUN: %clang_cc1 -fsyntax-only -verify -Wall -fblocks %s

// PR9463
double *end;
@@ -31,7 +31,7 @@ void h2(int end) {
  end:
    ::end = 0;
  }
 end:
 end: // expected-warning{{unused label 'end'}}
  end = 1;
}

@@ -66,4 +66,14 @@ namespace PR9495 {
  }
}

extern "C" {
  void exit(int);
}

void f() {
  {
    goto exit;
  }
 exit:
  return;
}