]> granicus.if.org Git - clang/commitdiff
Remove redundant argument.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 21 Jan 2012 05:43:40 +0000 (05:43 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 21 Jan 2012 05:43:40 +0000 (05:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148628 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Sema.h
lib/Parse/ParsePragma.cpp
lib/Sema/SemaAttr.cpp

index 48d118a397f11f2caedfe18df11218531a82cb87..2055f3bf6ac17a8cdde5fe87b8253452cc426003 100644 (file)
@@ -5553,7 +5553,7 @@ public:
                          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,
index 2069d31dd27c23ae2ae160bd04e3d12205db01a0..2fe2f3bdf3caa3a1dfcec10ed56906a453fc3baa 100644 (file)
@@ -42,13 +42,10 @@ void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP,
 
   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 @@ void PragmaGCCVisibilityHandler::HandlePragma(Preprocessor &PP,
     return;
   }
 
-  Actions.ActOnPragmaVisibility(IsPush, VisType, VisLoc);
+  Actions.ActOnPragmaVisibility(VisType, VisLoc);
 }
 
 // #pragma pack(...) comes in the following delicious flavors:
index 6aae8db391452c747fda6f6198d4103ffef28b7d..0859cb727b5d8be4064642d6df242626c6e2c1ab 100644 (file)
@@ -345,9 +345,9 @@ static void PushPragmaVisibility(Sema &S, unsigned type, SourceLocation loc) {
   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"))