summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/DiagnosticSerializationKinds.td
Commit message (Collapse)AuthorAgeFilesLines
...
* [modules] Start moving the module visibility information off the Module itself.Richard Smith2015-05-011-3/+0
| | | | | | | | It has no place there; it's not a property of the Module, and it makes restoring the visibility set when we leave a submodule more difficult. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236300 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Mangle the IsSystem bit into the .pcm file name"Ben Langmuir2015-02-191-3/+0
| | | | | | | | While I investigate some possible problems with this patch. This reverts commit r228966 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229910 91177308-0d34-0410-b5e6-96231b3b80d8
* [PCH/Modules] Check that the specific module cache path the PCH was built ↵Argyrios Kyrtzidis2015-02-191-0/+2
| | | | | | | | | | | | with, is the same as the one in the current compiler invocation. If they differ reject the PCH. This protects against the badness occurring from getting modules loaded from different module caches (see crashes). rdar://19889860 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229909 91177308-0d34-0410-b5e6-96231b3b80d8
* Mangle the IsSystem bit into the .pcm file nameBen Langmuir2015-02-121-0/+3
| | | | | | | | | When mangling the module map path into a .pcm file name, also mangle the IsSystem bit, which can also depend on the header search paths. For example, the user may change from -I to -isystem. This can affect diagnostics in the importing TU. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228966 91177308-0d34-0410-b5e6-96231b3b80d8
* [modules] If we import a module, and we've seen a module map that describes theRichard Smith2014-12-061-0/+3
| | | | | | | | | | module, use the path from the module map file in preference to the path from the .pcm file when resolving relative paths in the .pcm file. This allows diagnostics (and .d output) to give relative paths if the module was found via a relative path. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223577 91177308-0d34-0410-b5e6-96231b3b80d8
* [modules] Initial support for explicitly loading .pcm files.Richard Smith2014-10-221-1/+3
| | | | | | | | | | | | | | | | Implicit module builds are not well-suited to a lot of build systems. In particular, they fare badly in distributed build systems, and they lead to build artifacts that are not tracked as part of the usual dependency management process. This change allows explicitly-built module files (which are already supported through the -emit-module flag) to be explicitly loaded into a build, allowing build systems to opt to manage module builds and dependencies themselves. This is only the first step in supporting such configurations, and it should be considered experimental and subject to change or removal for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220359 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify all the module map files for a pcm are the same on loadBen Langmuir2014-08-121-0/+3
| | | | | | | | | | We already verified the primary module map file (either the one that defines the top-level module, or the one that allows inferring it if it is an inferred framework module). Now we also verify any other module map files that define submodules, such as when there is a module.private.modulemap file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215455 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r207477 and r207479 without cyclic dependencyBen Langmuir2014-04-291-0/+2
| | | | | | | | Fixed by moving ProcessWarningOptions from Frontend into Basic. All of the dependencies for ProcessWarningOptions were already in Basic, so this was a small change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207549 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r207477 (and r207479), "Check -Werror options during module validation"NAKAMURA Takumi2014-04-291-2/+0
| | | | | | It tried to introduce cyclic dependencies. Serialization shouldn't depend on Frontend, since Frontend depends on Serialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207497 91177308-0d34-0410-b5e6-96231b3b80d8
* Check -Werror options during module validationBen Langmuir2014-04-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch checks whether the diagnostic options that could lead to errors (principally -Werror) are consistent between when a module was built and when it is loaded. If there are new -Werror flags, then the module is rebuilt. In order to canonicalize the options we do this check at the level of the constructed DiagnosticsEngine, which contains the final set of diag to diagnostic level mappings. Currently we only rebuild with the new diagnostic options, but we intend to refine this in the future to include the union of the new and old flags, since we know the old ones did not cause errors. System modules are only rebuilt when -Wsystem-headers is enabled. One oddity is that unlike checking language options, we don’t perform this diagnostic option checking when loading from a precompiled header. The reason for this is that the compiler cannot rebuild the PCH, so anything that requires it to be rebuilt effectively leaks into the build system. And in this case, that would mean the build system understanding the complex relationship between diagnostic options and the underlying diagnostic mappings, which is unreasonable. Skipping the check is safe, because these options do not affect the generated AST. You simply won’t get new build errors due to changed -Werror options automatically, which is also true for non-module cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207477 91177308-0d34-0410-b5e6-96231b3b80d8
* When a module completes the definition of a class template specialization ↵Richard Smith2014-04-191-0/+7
| | | | | | imported from another module, emit an update record, rather than using the broken decl rewriting mechanism. If multiple modules do this, merge the definitions together, much as we would if they were separate declarations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206680 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow multiple modules with the same name to coexist in the module cacheBen Langmuir2014-04-141-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To differentiate between two modules with the same name, we will consider the path the module map file that they are defined by* part of the ‘key’ for looking up the precompiled module (pcm file). Specifically, this patch renames the precompiled module (pcm) files from cache-path/<module hash>/Foo.pcm to cache-path/<module hash>/Foo-<hash of module map path>.pcm In addition, I’ve taught the ASTReader to re-resolve the names of imported modules during module loading so that if the header search context changes between when a module was originally built and when it is loaded we can rebuild it if necessary. For example, if module A imports module B first time: clang -I /path/to/A -I /path/to/B ... second time: clang -I /path/to/A -I /different/path/to/B ... will now rebuild A as expected. * in the case of inferred modules, we use the module map file that allowed the inference, not the __inferred_module.map file, since the inferred file path is the same for every inferred module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206201 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: report error code for bad PCH filesDmitri Gribenko2014-02-121-1/+4
| | | | | | | | | | | | | | | | | | | | This commit improves libclang to report the error condition when CXTranslationUnit can not be created because of a stale PCH file. This allows the caller, for example, to rebuild the PCH file and retry the request. There two are APIs in libclang that return a CXTranslationUnit and don't support reporting detailed errors (the only error condition is a NULL result). For these APIs, a second, superior, version is introduced -- clang_createTranslationUnit2 and clang_parseTranslationUnit2. These functions return a CXTranslationUnit indirectly and also return an error code. Old functions are still supported and are nothing more than convenience wrappers that ignore extended error codes. As a cleanup, this commit also categorizes some libclang errors in the functions I had to modify anyway. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201249 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename some PCH-related errors to have 'err_' as their prefixDmitri Gribenko2014-02-111-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201157 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve the error message when a PCH dependency is modifiedBen Langmuir2014-01-171-0/+2
| | | | | | | | | | Show the top-level pch file as the culprit, rather than the immediate dependency when a pch file imports a pcm from a module. To clarify the relationship, the pch import stack is printed as notes. The old behaviour was misleading when a pch imported a pcm (from a module), since removing the pcm would not fix the problem, whereas rebuilding the pch would. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199446 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic ODR checking for C++ modules:Richard Smith2013-10-181-0/+9
| | | | | | | | | | | | | | | | If we have multiple definitions of the same entity from different modules, we nominate the first definition which we see as being the canonical definition. If we load a declaration from a different definition and we can't find a corresponding declaration in the canonical definition, issue a diagnostic. This is insufficient to prevent things from going horribly wrong in all cases -- we might be in the middle of emitting IR for a function when we trigger some deserialization and discover that it refers to an incoherent piece of the AST, by which point it's probably too late to bail out -- but we'll at least produce a diagnostic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192950 91177308-0d34-0410-b5e6-96231b3b80d8
* [Modules] When things go horribly wrong when reading a module, point at the ↵Douglas Gregor2013-05-101-1/+3
| | | | | | | | | | | module cache. Sometimes people hack on their system headers. In such cases, they'll need to delete their module cache, but may not know where it is. Add a note to show them where it is. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181638 91177308-0d34-0410-b5e6-96231b3b80d8
* [PCH/modules] Require the preprocessing record option to match the used PCH, ↵Argyrios Kyrtzidis2013-04-261-0/+4
| | | | | | | | | if modules are enabled. The preprocessing record becomes important when modules are enabled, since it is used to calculate the module cache hash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180635 91177308-0d34-0410-b5e6-96231b3b80d8
* <rdar://problem/12368093> Extend module maps with a 'conflict' declaration, ↵Douglas Gregor2013-03-201-1/+4
| | | | | | and warn when a newly-imported module conflicts with an already-imported module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177577 91177308-0d34-0410-b5e6-96231b3b80d8
* [PCH] When complaining that a header from the PCH was modified, also mentionArgyrios Kyrtzidis2013-03-081-1/+1
| | | | | | the filename of the PCH file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176717 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune unused diagnostics.Benjamin Kramer2013-01-201-2/+0
| | | | | | Courtesy of utils/find-unused-diagnostics.sh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172988 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused diagnosticsDouglas Gregor2012-11-161-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168135 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the old predefines-buffer diffing code completely. It's beenDouglas Gregor2012-10-251-16/+0
| | | | | | | | replaced by the more efficient, cleaner preprocessor-option version that occurs earlier in PCH validation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166654 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the PCH validator to check the preprocessor options, especiallyDouglas Gregor2012-10-241-0/+19
| | | | | | | | | | | | | | | | the macros that are #define'd or #undef'd on the command line. This checking happens much earlier than the current macro-definition checking and is far cleaner, because it does a direct comparison rather than a diff of the predefines buffers. Moreover, it allows us to use the result of this check to skip over PCH files within a directory that have non-matching -D's or -U's on the command line. Finally, it improves the diagnostics a bit for mismatches, fixing <rdar://problem/8612222>. The old predefines-buffer diff'ing will go away in a subsequent commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166641 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-161-3/+7
| | | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166072 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the PCH file name to the message about not being able to read the PCH.Kaelyn Uhrain2012-06-201-1/+1
| | | | | | | | Also add a couple of unit tests to check the invalid-PCH error messages to satisfy PR4568 and for the assertion (introduced in r149918 and fixed in r158769) that would cause clang to crash when given an empty PCH. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158772 91177308-0d34-0410-b5e6-96231b3b80d8
* [PCH] When validating that the files coming from PCH did not change, alsoArgyrios Kyrtzidis2012-05-031-0/+2
| | | | | | | | | | | validate that we didn't override the contents of any of such files. If this is detected, emit a diagnostic error and recover gracefully by using the contents of the original file that the PCH was built from. Part of rdar://11305263 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156107 91177308-0d34-0410-b5e6-96231b3b80d8
* [PCH] Mark a PCH file with a flag to indicate if the serialized AST hadArgyrios Kyrtzidis2012-03-071-0/+2
| | | | | | | | | | | | | | | | compiler errors or not. -Control whether ASTReader should reject such a PCH by a boolean flag at ASTReader's creation time. By default, such a PCH file will be rejected with an error when trying to load it. [libclang] Allow clang_saveTranslationUnit to create a PCH file even if compiler errors occurred. -Have libclang API calls accept a PCH that had compiler errors. The general idea is that we want libclang to stay functional even if a PCH had a compiler error. rdar://10976363. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152192 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate the serialization library's diagnostics from the frontend'sChandler Carruth2011-12-091-0/+58
diagnostics. Conflating them was highly confusing and makes it harder to establish a firm layering separation between these two libraries. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146207 91177308-0d34-0410-b5e6-96231b3b80d8