summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Basic/SourceManagerTest.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-02-24 00:05:14 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2013-02-24 00:05:14 +0000
commitfead64be9b9f5d8700bd4705efcb36194fbbb147 (patch)
tree85d5319bb5ae43e5f3e4ef1e0d0214f2700490e8 /clang/unittests/Basic/SourceManagerTest.cpp
parentecd77a98f0e82a697c81be6d945cc81ebcba7f9b (diff)
downloadbcm5719-llvm-fead64be9b9f5d8700bd4705efcb36194fbbb147.tar.gz
bcm5719-llvm-fead64be9b9f5d8700bd4705efcb36194fbbb147.zip
[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
full information about the macro (e.g if it was imported and where). llvm-svn: 175978
Diffstat (limited to 'clang/unittests/Basic/SourceManagerTest.cpp')
-rw-r--r--clang/unittests/Basic/SourceManagerTest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/unittests/Basic/SourceManagerTest.cpp b/clang/unittests/Basic/SourceManagerTest.cpp
index a7beb8f090c..130ea0a5a87 100644
--- a/clang/unittests/Basic/SourceManagerTest.cpp
+++ b/clang/unittests/Basic/SourceManagerTest.cpp
@@ -249,12 +249,13 @@ class MacroTracker : public PPCallbacks {
public:
explicit MacroTracker(std::vector<MacroAction> &Macros) : Macros(Macros) { }
- virtual void MacroDefined(const Token &MacroNameTok, const MacroInfo *MI) {
- Macros.push_back(MacroAction(MI->getDefinitionLoc(),
+ virtual void MacroDefined(const Token &MacroNameTok,
+ const MacroDirective *MD) {
+ Macros.push_back(MacroAction(MD->getLocation(),
MacroNameTok.getIdentifierInfo()->getName(),
true));
}
- virtual void MacroExpands(const Token &MacroNameTok, const MacroInfo* MI,
+ virtual void MacroExpands(const Token &MacroNameTok, const MacroDirective *MD,
SourceRange Range) {
Macros.push_back(MacroAction(MacroNameTok.getLocation(),
MacroNameTok.getIdentifierInfo()->getName(),
OpenPOWER on IntegriCloud