[cfe-commits] r120897 - in /cfe/trunk: include/clang/AST/DeclTemplate.h lib/AST/Decl.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Dec 4 00:16:05 PST 2010


Author: d0k
Date: Sat Dec  4 02:16:05 2010
New Revision: 120897

URL: http://llvm.org/viewvc/llvm-project?rev=120897&view=rev
Log:
Silence "comparison between signed and unsigned integer expressions" warnings.

Modified:
    cfe/trunk/include/clang/AST/DeclTemplate.h
    cfe/trunk/lib/AST/Decl.cpp

Modified: cfe/trunk/include/clang/AST/DeclTemplate.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclTemplate.h?rev=120897&r1=120896&r2=120897&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclTemplate.h (original)
+++ cfe/trunk/include/clang/AST/DeclTemplate.h Sat Dec  4 02:16:05 2010
@@ -1241,7 +1241,7 @@
   }
 
   void setSpecializationKind(TemplateSpecializationKind TSK) {
-    if (SpecializationKind != TSK)
+    if (getSpecializationKind() != TSK)
       ClearLinkageAndVisibilityCache();
     SpecializationKind = TSK;
   }

Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=120897&r1=120896&r2=120897&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Sat Dec  4 02:16:05 2010
@@ -531,9 +531,9 @@
   if (HasLinkageAndVisibilityCached) {
 #ifndef NDEBUG
     LinkageInfo LI = getLVForDecl(this, LVFlags());
-    assert(LI.visibility() == CachedVisibility);
+    assert(LI.visibility() == Visibility(CachedVisibility));
     assert(LI.visibilityExplicit() == CachedVisibilityIsExplicit);
-    assert(LI.linkage() == CachedLinkage);
+    assert(LI.linkage() == Linkage(CachedLinkage));
 #endif
     return LinkageInfo(Linkage(CachedLinkage), Visibility(CachedVisibility),
                        CachedVisibilityIsExplicit);
@@ -930,7 +930,7 @@
 
 void VarDecl::setStorageClass(StorageClass SC) {
   assert(isLegalForVariable(SC));
-  if (SClass != SC)
+  if (getStorageClass() != SC)
     ClearLinkageAndVisibilityCache();
   
   SClass = SC;
@@ -1341,7 +1341,7 @@
 
 void FunctionDecl::setStorageClass(StorageClass SC) {
   assert(isLegalForFunction(SC));
-  if (SClass != SC)
+  if (getStorageClass() != SC)
     ClearLinkageAndVisibilityCache();
   
   SClass = SC;





More information about the cfe-commits mailing list