[cfe-commits] r148628 - in /cfe/trunk: include/clang/Sema/Sema.h lib/Parse/ParsePragma.cpp lib/Sema/SemaAttr.cpp

Rafael Espindola rafael.espindola at gmail.com
Fri Jan 20 21:43:40 PST 2012


Author: rafael
Date: Fri Jan 20 23:43:40 2012
New Revision: 148628

URL: http://llvm.org/viewvc/llvm-project?rev=148628&view=rev
Log:
Remove redundant argument.

Modified:
    cfe/trunk/include/clang/Sema/Sema.h
    cfe/trunk/lib/Parse/ParsePragma.cpp
    cfe/trunk/lib/Sema/SemaAttr.cpp

Modified: cfe/trunk/include/clang/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/Sema.h?rev=148628&r1=148627&r2=148628&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/Sema.h (original)
+++ cfe/trunk/include/clang/Sema/Sema.h Fri Jan 20 23:43:40 2012
@@ -5553,7 +5553,7 @@
                          SourceLocation PragmaLoc);
 
   /// ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
-  void ActOnPragmaVisibility(bool IsPush, const IdentifierInfo* VisType,
+  void ActOnPragmaVisibility(const IdentifierInfo* VisType,
                              SourceLocation PragmaLoc);
 
   NamedDecl *DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II,

Modified: cfe/trunk/lib/Parse/ParsePragma.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParsePragma.cpp?rev=148628&r1=148627&r2=148628&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParsePragma.cpp (original)
+++ cfe/trunk/lib/Parse/ParsePragma.cpp Fri Jan 20 23:43:40 2012
@@ -42,13 +42,10 @@
 
   const IdentifierInfo *PushPop = Tok.getIdentifierInfo();
 
-  bool IsPush;
   const IdentifierInfo *VisType;
   if (PushPop && PushPop->isStr("pop")) {
-    IsPush = false;
     VisType = 0;
   } else if (PushPop && PushPop->isStr("push")) {
-    IsPush = true;
     PP.LexUnexpandedToken(Tok);
     if (Tok.isNot(tok::l_paren)) {
       PP.Diag(Tok.getLocation(), diag::warn_pragma_expected_lparen)
@@ -80,7 +77,7 @@
     return;
   }
 
-  Actions.ActOnPragmaVisibility(IsPush, VisType, VisLoc);
+  Actions.ActOnPragmaVisibility(VisType, VisLoc);
 }
 
 // #pragma pack(...) comes in the following delicious flavors:

Modified: cfe/trunk/lib/Sema/SemaAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaAttr.cpp?rev=148628&r1=148627&r2=148628&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaAttr.cpp Fri Jan 20 23:43:40 2012
@@ -345,9 +345,9 @@
   Stack->push_back(std::make_pair(type, loc));
 }
 
-void Sema::ActOnPragmaVisibility(bool IsPush, const IdentifierInfo* VisType,
+void Sema::ActOnPragmaVisibility(const IdentifierInfo* VisType,
                                  SourceLocation PragmaLoc) {
-  if (IsPush) {
+  if (VisType) {
     // Compute visibility to use.
     VisibilityAttr::VisibilityType type;
     if (VisType->isStr("default"))





More information about the cfe-commits mailing list