summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/Inputs/macros_left.h
Commit message (Collapse)AuthorAgeFilesLines
* [preprocessor] Allow comparing two macro definitions syntactically instead ↵Argyrios Kyrtzidis2013-04-031-0/+2
| | | | | | | | | | | | | | of only lexically. Syntactically means the function macro parameter names do not need to use the same identifiers in order for the definitions to be considered identical. Syntactic equivalence is a microsoft extension for macro redefinitions and we'll also use this kind of comparison to check for ambiguous macros coming from modules. rdar://13562254 llvm-svn: 178671
* Use @import rather than @__experimental_modules_import, since theDouglas Gregor2012-12-111-1/+1
| | | | | | latter is rather a mess to type. llvm-svn: 169919
* Track which particular submodule #undef's a macro, so that the actualDouglas Gregor2012-10-121-1/+1
| | | | | | #undef only occurs if that submodule is imported. llvm-svn: 165773
* Diagnose the expansion of ambiguous macro definitions. This can happenDouglas Gregor2012-10-111-1/+3
| | | | | | | only with modules, when two disjoint modules #define the same identifier to different token sequences. llvm-svn: 165746
* Deserialize macro history when we deserialize an identifier that hasDouglas Gregor2012-10-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | macro history. When deserializing macro history, we arrange history such that the macros that have definitions (that haven't been #undef'd) and are visible come at the beginning of the list, which is what the preprocessor and other clients of Preprocessor::getMacroInfo() expect. If additional macro definitions become visible later, they'll be moved toward the front of the list. Note that it's possible to have ambiguities, but we don't diagnose them yet. There is a partially-implemented design decision here that, if a particular identifier has been defined or #undef'd within the translation unit, that definition (or #undef) hides any macro definitions that come from imported modules. There's still a little work to do to ensure that the right #undef'ing happens. Additionally, we'll need to scope the update records for #undefs, so they only kick in when the submodule containing that update record becomes visible. llvm-svn: 165682
* Rework the (de-)serialization of macros, as stored inDouglas Gregor2012-10-091-0/+5
MacroInfo*. Instead of simply dumping an offset into the current file, give each macro definition a proper ID with all of the standard modules-remapping facilities. Additionally, when a macro is modified in a subsequent AST file (e.g., #undef'ing a macro loaded from another module or from a precompiled header), provide a macro update record rather than rewriting the entire macro definition. This gives us greater consistency with the way we handle declarations, and ties together macro definitions much more cleanly. Note that we're still not actually deserializing macro history (we never were), but it's far easy to do properly now. llvm-svn: 165560
OpenPOWER on IntegriCloud