From: Rafael Espindola Date: Sat, 21 Jan 2012 05:43:40 +0000 (+0000) Subject: Remove redundant argument. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fc809de96f9b0a4fcf7bc936399194d0b7198c8;p=clang Remove redundant argument. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148628 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 48d118a397..2055f3bf6a 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -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, diff --git a/lib/Parse/ParsePragma.cpp b/lib/Parse/ParsePragma.cpp index 2069d31dd2..2fe2f3bdf3 100644 --- a/lib/Parse/ParsePragma.cpp +++ b/lib/Parse/ParsePragma.cpp @@ -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: diff --git a/lib/Sema/SemaAttr.cpp b/lib/Sema/SemaAttr.cpp index 6aae8db391..0859cb727b 100644 --- a/lib/Sema/SemaAttr.cpp +++ b/lib/Sema/SemaAttr.cpp @@ -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"))