summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] When checking the include guard for a header, check whether it'sRichard Smith2015-07-106-0/+15
| | | | | | | | | | visible in the module we're considering entering. Previously we assumed that if we knew the include guard for a modular header, we'd already parsed it, but that need not be the case if a header is present in the current module and one of its dependencies; the result of getting this wrong was that the current module's submodule for the header would end up empty. llvm-svn: 241953
* [modules] Fix "prefer own module over others" rule when selecting a module ↵Richard Smith2015-07-101-2/+2
| | | | | | for a header to work in the presence of module hierarchy. llvm-svn: 241936
* [modules] Fix merging support for forward-declared enums with fixed ↵Richard Smith2015-07-082-0/+8
| | | | | | underlying types. A visible declaration is enough to make the type complete, but not enough to make the definition visible. llvm-svn: 241743
* [modules] Fix crash when writing an update record for a redeclaration of an ↵Richard Smith2015-07-083-0/+6
| | | | | | empty namespace. llvm-svn: 241732
* [modules] When determining the visible module set during templateRichard Smith2015-07-084-0/+22
| | | | | | | instantiation, use the set of modules visible from the template definition, not from whichever declaration the specialization was instantiated from. llvm-svn: 241662
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-0810-5/+26
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. llvm-svn: 241653
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-0710-26/+5
| | | | | | failures. llvm-svn: 241642
* Update testcases that use precompiled headers to require a target afterAdrian Prantl2015-07-071-1/+1
| | | | | | r241620. llvm-svn: 241623
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-079-4/+25
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 llvm-svn: 241620
* Mark clang/test/Modules/signal.m as REQUIRES:crash-recovery.NAKAMURA Takumi2015-07-051-1/+1
| | | | llvm-svn: 241421
* [Modules] Be consistent about finding a module for framework headersBen Langmuir2015-07-028-0/+55
| | | | | | | | | | | | | | | | We use findModuleForHeader() in several places, but in header search we were not calling it when a framework module didn't show up with the expected name, which would then lead to unexpected non-modular includes. Now we will find the module unconditionally for frameworks. For regular frameworks, we use the spelling of the module name from the module map file, and for inferred ones we use the canonical directory name. In the future we might want to lock down framework modules sufficiently that these name mismatches cannot happen. rdar://problem/20465870 llvm-svn: 241258
* [modules] Merging support for specializations of a function template. This veryRichard Smith2015-07-012-0/+10
| | | | | | | rarely matters, but can affect whether two dependent types are canonically equivalent. llvm-svn: 241207
* [modules] Don't make out-of-line member specializations of an instantiatedRichard Smith2015-07-012-11/+20
| | | | | | | class template specialization visible just because the class template specialization's definition is visible. llvm-svn: 241182
* [modules] Skip trailing attributes when skipping a class definition during ↵Richard Smith2015-07-011-0/+4
| | | | | | parse-merging. llvm-svn: 241180
* [modules] Don't require the 'inline' specifier when merging an inline function;Richard Smith2015-07-011-0/+6
| | | | | | any source of the inline nature is sufficient. llvm-svn: 241146
* [modules] Before checking whether the controlling macro of a header is defined,Richard Smith2015-07-015-0/+13
| | | | | | | | | | | update the identifier in case we've imported a definition of the macro (and thus the contents of the header) from a module. Also fold ExternalIdentifierLookup into ExternalPreprocessorSource; it no longer makes sense to keep these separate now that the only user of the former also needs the latter. llvm-svn: 241137
* [modules] Make sure macros get made visible in the top-level file if we've gotRichard Smith2015-06-303-0/+20
| | | | | | | local submodule visibility enabled; that top-level file might not actually be the module includes buffer if use of prebuilt modules is disabled. llvm-svn: 241120
* Update testcases: DICompileUnits are now created distinct by DIBuilder.Adrian Prantl2015-06-301-1/+1
| | | | llvm-svn: 241098
* Relax this test so it also works on platforms that use characters otherAdrian Prantl2015-06-301-1/+1
| | | | | | than forward slashes as path separators. llvm-svn: 241090
* Debug Info: Emit debug info for @import declarations.Adrian Prantl2015-06-303-0/+13
| | | | | | | | | This allows a module-aware debugger such as LLDB to import the currently visible modules before dropping into the expression evaluator. rdar://problem/20965932 llvm-svn: 241084
* Fix a couple of tests in clang/test to match "x86_thiscallcc" introduced in ↵NAKAMURA Takumi2015-06-301-1/+1
| | | | | | r240971. llvm-svn: 241047
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-293-8/+8
| | | | | | | | | | | | | cases Several tests wouldn't pass when executed on an armv7a_pc_linux triple due to the non-default arm_aapcs calling convention produced on the function definitions in the IR output. Account for this with the application of a little regex. Patch by Ying Yi. llvm-svn: 240971
* [Modules] Test lock file removed on signalBen Langmuir2015-06-293-0/+15
| | | | | | | | For r240967. rdar://problem/21512307 llvm-svn: 240968
* [modules] Properly merge visibility of class definitions that got merged whileRichard Smith2015-06-255-5/+19
| | | | | | parsing then merged again when the module was loaded. llvm-svn: 240700
* [Modules] Consider -fmodule-feature in module hash and when loadingBen Langmuir2015-06-232-1/+17
| | | | | | | Any extra features from -fmodule-feature are part of the module hash and need to get validated on load. Also print them with -module-file-info. llvm-svn: 240433
* Write output file to temp directory. The tests shouldn't assume thatDaniel Jasper2015-06-231-2/+2
| | | | | | they can write to the current working directory. llvm-svn: 240388
* Tweak clang/test/Modules/modules-with-same-name.m to run with GnuWin32's ↵NAKAMURA Takumi2015-06-231-3/+3
| | | | | | | | | find.exe on newer version of Windows. It seems "*.pcm" would be expanded with current directory by NTOS 6.x's msvcrt. GnuWin32 utils are affected. To avoid the issue, put an expression that msvcrt's glob won't match, like "*.pc[m]". llvm-svn: 240387
* [modules] When building a module, if there are multiple matches for a headerRichard Smith2015-06-225-0/+9
| | | | | | | file in the loaded module maps and one of them is from the current module, that's the right match. llvm-svn: 240350
* [modules] Add a flag to disable the feature that permits conflicting ↵Richard Smith2015-06-221-1/+6
| | | | | | | | | | | | redefinitions of internal-linkage symbols that are not visible. Such conflicts are an accident waiting to happen, and this feature conflicts with the desire to include existing headers into multiple modules and merge the results. (In an ideal world, it should not be possible to export internal linkage symbols from a module, but sadly the glibc and libstdc++ headers provide 'static inline' functions in a few cases.) llvm-svn: 240335
* [modules] When determining whether a definition of a class is visible, check ↵Richard Smith2015-06-206-0/+27
| | | | | | all modules even if we've already found a definition that's not visible. llvm-svn: 240204
* [modules] Merging support for enums with a local definition prior to the firstRichard Smith2015-06-181-0/+11
| | | | | | imported definition. llvm-svn: 240068
* [modules] Ensure that if we merge the definitions of two enumerations, thatRichard Smith2015-06-171-0/+9
| | | | | | making either of them visible makes the merged definition visible. llvm-svn: 239969
* [modules] Fix typo in default argument merging.Richard Smith2015-06-174-0/+6
| | | | llvm-svn: 239954
* [modules] If we merge a template, also track that its parameters are merged soRichard Smith2015-06-171-4/+3
| | | | | | that we know when its default arguments should be visible. llvm-svn: 239936
* [modules] Improve diagnostic for a template-id that's invalid because a defaultRichard Smith2015-06-172-6/+16
| | | | | | argument is not visible. llvm-svn: 239934
* [modules] Fix merging of default template arguments onto friend templates.Richard Smith2015-06-162-0/+12
| | | | | | | | | Previously we'd complain about redefinition of default arguments when we instantiated a class with a friend template that inherits its default argument, because we propagate the default template arguemnt onto the friend when we reload the AST. llvm-svn: 239857
* [Hexagon] unused-local-typedef warning test is passing.Colin LeMahieu2015-06-161-1/+0
| | | | llvm-svn: 239832
* [modules] Simplify -cc1 interface for enabling implicit module maps.Richard Smith2015-06-16170-541/+541
| | | | | | | | | | | | | We used to have a flag to enable module maps, and two more flags to enable implicit module maps. This is all redundant; we don't need any flag for enabling module maps in the abstract, and we don't usually have -fno- flags for -cc1. We now have just a single flag, -fimplicit-module-maps, that enables implicitly searching the file system for module map files and loading them. The driver interface is unchanged for now. We should probably rename -fmodule-maps to -fimplicit-module-maps at some point. llvm-svn: 239789
* [modules] Re-enable accidentally-disabled test.Richard Smith2015-06-151-6/+6
| | | | llvm-svn: 239783
* Fix submodule test to pass on content addressable filesystems where inodes ↵Reid Kleckner2015-06-152-0/+2
| | | | | | would collide llvm-svn: 239765
* [modules] Better support for redefinitions of an entity from the same module.Richard Smith2015-06-155-10/+15
| | | | | | | Support this across module save/reload and extend the 'missing import' diagnostics with a list of providing modules. llvm-svn: 239750
* [modules] Apply name visibility rules to names found by ADL.Richard Smith2015-06-122-2/+8
| | | | llvm-svn: 239578
* [modules] Fix crash with multiple levels of default template argument merging.Richard Smith2015-06-112-0/+7
| | | | llvm-svn: 239575
* [modules] Fix assert/crash when parsing and merging a definition of a class ↵Richard Smith2015-06-111-3/+3
| | | | | | with a base-specifier inside a namespace. llvm-svn: 239569
* [modules] Fix a few places where merging wasn't performed if modules was ↵Richard Smith2015-06-114-0/+25
| | | | | | disabled but local module visibilty was enabled. llvm-svn: 239504
* [modules] Don't allow use of non-visible (inherited) default template arguments.Richard Smith2015-06-102-2/+6
| | | | llvm-svn: 239487
* [modules] Track all default template arguments for a given parameter acrossRichard Smith2015-06-104-1/+13
| | | | | | | modules, and allow use of a default template argument if any of the parameters providing it is visible. llvm-svn: 239485
* Revert accidentally-committed test change from r239447.Richard Smith2015-06-103-12/+1
| | | | llvm-svn: 239452
* Refactor storage of default template arguments.Richard Smith2015-06-103-1/+12
| | | | | | | This is just a preparatory step towards fixing visibility for default template arguments in modules builds. llvm-svn: 239447
* [modules] Fix some visibility issues with default template arguments.Richard Smith2015-06-094-0/+27
| | | | | | | | | | | | | | | | | | | There are still problems here, but this is a better starting point. The main part of the change is: when doing a lookup that would accept visible or hidden declarations, prefer to produce the latest visible declaration if there are any visible declarations, rather than always producing the latest declaration. Thus, when we inherit default arguments (and other properties) from a previous declaration, we inherit them from the previous visible declaration; if the previous declaration is hidden, we already suppress inheritance of default arguments. There are a couple of other changes here that fix latent bugs exposed by this change. llvm-svn: 239371
OpenPOWER on IntegriCloud