summaryrefslogtreecommitdiff
path: root/lib/ASTMatchers/Dynamic/Diagnostics.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit5e20cdd81c44a443562a09007668ffdf76c455af (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /lib/ASTMatchers/Dynamic/Diagnostics.cpp
parentd5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff)
Notes
Diffstat (limited to 'lib/ASTMatchers/Dynamic/Diagnostics.cpp')
-rw-r--r--lib/ASTMatchers/Dynamic/Diagnostics.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ASTMatchers/Dynamic/Diagnostics.cpp b/lib/ASTMatchers/Dynamic/Diagnostics.cpp
index b0abdc7cf810..f6d34494dec5 100644
--- a/lib/ASTMatchers/Dynamic/Diagnostics.cpp
+++ b/lib/ASTMatchers/Dynamic/Diagnostics.cpp
@@ -12,7 +12,6 @@
namespace clang {
namespace ast_matchers {
namespace dynamic {
-
Diagnostics::ArgStream Diagnostics::pushContextFrame(ContextType Type,
SourceRange Range) {
ContextStack.push_back(ContextFrame());
@@ -75,7 +74,7 @@ Diagnostics::ArgStream Diagnostics::addError(const SourceRange &Range,
return ArgStream(&Last.Messages.back().Args);
}
-StringRef contextTypeToFormatString(Diagnostics::ContextType Type) {
+static StringRef contextTypeToFormatString(Diagnostics::ContextType Type) {
switch (Type) {
case Diagnostics::CT_MatcherConstruct:
return "Error building matcher $0.";
@@ -85,7 +84,7 @@ StringRef contextTypeToFormatString(Diagnostics::ContextType Type) {
llvm_unreachable("Unknown ContextType value.");
}
-StringRef errorTypeToFormatString(Diagnostics::ErrorType Type) {
+static StringRef errorTypeToFormatString(Diagnostics::ErrorType Type) {
switch (Type) {
case Diagnostics::ET_RegistryMatcherNotFound:
return "Matcher not found: $0";
@@ -130,8 +129,9 @@ StringRef errorTypeToFormatString(Diagnostics::ErrorType Type) {
llvm_unreachable("Unknown ErrorType value.");
}
-void formatErrorString(StringRef FormatString, ArrayRef<std::string> Args,
- llvm::raw_ostream &OS) {
+static void formatErrorString(StringRef FormatString,
+ ArrayRef<std::string> Args,
+ llvm::raw_ostream &OS) {
while (!FormatString.empty()) {
std::pair<StringRef, StringRef> Pieces = FormatString.split("$");
OS << Pieces.first.str();