aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/MacroInfo.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-11 21:07:39 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-11 21:07:39 +0000
commite8219a655128b98d0573658a139de5d848451fda (patch)
treefbf31a548eb9eb74a27ff378c4d7eb101c3685c8 /lib/Lex/MacroInfo.cpp
parent42adacbb9bc7b6172bd36f9baa297180c77ab6d7 (diff)
Diagnose the expansion of ambiguous macro definitions. This can happen
only with modules, when two disjoint modules #define the same identifier to different token sequences. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/MacroInfo.cpp')
-rw-r--r--lib/Lex/MacroInfo.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Lex/MacroInfo.cpp b/lib/Lex/MacroInfo.cpp
index 7e538fabf4..904f04e4f8 100644
--- a/lib/Lex/MacroInfo.cpp
+++ b/lib/Lex/MacroInfo.cpp
@@ -32,7 +32,8 @@ MacroInfo::MacroInfo(SourceLocation DefLoc)
IsAllowRedefinitionsWithoutWarning(false),
IsWarnIfUnused(false),
IsPublic(true),
- IsHidden(false) {
+ IsHidden(false),
+ IsAmbiguous(false) {
}
MacroInfo::MacroInfo(const MacroInfo &MI, llvm::BumpPtrAllocator &PPAllocator)
@@ -56,7 +57,8 @@ MacroInfo::MacroInfo(const MacroInfo &MI, llvm::BumpPtrAllocator &PPAllocator)
IsAllowRedefinitionsWithoutWarning(MI.IsAllowRedefinitionsWithoutWarning),
IsWarnIfUnused(MI.IsWarnIfUnused),
IsPublic(MI.IsPublic),
- IsHidden(MI.IsHidden) {
+ IsHidden(MI.IsHidden),
+ IsAmbiguous(MI.IsAmbiguous) {
setArgumentList(MI.ArgumentList, MI.NumArguments, PPAllocator);
}