forked from OSchip/llvm-project
900f817591
r293123 started serializing diagnostic pragma state for modules. This makes the serialization work properly for implicit modules. An implicit module build (using Clang's internal build system) uses the same PCM file location for different `-Werror` levels. E.g., if a TU has `-Werror=format` and tries to load a PCM built without `-Werror=format`, a new PCM will be built in its place (and the new PCM should have the same signature, since r297655). In the other direction, if a TU does not have `-Werror=format` and tries to load a PCM built with `-Werror=format`, it should "just work". The idea is to evolve the PCM toward the strictest -Werror flags that anyone tries. r293123 started serializing the diagnostic pragma state for each PCM. Since this encodes the -Werror settings at module-build time, it breaks the implicit build model. This commit filters the diagnostic state in order to simulate the current compilation's diagnostic settings. Firstly, it ignores the module's serialized first diagnostic state, replacing it with the state from this compilation's command-line. Secondly, if a pragma warning was upgraded to error/fatal when generating the PCM (e.g., due to `-Werror` on the command-line), it checks whether it should still be upgraded in its current context. llvm-svn: 300025 |
||
---|---|---|
.. | ||
Attributes.cpp | ||
Builtins.cpp | ||
CMakeLists.txt | ||
CharInfo.cpp | ||
Cuda.cpp | ||
Diagnostic.cpp | ||
DiagnosticIDs.cpp | ||
DiagnosticOptions.cpp | ||
FileManager.cpp | ||
FileSystemStatCache.cpp | ||
IdentifierTable.cpp | ||
LangOptions.cpp | ||
MemoryBufferCache.cpp | ||
Module.cpp | ||
ObjCRuntime.cpp | ||
OpenMPKinds.cpp | ||
OperatorPrecedence.cpp | ||
SanitizerBlacklist.cpp | ||
Sanitizers.cpp | ||
SourceLocation.cpp | ||
SourceManager.cpp | ||
TargetInfo.cpp | ||
Targets.cpp | ||
TokenKinds.cpp | ||
Version.cpp | ||
VersionTuple.cpp | ||
VirtualFileSystem.cpp | ||
Warnings.cpp | ||
XRayLists.cpp |