Make it an error if an Objective-C declaration is not in the global scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58705 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index a3d73c4..ce70855 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -1209,7 +1209,11 @@
   bool ObjCQualifiedIdTypesAreCompatible(QualType LHS, QualType RHS,
                                          bool ForCompare);
 
-  
+  /// Checks that the Objective-C declaration is declared in the global scope.
+  /// Emits an error and marks the declaration as invalid if it's not declared
+  /// in the global scope.
+  bool CheckObjCDeclScope(Decl *D);
+
   void InitBuiltinVaListType();
 
   // Helper method to turn variable array types into