Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 4df5ab3..285ef01 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -157,7 +157,7 @@
       Diag(Overridden->getLocation(), 
            diag::note_related_result_type_overridden);
   }
-  if (getLangOptions().ObjCAutoRefCount) {
+  if (getLangOpts().ObjCAutoRefCount) {
     if ((NewMethod->hasAttr<NSReturnsRetainedAttr>() !=
          Overridden->hasAttr<NSReturnsRetainedAttr>())) {
         Diag(NewMethod->getLocation(),
@@ -299,7 +299,7 @@
   }
 
   // In ARC, disallow definition of retain/release/autorelease/retainCount
-  if (getLangOptions().ObjCAutoRefCount) {
+  if (getLangOpts().ObjCAutoRefCount) {
     switch (MDecl->getMethodFamily()) {
     case OMF_retain:
     case OMF_retainCount:
@@ -338,11 +338,11 @@
     // Only do this if the current class actually has a superclass.
     if (IC->getSuperClass()) {
       ObjCShouldCallSuperDealloc = 
-        !(Context.getLangOptions().ObjCAutoRefCount ||
-          Context.getLangOptions().getGC() == LangOptions::GCOnly) &&
+        !(Context.getLangOpts().ObjCAutoRefCount ||
+          Context.getLangOpts().getGC() == LangOptions::GCOnly) &&
         MDecl->getMethodFamily() == OMF_dealloc;
       ObjCShouldCallSuperFinalize =
-        Context.getLangOptions().getGC() != LangOptions::NonGC &&
+        Context.getLangOpts().getGC() != LangOptions::NonGC &&
         MDecl->getMethodFamily() == OMF_finalize;
     }
   }
@@ -1386,7 +1386,7 @@
 void Sema::WarnConflictingTypedMethods(ObjCMethodDecl *ImpMethodDecl,
                                        ObjCMethodDecl *MethodDecl,
                                        bool IsProtocolMethodDecl) {
-  if (getLangOptions().ObjCAutoRefCount &&
+  if (getLangOpts().ObjCAutoRefCount &&
       checkMethodFamilyMismatch(*this, ImpMethodDecl, MethodDecl))
     return;
 
@@ -1493,7 +1493,7 @@
   
   ObjCInterfaceDecl *Super = IDecl->getSuperClass();
   ObjCInterfaceDecl *NSIDecl = 0;
-  if (getLangOptions().NeXTRuntime) {
+  if (getLangOpts().NeXTRuntime) {
     // check to see if class implements forwardInvocation method and objects
     // of this class are derived from 'NSProxy' so that to forward requests
     // from one object to another.
@@ -1942,7 +1942,7 @@
                   left->getResultType(), right->getResultType()))
     return false;
 
-  if (getLangOptions().ObjCAutoRefCount &&
+  if (getLangOpts().ObjCAutoRefCount &&
       (left->hasAttr<NSReturnsRetainedAttr>()
          != right->hasAttr<NSReturnsRetainedAttr>() ||
        left->hasAttr<NSConsumesSelfAttr>()
@@ -1959,7 +1959,7 @@
     if (!matchTypes(Context, strategy, lparm->getType(), rparm->getType()))
       return false;
 
-    if (getLangOptions().ObjCAutoRefCount &&
+    if (getLangOpts().ObjCAutoRefCount &&
         lparm->hasAttr<NSConsumedAttr>() != rparm->hasAttr<NSConsumedAttr>())
       return false;
   }
@@ -2086,14 +2086,14 @@
     // differences.  In ARC, however, we also need to check for loose
     // mismatches, because most of them are errors.
     if (!strictSelectorMatch ||
-        (issueDiagnostic && getLangOptions().ObjCAutoRefCount))
+        (issueDiagnostic && getLangOpts().ObjCAutoRefCount))
       for (ObjCMethodList *Next = MethList.Next; Next; Next = Next->Next) {
         // This checks if the methods differ in type mismatch.
         if (!MatchTwoMethodDeclarations(MethList.Method, Next->Method,
                                         MMS_loose) &&
             !isAcceptableMethodMismatch(MethList.Method, Next->Method)) {
           issueDiagnostic = true;
-          if (getLangOptions().ObjCAutoRefCount)
+          if (getLangOpts().ObjCAutoRefCount)
             issueError = true;
           break;
         }
@@ -2856,7 +2856,7 @@
   }
   
   bool ARCError = false;
-  if (getLangOptions().ObjCAutoRefCount)
+  if (getLangOpts().ObjCAutoRefCount)
     ARCError = CheckARCMethodDecl(*this, ObjCMethod);
 
   // Infer the related result type when possible.
@@ -2945,7 +2945,7 @@
   for (SmallVectorImpl<Decl*>::iterator D = Decls.begin();
        D != Decls.end(); ++D) {
     FieldDecl *FD = cast<FieldDecl>(*D);
-    if (getLangOptions().CPlusPlus)
+    if (getLangOpts().CPlusPlus)
       PushOnScopeChains(cast<FieldDecl>(FD), S);
     else if (RecordDecl *Record = dyn_cast<RecordDecl>(TagD))
       Record->addDecl(FD);
@@ -2986,7 +2986,7 @@
   New->setExceptionVariable(true);
   
   // In ARC, infer 'retaining' for variables of retainable type.
-  if (getLangOptions().ObjCAutoRefCount && inferObjCARCLifetime(New))
+  if (getLangOpts().ObjCAutoRefCount && inferObjCARCLifetime(New))
     Invalid = true;
 
   if (Invalid)
@@ -3014,7 +3014,7 @@
   
   // Check that there are no default arguments inside the type of this
   // exception object (C++ only).
-  if (getLangOptions().CPlusPlus)
+  if (getLangOpts().CPlusPlus)
     CheckExtraCXXDefaultArguments(D);
   
   TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);