[cfe-commits] r156363 - /cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Jordy Rose jediknil at belkadan.com
Mon May 7 20:27:22 PDT 2012


Author: jrose
Date: Mon May  7 22:27:22 2012
New Revision: 156363

URL: http://llvm.org/viewvc/llvm-project?rev=156363&view=rev
Log:
Clean up SemaDeclAttr for high-warnings build.

Includes a real potential initialization problem.

Modified:
    cfe/trunk/lib/Sema/SemaDeclAttr.cpp

Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=156363&r1=156362&r2=156363&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Mon May  7 22:27:22 2012
@@ -300,8 +300,8 @@
 }
 
 
-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 @@
                                  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 @@
   }
 
   // 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) {





More information about the cfe-commits mailing list