summaryrefslogtreecommitdiffstats
path: root/unittests/Lex/LexerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Lex/LexerTest.cpp')
-rw-r--r--unittests/Lex/LexerTest.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/unittests/Lex/LexerTest.cpp b/unittests/Lex/LexerTest.cpp
index e95cd02..c9b1840 100644
--- a/unittests/Lex/LexerTest.cpp
+++ b/unittests/Lex/LexerTest.cpp
@@ -1,4 +1,4 @@
-//===- unittests/Basic/LexerTest.cpp ------ Lexer tests -------------------===//
+//===- unittests/Lex/LexerTest.cpp ------ Lexer tests ---------------------===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,20 +7,20 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/Basic/SourceManager.h"
-#include "clang/Basic/FileManager.h"
+#include "clang/Lex/Lexer.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticOptions.h"
+#include "clang/Basic/FileManager.h"
#include "clang/Basic/LangOptions.h"
-#include "clang/Basic/TargetOptions.h"
+#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
-#include "clang/Lex/ModuleLoader.h"
+#include "clang/Basic/TargetOptions.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/HeaderSearchOptions.h"
+#include "clang/Lex/ModuleLoader.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "llvm/Config/config.h"
-
#include "gtest/gtest.h"
using namespace llvm;
@@ -39,7 +39,7 @@ protected:
TargetOpts(new TargetOptions)
{
TargetOpts->Triple = "x86_64-apple-darwin11.1.0";
- Target = TargetInfo::CreateTargetInfo(Diags, *TargetOpts);
+ Target = TargetInfo::CreateTargetInfo(Diags, &*TargetOpts);
}
FileSystemOptions FileMgrOpts;
@@ -53,11 +53,17 @@ protected:
};
class VoidModuleLoader : public ModuleLoader {
- virtual Module *loadModule(SourceLocation ImportLoc, ModuleIdPath Path,
- Module::NameVisibilityKind Visibility,
- bool IsInclusionDirective) {
- return 0;
+ virtual ModuleLoadResult loadModule(SourceLocation ImportLoc,
+ ModuleIdPath Path,
+ Module::NameVisibilityKind Visibility,
+ bool IsInclusionDirective) {
+ return ModuleLoadResult();
}
+
+ virtual void makeModuleVisible(Module *Mod,
+ Module::NameVisibilityKind Visibility,
+ SourceLocation ImportLoc,
+ bool Complain) { }
};
TEST_F(LexerTest, LexAPI) {
OpenPOWER on IntegriCloud