diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-27 01:25:34 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-03-27 01:25:34 +0000 |
commit | 52151fd57eaf40603fa8f1cd34dcb4ad5f7701b3 (patch) | |
tree | 3f7c1ccc08f24300143e9d5eff46a4e6c121c3f2 /include/clang/Serialization | |
parent | 7ca8e9160aca1616740e00954f742384a1622598 (diff) |
[modules] Before marking the module imported macros as ambiguous, check if this is a case where
the system macro uses a not identical definition compared to a macro from the clang headers.
For example (these come from different modules):
\#define LONG_MAX __LONG_MAX__ (clang's limits.h)
\#define LONG_MAX 0x7fffffffffffffffL (system's limits.h)
in which case don't mark them ambiguous to avoid the "ambiguous macro expansion" warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Serialization')
-rw-r--r-- | include/clang/Serialization/ASTReader.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Serialization/ASTReader.h b/include/clang/Serialization/ASTReader.h index 246abcf6d7..19d49183dd 100644 --- a/include/clang/Serialization/ASTReader.h +++ b/include/clang/Serialization/ASTReader.h @@ -1206,7 +1206,7 @@ public: bool Complain); /// \brief Make the names within this set of hidden names visible. - void makeNamesVisible(const HiddenNames &Names); + void makeNamesVisible(const HiddenNames &Names, Module *Owner); /// \brief Set the AST callbacks listener. void setListener(ASTReaderListener *listener) { @@ -1629,7 +1629,8 @@ public: void installPCHMacroDirectives(IdentifierInfo *II, ModuleFile &M, uint64_t Offset); - void installImportedMacro(IdentifierInfo *II, MacroDirective *MD); + void installImportedMacro(IdentifierInfo *II, MacroDirective *MD, + Module *Owner); /// \brief Retrieve the macro with the given ID. MacroInfo *getMacro(serialization::MacroID ID); |