forked from OSchip/llvm-project
Move diagnostics from Parse to Sema to remove Sema's dependency on ParserDiagnostic.h diagnostics.
llvm-svn: 253143
This commit is contained in:
parent
7d2f94319f
commit
abb83aed5c
|
@ -51,14 +51,6 @@ def warn_extra_semi_after_mem_fn_def : Warning<
|
|||
"extra ';' after member function definition">,
|
||||
InGroup<ExtraSemi>, DefaultIgnore;
|
||||
|
||||
def ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">,
|
||||
InGroup<DuplicateDeclSpecifier>;
|
||||
def warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">,
|
||||
InGroup<DuplicateDeclSpecifier>;
|
||||
def ext_plain_complex : ExtWarn<
|
||||
"plain '_Complex' requires a type specifier; assuming '_Complex double'">;
|
||||
def ext_integer_complex : Extension<
|
||||
"complex integer types are a GNU extension">, InGroup<GNUComplexInteger>;
|
||||
def ext_thread_before : Extension<"'__thread' before '%0'">;
|
||||
def ext_keyword_as_ident : ExtWarn<
|
||||
"keyword '%0' will be made available as an identifier "
|
||||
|
@ -70,11 +62,6 @@ def ext_nullability : Extension<
|
|||
InGroup<DiagGroup<"nullability-extension">>;
|
||||
|
||||
def error_empty_enum : Error<"use of empty enum">;
|
||||
def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">;
|
||||
def err_invalid_width_spec : Error<
|
||||
"'%select{|short|long|long long}0 %1' is invalid">;
|
||||
def err_invalid_complex_spec : Error<"'_Complex %0' is invalid">;
|
||||
def err_friend_decl_spec : Error<"'%0' is invalid in friend declarations">;
|
||||
|
||||
def ext_ident_list_in_param : Extension<
|
||||
"type-less parameter names in function declaration">;
|
||||
|
@ -285,11 +272,6 @@ def err_init_list_bin_op : Error<"initializer list cannot be used on the "
|
|||
def warn_cxx98_compat_trailing_return_type : Warning<
|
||||
"trailing return types are incompatible with C++98">,
|
||||
InGroup<CXX98Compat>, DefaultIgnore;
|
||||
def ext_auto_type_specifier : ExtWarn<
|
||||
"'auto' type specifier is a C++11 extension">, InGroup<CXX11>;
|
||||
def warn_auto_storage_class : Warning<
|
||||
"'auto' storage class specifier is redundant and incompatible with C++11">,
|
||||
InGroup<CXX11Compat>, DefaultIgnore;
|
||||
def ext_auto_storage_class : ExtWarn<
|
||||
"'auto' storage class specifier is not permitted in C++11, and will not "
|
||||
"be supported in future releases">, InGroup<DiagGroup<"auto-storage-class">>;
|
||||
|
@ -329,9 +311,6 @@ def err_unspecified_vla_size_with_static : Error<
|
|||
"'static' may not be used with an unspecified variable length array size">;
|
||||
def err_unspecified_size_with_static : Error<
|
||||
"'static' may not be used without an array size">;
|
||||
def warn_deprecated_register : Warning<
|
||||
"'register' storage class specifier is deprecated">,
|
||||
InGroup<DeprecatedRegister>;
|
||||
def err_expected_parentheses_around_typename : Error<
|
||||
"expected parentheses around type name in %0 expression">;
|
||||
|
||||
|
@ -350,35 +329,8 @@ def err_typename_invalid_constexpr : Error<
|
|||
def err_typename_identifiers_only : Error<
|
||||
"typename is allowed for identifiers only">;
|
||||
|
||||
def err_invalid_decl_spec_combination : Error<
|
||||
"cannot combine with previous '%0' declaration specifier">;
|
||||
def err_invalid_vector_decl_spec_combination : Error<
|
||||
"cannot combine with previous '%0' declaration specifier. "
|
||||
"'__vector' must be first">;
|
||||
def err_invalid_pixel_decl_spec_combination : Error<
|
||||
"'__pixel' must be preceded by '__vector'. "
|
||||
"'%0' declaration specifier not allowed here">;
|
||||
def err_invalid_vector_bool_decl_spec : Error<
|
||||
"cannot use '%0' with '__vector bool'">;
|
||||
def err_invalid_vector_long_decl_spec : Error<
|
||||
"cannot use 'long' with '__vector'">;
|
||||
def err_invalid_vector_float_decl_spec : Error<
|
||||
"cannot use 'float' with '__vector'">;
|
||||
def err_invalid_vector_double_decl_spec : Error <
|
||||
"use of 'double' with '__vector' requires VSX support to be enabled "
|
||||
"(available on POWER7 or later)">;
|
||||
def err_invalid_vector_long_long_decl_spec : Error <
|
||||
"use of 'long long' with '__vector bool' requires VSX support (available on "
|
||||
"POWER7 or later) or extended Altivec support (available on POWER8 or later) "
|
||||
"to be enabled">;
|
||||
def err_invalid_vector_long_double_decl_spec : Error<
|
||||
"cannot use 'long double' with '__vector'">;
|
||||
def warn_vector_long_decl_spec_combination : Warning<
|
||||
"Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
|
||||
def err_friend_invalid_in_context : Error<
|
||||
"'friend' used outside of class">;
|
||||
def err_use_of_tag_name_without_tag : Error<
|
||||
"must use '%1' tag to refer to type %0%select{| in this scope}2">;
|
||||
def err_templated_using_directive_declaration : Error<
|
||||
"cannot template a using %select{directive|declaration}0">;
|
||||
def err_unexpected_colon_in_nested_name_spec : Error<
|
||||
|
@ -950,10 +902,6 @@ def err_pragma_optimize_invalid_argument : Error<
|
|||
def err_pragma_optimize_extra_argument : Error<
|
||||
"unexpected extra argument '%0' to '#pragma clang optimize'">;
|
||||
|
||||
// OpenCL Section 6.8.g
|
||||
def err_opencl_unknown_type_specifier : Error<
|
||||
"OpenCL does not support the '%0' %select{type qualifier|storage class specifier}1">;
|
||||
|
||||
// OpenCL EXTENSION pragma (OpenCL 1.1 [9.1])
|
||||
def warn_pragma_expected_colon : Warning<
|
||||
"missing ':' after %0 - ignoring">, InGroup<IgnoredPragmas>;
|
||||
|
|
|
@ -188,6 +188,60 @@ def ext_flexible_array_init : Extension<
|
|||
"flexible array initialization is a GNU extension">, InGroup<GNUFlexibleArrayInitializer>;
|
||||
|
||||
// Declarations.
|
||||
def ext_duplicate_declspec : ExtWarn<"duplicate '%0' declaration specifier">,
|
||||
InGroup<DuplicateDeclSpecifier>;
|
||||
def warn_duplicate_declspec : Warning<"duplicate '%0' declaration specifier">,
|
||||
InGroup<DuplicateDeclSpecifier>;
|
||||
def ext_plain_complex : ExtWarn<
|
||||
"plain '_Complex' requires a type specifier; assuming '_Complex double'">;
|
||||
def ext_integer_complex : Extension<
|
||||
"complex integer types are a GNU extension">, InGroup<GNUComplexInteger>;
|
||||
|
||||
def err_invalid_sign_spec : Error<"'%0' cannot be signed or unsigned">;
|
||||
def err_invalid_width_spec : Error<
|
||||
"'%select{|short|long|long long}0 %1' is invalid">;
|
||||
def err_invalid_complex_spec : Error<"'_Complex %0' is invalid">;
|
||||
def err_friend_decl_spec : Error<"'%0' is invalid in friend declarations">;
|
||||
|
||||
def ext_auto_type_specifier : ExtWarn<
|
||||
"'auto' type specifier is a C++11 extension">, InGroup<CXX11>;
|
||||
def warn_auto_storage_class : Warning<
|
||||
"'auto' storage class specifier is redundant and incompatible with C++11">,
|
||||
InGroup<CXX11Compat>, DefaultIgnore;
|
||||
|
||||
def warn_deprecated_register : Warning<
|
||||
"'register' storage class specifier is deprecated">,
|
||||
InGroup<DeprecatedRegister>;
|
||||
|
||||
def err_invalid_decl_spec_combination : Error<
|
||||
"cannot combine with previous '%0' declaration specifier">;
|
||||
def err_invalid_vector_decl_spec_combination : Error<
|
||||
"cannot combine with previous '%0' declaration specifier. "
|
||||
"'__vector' must be first">;
|
||||
def err_invalid_pixel_decl_spec_combination : Error<
|
||||
"'__pixel' must be preceded by '__vector'. "
|
||||
"'%0' declaration specifier not allowed here">;
|
||||
def err_invalid_vector_bool_decl_spec : Error<
|
||||
"cannot use '%0' with '__vector bool'">;
|
||||
def err_invalid_vector_long_decl_spec : Error<
|
||||
"cannot use 'long' with '__vector'">;
|
||||
def err_invalid_vector_float_decl_spec : Error<
|
||||
"cannot use 'float' with '__vector'">;
|
||||
def err_invalid_vector_double_decl_spec : Error <
|
||||
"use of 'double' with '__vector' requires VSX support to be enabled "
|
||||
"(available on POWER7 or later)">;
|
||||
def err_invalid_vector_long_long_decl_spec : Error <
|
||||
"use of 'long long' with '__vector bool' requires VSX support (available on "
|
||||
"POWER7 or later) or extended Altivec support (available on POWER8 or later) "
|
||||
"to be enabled">;
|
||||
def err_invalid_vector_long_double_decl_spec : Error<
|
||||
"cannot use 'long double' with '__vector'">;
|
||||
def warn_vector_long_decl_spec_combination : Warning<
|
||||
"Use of 'long' with '__vector' is deprecated">, InGroup<Deprecated>;
|
||||
|
||||
def err_use_of_tag_name_without_tag : Error<
|
||||
"must use '%1' tag to refer to type %0%select{| in this scope}2">;
|
||||
|
||||
def err_redeclaration_different_type : Error<
|
||||
"redeclaration of %0 with a different type%diff{: $ vs $|}1,2">;
|
||||
def err_bad_variable_name : Error<
|
||||
|
@ -7565,6 +7619,11 @@ def err_atomic_init_constant : Error<
|
|||
" in the declaration statement in the program scope">;
|
||||
def err_opencl_implicit_vector_conversion : Error<
|
||||
"implicit conversions between vector types (%0 and %1) are not permitted">;
|
||||
|
||||
// OpenCL Section 6.8.g
|
||||
def err_opencl_unknown_type_specifier : Error<
|
||||
"OpenCL does not support the '%0' %select{type qualifier|storage class specifier}1">;
|
||||
|
||||
} // end of sema category
|
||||
|
||||
let CategoryName = "OpenMP Issue" in {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "clang/Sema/ParsedTemplate.h"
|
||||
#include "clang/Sema/PrettyDeclStackTrace.h"
|
||||
#include "clang/Sema/Scope.h"
|
||||
#include "clang/Sema/SemaDiagnostic.h"
|
||||
#include "llvm/ADT/SmallSet.h"
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
#include "llvm/ADT/StringSwitch.h"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "clang/Basic/LangOptions.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "clang/Lex/Preprocessor.h"
|
||||
#include "clang/Parse/ParseDiagnostic.h" // FIXME: remove this back-dependency!
|
||||
#include "clang/Sema/LocInfoType.h"
|
||||
#include "clang/Sema/ParsedTemplate.h"
|
||||
#include "clang/Sema/Sema.h"
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
#include "clang/Lex/Lexer.h" // TODO: Extract static functions to fix layering.
|
||||
#include "clang/Lex/ModuleLoader.h" // TODO: Sema shouldn't depend on Lex
|
||||
#include "clang/Lex/Preprocessor.h" // Included for isCodeCompletionEnabled()
|
||||
#include "clang/Parse/ParseDiagnostic.h"
|
||||
#include "clang/Sema/CXXFieldCollector.h"
|
||||
#include "clang/Sema/DeclSpec.h"
|
||||
#include "clang/Sema/DelayedDiagnostic.h"
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "clang/Basic/PartialDiagnostic.h"
|
||||
#include "clang/Basic/TargetInfo.h"
|
||||
#include "clang/Lex/Preprocessor.h"
|
||||
#include "clang/Parse/ParseDiagnostic.h"
|
||||
#include "clang/Sema/DeclSpec.h"
|
||||
#include "clang/Sema/DelayedDiagnostic.h"
|
||||
#include "clang/Sema/Lookup.h"
|
||||
|
|
Loading…
Reference in New Issue