diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-03 15:20:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-03 15:20:48 +0000 |
commit | 551c698530debaae81139c7c76a29fb762793362 (patch) | |
tree | 547e0e59163c33f2142998714eb5f957e65d1a57 /include/clang/Basic | |
parent | 416ada0f75bab22b084a1776deb229cd4a669c4d (diff) |
Notes
Diffstat (limited to 'include/clang/Basic')
-rw-r--r-- | include/clang/Basic/DiagnosticLexKinds.td | 6 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 4 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticSerializationKinds.td | 12 | ||||
-rw-r--r-- | include/clang/Basic/Module.h | 10 | ||||
-rw-r--r-- | include/clang/Basic/Sanitizers.h | 10 |
5 files changed, 33 insertions, 9 deletions
diff --git a/include/clang/Basic/DiagnosticLexKinds.td b/include/clang/Basic/DiagnosticLexKinds.td index b393ce5f15453..447f06945660b 100644 --- a/include/clang/Basic/DiagnosticLexKinds.td +++ b/include/clang/Basic/DiagnosticLexKinds.td @@ -664,6 +664,12 @@ def warn_mmap_mismatched_top_level_private : Warning< InGroup<PrivateModule>; def note_mmap_rename_top_level_private_as_submodule : Note< "make '%0' a submodule of '%1' to ensure it can be found by name">; +def err_mmap_duplicate_header_attribute : Error< + "header attribute '%0' specified multiple times">; +def err_mmap_invalid_header_attribute_value : Error< + "expected integer literal as value for header attribute '%0'">; +def err_mmap_expected_header_attribute : Error< + "expected a header attribute name ('size' or 'mtime')">; def warn_auto_module_import : Warning< "treating #%select{include|import|include_next|__include_macros}0 as an " diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 4de4f47b8a5ac..a5a5c74afe696 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -4584,7 +4584,7 @@ def warn_missing_prototype : Warning< def note_declaration_not_a_prototype : Note< "this declaration is not a prototype; add 'void' to make it a prototype for a zero-parameter function">; def warn_strict_prototypes : Warning< - "this %select{function declaration is not|" + "this %select{function declaration is not|block declaration is not|" "old-style function definition is not preceded by}0 a prototype">, InGroup<DiagGroup<"strict-prototypes">>, DefaultIgnore; def warn_missing_variable_declarations : Warning< @@ -7268,7 +7268,7 @@ def err_invalid_conversion_between_vector_and_integer : Error< "invalid conversion between vector type %0 and integer type %1 " "of different size">; -def err_opencl_function_pointer_variable : Error< +def err_opencl_function_pointer : Error< "pointers to functions are not allowed">; def err_opencl_taking_function_address : Error< diff --git a/include/clang/Basic/DiagnosticSerializationKinds.td b/include/clang/Basic/DiagnosticSerializationKinds.td index 35e2f67e24b6d..f9e7b8fa9b567 100644 --- a/include/clang/Basic/DiagnosticSerializationKinds.td +++ b/include/clang/Basic/DiagnosticSerializationKinds.td @@ -174,10 +174,6 @@ def note_module_odr_violation_mismatch_decl_diff : Note<"but in '%0' found " "method %2 with %ordinal3 parameter of type %4%select{| decayed from %6}5|" "method %2 with %ordinal3 parameter named %4}1">; -def warn_module_uses_date_time : Warning< - "%select{precompiled header|module}0 uses __DATE__ or __TIME__">, - InGroup<DiagGroup<"pch-date-time">>; - def warn_duplicate_module_file_extension : Warning< "duplicate module file extension block name '%0'">, InGroup<ModuleFileExtension>; @@ -186,7 +182,15 @@ def warn_module_system_bit_conflict : Warning< "module file '%0' was validated as a system module and is now being imported " "as a non-system module; any difference in diagnostic options will be ignored">, InGroup<ModuleConflict>; +} // let CategoryName +let CategoryName = "AST Serialization Issue" in { +def warn_module_uses_date_time : Warning< + "%select{precompiled header|module}0 uses __DATE__ or __TIME__">, + InGroup<DiagGroup<"pch-date-time">>; +def err_module_no_size_mtime_for_header : Error< + "cannot emit module %0: %select{size|mtime}1 must be explicitly specified " + "for missing header file \"%2\"">; } // let CategoryName } // let Component diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h index 326d84eeb6c28..1e52b29367b29 100644 --- a/include/clang/Basic/Module.h +++ b/include/clang/Basic/Module.h @@ -154,11 +154,19 @@ public: /// \brief Stored information about a header directive that was found in the /// module map file but has not been resolved to a file. struct UnresolvedHeaderDirective { + HeaderKind Kind = HK_Normal; SourceLocation FileNameLoc; std::string FileName; - bool IsUmbrella; + bool IsUmbrella = false; + bool HasBuiltinHeader = false; + Optional<off_t> Size; + Optional<time_t> ModTime; }; + /// Headers that are mentioned in the module map file but that we have not + /// yet attempted to resolve to a file on the file system. + SmallVector<UnresolvedHeaderDirective, 1> UnresolvedHeaders; + /// \brief Headers that are mentioned in the module map file but could not be /// found on the file system. SmallVector<UnresolvedHeaderDirective, 1> MissingHeaders; diff --git a/include/clang/Basic/Sanitizers.h b/include/clang/Basic/Sanitizers.h index bfa8e516edd3a..5317720095e06 100644 --- a/include/clang/Basic/Sanitizers.h +++ b/include/clang/Basic/Sanitizers.h @@ -61,8 +61,8 @@ struct SanitizerSet { Mask = Value ? (Mask | K) : (Mask & ~K); } - /// \brief Disable all sanitizers. - void clear() { Mask = 0; } + /// Disable the sanitizers specified in \p K. + void clear(SanitizerMask K = SanitizerKind::All) { Mask &= ~K; } /// \brief Returns true if at least one sanitizer is enabled. bool empty() const { return Mask == 0; } @@ -79,6 +79,12 @@ SanitizerMask parseSanitizerValue(StringRef Value, bool AllowGroups); /// this group enables. SanitizerMask expandSanitizerGroups(SanitizerMask Kinds); +/// Return the sanitizers which do not affect preprocessing. +static inline SanitizerMask getPPTransparentSanitizers() { + return SanitizerKind::CFI | SanitizerKind::Integer | + SanitizerKind::Nullability | SanitizerKind::Undefined; +} + } // end namespace clang #endif |