]> granicus.if.org Git - clang/commitdiff
Clean up SemaDeclAttr for high-warnings build.
authorJordy Rose <jediknil@belkadan.com>
Tue, 8 May 2012 03:27:22 +0000 (03:27 +0000)
committerJordy Rose <jediknil@belkadan.com>
Tue, 8 May 2012 03:27:22 +0000 (03:27 +0000)
Includes a real potential initialization problem.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156363 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDeclAttr.cpp

index eb26a98f55513873aca6730d88b4df54021469c1..223e517c1ff183743b344c3d7e64d42950a0462c 100644 (file)
@@ -300,8 +300,8 @@ static const RecordType *getRecordType(QualType QT) {
 }
 
 
-bool checkBaseClassIsLockableCallback(const CXXBaseSpecifier *Specifier,
-                                      CXXBasePath &Path, void *UserData) {
+static bool checkBaseClassIsLockableCallback(const CXXBaseSpecifier *Specifier,
+                                             CXXBasePath &Path, void *Unused) {
   const RecordType *RT = Specifier->getType()->getAs<RecordType>();
   if (RT->getDecl()->getAttr<LockableAttr>())
     return true;
@@ -1690,11 +1690,11 @@ static void handleObjCRequiresPropertyDefsAttr(Sema &S, Decl *D,
                                  Attr.getRange(), S.Context));
 }
 
-bool checkAvailabilityAttr(Sema &S, SourceRange Range,
-                           IdentifierInfo *Platform,
-                           VersionTuple Introduced,
-                           VersionTuple Deprecated,
-                           VersionTuple Obsoleted) {
+static bool checkAvailabilityAttr(Sema &S, SourceRange Range,
+                                  IdentifierInfo *Platform,
+                                  VersionTuple Introduced,
+                                  VersionTuple Deprecated,
+                                  VersionTuple Obsoleted) {
   StringRef PlatformName
     = AvailabilityAttr::getPrettyPlatformName(Platform->getName());
   if (PlatformName.empty())
@@ -1868,7 +1868,7 @@ static void handleVisibilityAttr(Sema &S, Decl *D, const AttributeList &Attr) {
   }
 
   // Find the last Decl that has an attribute.
-  VisibilityAttr *PrevAttr;
+  VisibilityAttr *PrevAttr = 0;
   assert(D->redecls_begin() == D);
   for (Decl::redecl_iterator I = D->redecls_begin(), E = D->redecls_end();
        I != E; ++I) {