From 846e6a6121ee1dcf6e672a0d0dcc184daea3e7e3 Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Fri, 18 May 2012 18:39:06 +0000 Subject: [PATCH] fix warnings when compiling with -Wshadow llvm-svn: 157061 --- llvm/include/llvm/Support/CommandLine.h | 4 ++-- llvm/include/llvm/Support/SMLoc.h | 2 +- llvm/include/llvm/Support/SourceMgr.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index c212d2d..40c4300 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/include/llvm/Support/CommandLine.h @@ -217,9 +217,9 @@ public: void setMiscFlag(enum MiscFlags M) { Misc |= M; } void setPosition(unsigned pos) { Position = pos; } protected: - explicit Option(enum NumOccurrencesFlag Occurrences, + explicit Option(enum NumOccurrencesFlag OccurrencesFlag, enum OptionHidden Hidden) - : NumOccurrences(0), Occurrences(Occurrences), HiddenFlag(Hidden), + : NumOccurrences(0), Occurrences(OccurrencesFlag), HiddenFlag(Hidden), Formatting(NormalFormatting), Position(0), AdditionalVals(0), NextRegistered(0), ArgStr(""), HelpStr(""), ValueStr("") { diff --git a/llvm/include/llvm/Support/SMLoc.h b/llvm/include/llvm/Support/SMLoc.h index d48bfcc..7e0811a 100644 --- a/llvm/include/llvm/Support/SMLoc.h +++ b/llvm/include/llvm/Support/SMLoc.h @@ -48,7 +48,7 @@ public: SMLoc Start, End; SMRange() {} - SMRange(SMLoc Start, SMLoc End) : Start(Start), End(End) { + SMRange(SMLoc St, SMLoc En) : Start(St), End(En) { assert(Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!"); } diff --git a/llvm/include/llvm/Support/SourceMgr.h b/llvm/include/llvm/Support/SourceMgr.h index f108f73..8949a3a 100644 --- a/llvm/include/llvm/Support/SourceMgr.h +++ b/llvm/include/llvm/Support/SourceMgr.h @@ -176,9 +176,9 @@ public: SMDiagnostic() : SM(0), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {} // Diagnostic with no location (e.g. file not found, command line arg error). - SMDiagnostic(const std::string &filename, SourceMgr::DiagKind Kind, + SMDiagnostic(const std::string &filename, SourceMgr::DiagKind Knd, const std::string &Msg) - : SM(0), Filename(filename), LineNo(-1), ColumnNo(-1), Kind(Kind), + : SM(0), Filename(filename), LineNo(-1), ColumnNo(-1), Kind(Knd), Message(Msg) {} // Diagnostic with a location. -- 2.7.4