![]() + if (Def.getDirective()->isAmbiguous()) If the macro definition is ambiguous, complain. that redefined a macro without undef'ing it first (test/PCH/macro-redef.c). of course, LIBOTHER must be passed as a parameter and survive 2 levels of macro function calls, something not trivial to achieve. I just want to stringify LIBOTHER to obtain 'LIBOTHER'. FIXME: Temporarily disable this warning that is currently bogus with a PCH kts, its more on the macro side itself, the way it works and macro-expands things, not C code generation. then the macro could expand to different things in other contexts, we -286,25 +288,22 bool Preprocessor::HandleMacroExpandedId If this is a macro expansion in the "#if !defined(x)" line for the file, + MacroDirective::DefInfo Def = MD->getDefinition() / expanded as a macro, handle it and return the next token as 'Identifier'.īool Preprocessor::HandleMacroExpandedIdentifier(Token &Identifier, +++ cfe/trunk/lib/Lex/PPMacroExpansion.cpp Tue Mar 26 20:25:19 -211,7 +211,9 bool Preprocessor::isNextPPTokenLParen() cfe/trunk/lib/Lex/PPMacroExpansion.cpp (original) ![]() Modified: cfe/trunk/lib/Lex/PPMacroExpansion.cpp This reduces macro namespace interference across modules. Macro invocations appearing in that expansion are left unchanged. Undefining of macros in the translation unit that imported that submodule. Some languages, such as C and C++, provide a way to define and invoke preprocessor. #undefs in submodules cause the macro to not be exported by that submodule, it doesn't cause They differ mostly in what they look like when they are used. When there is an ambiguous macro, expand using the latest introduced version, not the first one. Re-enable the "ambiguous expansion of macro" warning.Īlso update "test/Modules/macros.c" to test modified semantics:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |