r231671 - Roll functions back into namespaces, msvc has problems with name lookup outside of it.
Benjamin Kramer
benny.kra at googlemail.com
Mon Mar 9 10:00:48 PDT 2015
Author: d0k
Date: Mon Mar 9 12:00:48 2015
New Revision: 231671
URL: http://llvm.org/viewvc/llvm-project?rev=231671&view=rev
Log:
Roll functions back into namespaces, msvc has problems with name lookup outside of it.
Modified:
cfe/trunk/lib/ASTMatchers/Dynamic/Diagnostics.cpp
Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Diagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/Dynamic/Diagnostics.cpp?rev=231671&r1=231670&r2=231671&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/Dynamic/Diagnostics.cpp (original)
+++ cfe/trunk/lib/ASTMatchers/Dynamic/Diagnostics.cpp Mon Mar 9 12:00:48 2015
@@ -8,10 +8,10 @@
//===----------------------------------------------------------------------===//
#include "clang/ASTMatchers/Dynamic/Diagnostics.h"
-using namespace clang;
-using namespace clang::ast_matchers;
-using namespace clang::ast_matchers::dynamic;
+namespace clang {
+namespace ast_matchers {
+namespace dynamic {
Diagnostics::ArgStream Diagnostics::pushContextFrame(ContextType Type,
SourceRange Range) {
ContextStack.push_back(ContextFrame());
@@ -150,7 +150,7 @@ static void formatErrorString(StringRef
}
}
-static void maybeAddLineAndColumn(const dynamic::SourceRange &Range,
+static void maybeAddLineAndColumn(const SourceRange &Range,
llvm::raw_ostream &OS) {
if (Range.Start.Line > 0 && Range.Start.Column > 0) {
OS << Range.Start.Line << ":" << Range.Start.Column << ": ";
@@ -216,3 +216,7 @@ std::string Diagnostics::toStringFull()
printToStreamFull(OS);
return OS.str();
}
+
+} // namespace dynamic
+} // namespace ast_matchers
+} // namespace clang
More information about the cfe-commits
mailing list