summaryrefslogtreecommitdiff
path: root/unittests/Lex
diff options
context:
space:
mode:
authorJohn Thompson <John.Thompson.JTSoftware@gmail.com>2014-04-23 12:57:01 +0000
committerJohn Thompson <John.Thompson.JTSoftware@gmail.com>2014-04-23 12:57:01 +0000
commit9be87f878588e7ed414dbfa29805883cc9cbb885 (patch)
tree1ce960127f08105e2ab290221b1106441d34d757 /unittests/Lex
parent0f0e18f77f5ceaee634653c3a80f79298d7b7407 (diff)
downloadclang-9be87f878588e7ed414dbfa29805883cc9cbb885.tar.gz
clang-9be87f878588e7ed414dbfa29805883cc9cbb885.tar.bz2
clang-9be87f878588e7ed414dbfa29805883cc9cbb885.tar.xz
Initial implementation of -modules-earch-all option, for searching for symbols in non-imported modules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Lex')
-rw-r--r--unittests/Lex/CMakeLists.txt1
-rw-r--r--unittests/Lex/LexerTest.cpp3
-rw-r--r--unittests/Lex/Makefile4
-rw-r--r--unittests/Lex/PPCallbacksTest.cpp3
-rw-r--r--unittests/Lex/PPConditionalDirectiveRecordTest.cpp3
5 files changed, 12 insertions, 2 deletions
diff --git a/unittests/Lex/CMakeLists.txt b/unittests/Lex/CMakeLists.txt
index 461e0d95fc..1fb57cfdfb 100644
--- a/unittests/Lex/CMakeLists.txt
+++ b/unittests/Lex/CMakeLists.txt
@@ -14,4 +14,5 @@ target_link_libraries(LexTests
clangLex
clangParse
clangSema
+ clangSerialization
)
diff --git a/unittests/Lex/LexerTest.cpp b/unittests/Lex/LexerTest.cpp
index 40ce928014..8aa95c966a 100644
--- a/unittests/Lex/LexerTest.cpp
+++ b/unittests/Lex/LexerTest.cpp
@@ -40,6 +40,9 @@ class VoidModuleLoader : public ModuleLoader {
Module::NameVisibilityKind Visibility,
SourceLocation ImportLoc,
bool Complain) { }
+
+ virtual GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc)
+ { return 0; }
};
// The test fixture.
diff --git a/unittests/Lex/Makefile b/unittests/Lex/Makefile
index fa233ce25f..071d01c8b5 100644
--- a/unittests/Lex/Makefile
+++ b/unittests/Lex/Makefile
@@ -9,8 +9,8 @@
CLANG_LEVEL = ../..
TESTNAME = Lex
-LINK_COMPONENTS := mcparser support mc
+LINK_COMPONENTS := mcparser support mc bitreader
USEDLIBS = clangParse.a clangSema.a clangAnalysis.a clangEdit.a \
- clangAST.a clangLex.a clangBasic.a
+ clangSerialization.a clangAST.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/unittests/Makefile
diff --git a/unittests/Lex/PPCallbacksTest.cpp b/unittests/Lex/PPCallbacksTest.cpp
index e3a4a76a77..3c953c2091 100644
--- a/unittests/Lex/PPCallbacksTest.cpp
+++ b/unittests/Lex/PPCallbacksTest.cpp
@@ -45,6 +45,9 @@ class VoidModuleLoader : public ModuleLoader {
Module::NameVisibilityKind Visibility,
SourceLocation ImportLoc,
bool Complain) { }
+
+ virtual GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc)
+ { return 0; }
};
// Stub to collect data from InclusionDirective callbacks.
diff --git a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
index 58857fa5a1..4e22589069 100644
--- a/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
+++ b/unittests/Lex/PPConditionalDirectiveRecordTest.cpp
@@ -64,6 +64,9 @@ class VoidModuleLoader : public ModuleLoader {
Module::NameVisibilityKind Visibility,
SourceLocation ImportLoc,
bool Complain) { }
+
+ virtual GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc)
+ { return 0; }
};
TEST_F(PPConditionalDirectiveRecordTest, PPRecAPI) {