[test] Expand a bit on the test case from r231251. NFC.llvm-svn: 231346
[Modules] Fix crash in Preprocessor::getLastMacroWithSpelling().Macro names that got undefined inside a module may not have their MacroInfo set.llvm-svn: 231251
[ASTUnit] Fix crash when trying to load a module file via ASTUnit::LoadFromASTFile.rdar://19997358llvm-svn: 231060
Have the parser initialize Sema before it consumes the firsttoken. This is important because the first token could actually beafter an #include that triggers a module import, which might useeither
Have the parser initialize Sema before it consumes the firsttoken. This is important because the first token could actually beafter an #include that triggers a module import, which might useeither Sema or the AST consumer before it would have been initialized.llvm-svn: 167423
show more ...
Allow -verify directives to be filtered by preprocessing.This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler,which then only reads the -verify directives that are actually in
Allow -verify directives to be filtered by preprocessing.This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler,which then only reads the -verify directives that are actually in liveblocks of code. It also makes it simpler to handle -verify directives thatappear in header files, though we still have to manually reparse some filesdepending on how they are generated.This requires some test changes. In particular, all PCH tests now have their-verify directives outside the "header" portion of the file, using the @linesyntax added in r159978. Other tests have been modified mostly to make itclear what is being tested, and to prevent polluting the expected output withthe directives themselves.Patch by Andy Gibbs! (with slight modifications)The new Frontend/verify-* tests exercise the functionality of this commit,as well as r159978, r159979, and r160053 (Andy's other -verify enhancements).llvm-svn: 160068
Re-uglify #public and #private to #__public_macro and #__private_macro.llvm-svn: 147469
Under -fmodules, accept #public <macroname> and #private <macroname>to make a macro public (the default for headers) or private,respectively.llvm-svn: 147455
When building a module with an umbrella header, warn about any headersfound within that umbrella directory that were not actually includedby the umbrella header. They should either be referenced in
When building a module with an umbrella header, warn about any headersfound within that umbrella directory that were not actually includedby the umbrella header. They should either be referenced in the modulemap or included by the umbrella header.llvm-svn: 147207
Detect when mapping a #include/#import over to a submodule ends uphitting a submodule that was never actually created, e.g., becausethat header wasn't parsed. In such cases, complain (because them
Detect when mapping a #include/#import over to a submodule ends uphitting a submodule that was never actually created, e.g., becausethat header wasn't parsed. In such cases, complain (because themodule's umbrella headers don't cover everything) and fall back toincluding the header.Later, we'll add a warning at module-build time to catch all suchcases. However, this fallback is important to eliminate assertions inthe ASTWriter when this happens.llvm-svn: 146933
Keep track of import dependencies between submodules within the modulethat's currently being built. This is important for supportingtransitive dependencies ("export *" in the module map) completely
Keep track of import dependencies between submodules within the modulethat's currently being built. This is important for supportingtransitive dependencies ("export *" in the module map) completely.llvm-svn: 146156
Implement inferred submodules support, which (when requested)implicitly generates submodules corresponding to the headers that fallwithin a module.llvm-svn: 145887
For modules, all macros that aren't include guards are implicitlypublic. Add a __private_macro__ directive to hide a macro, similar tothe __module_private__ declaration specifier.llvm-svn: 142188
Add an experimental flag -fauto-module-import that automatically turns#include or #import direcctives of framework headers into moduleimports of the corresponding framework module.llvm-svn: 139860
Teach LangOptions::resetNonModularOptions to actually do what it says it doesllvm-svn: 139791
When building a module on-demand, clear out the "non-modular" languageand preprocessor options (such as macro definitions) first.llvm-svn: 139638
When an import statement fails to find a module in the module cache,but there is a corresponding umbrella header in a framework, build themodule on-the-fly so it can be immediately loaded at the im
When an import statement fails to find a module in the module cache,but there is a corresponding umbrella header in a framework, build themodule on-the-fly so it can be immediately loaded at the importstatement. This is very much proof-of-concept code, with details to befleshed out over time.llvm-svn: 139558