summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Lex
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2014-10-15 22:00:40 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2014-10-15 22:00:40 +0000
commitd1127d2d1f6995f695533224a61a5f6813c433b9 (patch)
tree629fd10c2e534a2e684ebfc1e6fca5252f9a2ea4 /clang/unittests/Lex
parent732e0aa9fb84f1d89e8fa9233f814415cc45a637 (diff)
downloadbcm5719-llvm-d1127d2d1f6995f695533224a61a5f6813c433b9.tar.gz
bcm5719-llvm-d1127d2d1f6995f695533224a61a5f6813c433b9.zip
Avoid having "using namespace" for both "clang" and "llvm" namespaces.
This is fragile, as there are classes with the same name in both namespaces (e.g. llvm::Module and clang::Module). llvm-svn: 219855
Diffstat (limited to 'clang/unittests/Lex')
-rw-r--r--clang/unittests/Lex/PPCallbacksTest.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/clang/unittests/Lex/PPCallbacksTest.cpp b/clang/unittests/Lex/PPCallbacksTest.cpp
index af046c4e354..bb27bac6ed6 100644
--- a/clang/unittests/Lex/PPCallbacksTest.cpp
+++ b/clang/unittests/Lex/PPCallbacksTest.cpp
@@ -27,8 +27,6 @@
#include "llvm/Support/Path.h"
#include "gtest/gtest.h"
-using namespace llvm;
-using namespace llvm::sys;
using namespace clang;
namespace {
@@ -142,7 +140,7 @@ protected:
FileMgr.getVirtualFile(HeaderPath, 0, 0);
// Add header's parent path to search path.
- StringRef SearchPath = path::parent_path(HeaderPath);
+ StringRef SearchPath = llvm::sys::path::parent_path(HeaderPath);
const DirectoryEntry *DE = FileMgr.getDirectory(SearchPath);
DirectoryLookup DL(DE, SrcMgr::C_User, false);
HeaderInfo.AddSearchPath(DL, IsSystemHeader);
@@ -160,7 +158,8 @@ protected:
// the InclusionDirective callback.
CharSourceRange InclusionDirectiveFilenameRange(const char* SourceText,
const char* HeaderPath, bool SystemHeader) {
- std::unique_ptr<MemoryBuffer> Buf = MemoryBuffer::getMemBuffer(SourceText);
+ std::unique_ptr<llvm::MemoryBuffer> Buf =
+ llvm::MemoryBuffer::getMemBuffer(SourceText);
SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(Buf)));
VoidModuleLoader ModLoader;
@@ -197,8 +196,8 @@ protected:
LangOptions OpenCLLangOpts;
OpenCLLangOpts.OpenCL = 1;
- std::unique_ptr<MemoryBuffer> SourceBuf =
- MemoryBuffer::getMemBuffer(SourceText, "test.cl");
+ std::unique_ptr<llvm::MemoryBuffer> SourceBuf =
+ llvm::MemoryBuffer::getMemBuffer(SourceText, "test.cl");
SourceMgr.setMainFileID(SourceMgr.createFileID(std::move(SourceBuf)));
VoidModuleLoader ModLoader;
OpenPOWER on IntegriCloud