summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
committerdim <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
commitbb9760db9b86e93a638ed430d0a14785f7ff9064 (patch)
treea59f5569ef36d00388c0428426abef26aa9105b6 /include/clang/Basic
parent3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (diff)
downloadFreeBSD-src-bb9760db9b86e93a638ed430d0a14785f7ff9064.zip
FreeBSD-src-bb9760db9b86e93a638ed430d0a14785f7ff9064.tar.gz
Vendor import of clang trunk r239412:
https://llvm.org/svn/llvm-project/cfe/trunk@239412
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticCommonKinds.td18
-rw-r--r--include/clang/Basic/DiagnosticGroups.td3
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td16
-rw-r--r--include/clang/Basic/TokenKinds.def13
4 files changed, 40 insertions, 10 deletions
diff --git a/include/clang/Basic/DiagnosticCommonKinds.td b/include/clang/Basic/DiagnosticCommonKinds.td
index afdd926..deb23f3 100644
--- a/include/clang/Basic/DiagnosticCommonKinds.td
+++ b/include/clang/Basic/DiagnosticCommonKinds.td
@@ -115,7 +115,23 @@ def err_integer_literal_too_large : Error<
def ext_integer_literal_too_large_for_signed : ExtWarn<
"integer literal is too large to be represented in a signed integer type, "
"interpreting as unsigned">,
- InGroup<DiagGroup<"implicitly-unsigned-literal">>;
+ InGroup<ImplicitlyUnsignedLiteral>;
+def warn_old_implicitly_unsigned_long : Warning<
+ "integer literal is too large to be represented in type 'long', "
+ "interpreting as 'unsigned long' per C89; this literal will "
+ "%select{have type 'long long'|be ill-formed}0 in C99 onwards">,
+ InGroup<C99Compat>;
+def warn_old_implicitly_unsigned_long_cxx : Warning<
+ "integer literal is too large to be represented in type 'long', "
+ "interpreting as 'unsigned long' per C++98; this literal will "
+ "%select{have type 'long long'|be ill-formed}0 in C++11 onwards">,
+ InGroup<CXX11Compat>;
+def ext_old_implicitly_unsigned_long_cxx : ExtWarn<
+ "integer literal is too large to be represented in type 'long' and is "
+ "subject to undefined behavior under C++98, interpreting as 'unsigned long'; "
+ "this literal will %select{have type 'long long'|be ill-formed}0 "
+ "in C++11 onwards">,
+ InGroup<CXX11Compat>;
// SEH
def err_seh_expected_handler : Error<
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index 61436ea..016c2e1 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -239,6 +239,7 @@ def MultiChar : DiagGroup<"multichar">;
def : DiagGroup<"nested-externs">;
def CXX11LongLong : DiagGroup<"c++11-long-long">;
def LongLong : DiagGroup<"long-long", [CXX11LongLong]>;
+def ImplicitlyUnsignedLiteral : DiagGroup<"implicitly-unsigned-literal">;
def MethodSignatures : DiagGroup<"method-signatures">;
def MismatchedParameterTypes : DiagGroup<"mismatched-parameter-types">;
def MismatchedReturnTypes : DiagGroup<"mismatched-return-types">;
@@ -264,6 +265,8 @@ def : DiagGroup<"overflow">;
def ForwardClassReceiver : DiagGroup<"receiver-forward-class">;
def MethodAccess : DiagGroup<"objc-method-access">;
def ObjCReceiver : DiagGroup<"receiver-expr">;
+// FIXME: Remove this when Xcode removes the warning setting.
+def : DiagGroup<"receiver-is-weak">;
def OperatorNewReturnsNull : DiagGroup<"new-returns-null">;
def OverlengthStrings : DiagGroup<"overlength-strings">;
def OverloadedVirtual : DiagGroup<"overloaded-virtual">;
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 9ccd5ad..be1911e 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -908,10 +908,6 @@ def warn_dealloc_in_category : Warning<
InGroup<DeallocInCategory>;
def err_gc_weak_property_strong_type : Error<
"weak attribute declared on a __strong type property in GC mode">;
-def warn_receiver_is_weak : Warning <
- "weak %select{receiver|property|implicit property}0 may be "
- "unpredictably set to nil">,
- InGroup<DiagGroup<"receiver-is-weak">>, DefaultIgnore;
def warn_arc_repeated_use_of_weak : Warning <
"weak %select{variable|property|implicit property|instance variable}0 %1 is "
"accessed multiple times in this %select{function|method|block|lambda}2 "
@@ -2262,8 +2258,7 @@ def err_attribute_dll_member_of_dll_class : Error<
"attribute %q0 cannot be applied to member of %q1 class">;
def warn_attribute_dll_instantiated_base_class : Warning<
"propagating dll attribute to %select{already instantiated|explicitly specialized}0 "
- "base class template "
- "%select{without dll attribute|with different dll attribute}1 is not supported">,
+ "base class template without dll attribute is not supported">,
InGroup<DiagGroup<"unsupported-dll-base-class-template">>, DefaultIgnore;
def err_attribute_weakref_not_static : Error<
"weakref declaration must have internal linkage">;
@@ -5390,6 +5385,10 @@ def err_bad_const_cast_dest : Error<
"which is not a reference, pointer-to-object, or pointer-to-data-member">;
def ext_cast_fn_obj : Extension<
"cast between pointer-to-function and pointer-to-object is an extension">;
+def ext_ms_cast_fn_obj : ExtWarn<
+ "static_cast between pointer-to-function and pointer-to-object is a "
+ "Microsoft extension">,
+ InGroup<Microsoft>;
def warn_cxx98_compat_cast_fn_obj : Warning<
"cast between pointer-to-function and pointer-to-object is incompatible with C++98">,
InGroup<CXX98CompatPedantic>, DefaultIgnore;
@@ -6334,6 +6333,9 @@ let CategoryName = "Inline Assembly Issue" in {
"remove the cast or build with -fheinous-gnu-extensions">;
def err_invalid_asm_value_for_constraint
: Error <"value '%0' out of range for constraint '%1'">;
+ def err_asm_bitfield_in_memory_constraint
+ : Error <"reference to a bit-field in asm "
+ "%select{input|output}0 with a memory constraint '%1'">;
def warn_asm_label_on_auto_decl : Warning<
"ignored asm label '%0' on automatic variable">;
@@ -7404,8 +7406,6 @@ def err_omp_unexpected_clause_value : Error<
"expected %0 in OpenMP clause '%1'">;
def err_omp_expected_var_name : Error<
"expected variable name">;
-def err_omp_required_method : Error<
- "%0 variable must have an accessible, unambiguous %select{default constructor|copy constructor|copy assignment operator|'%2'|destructor}1">;
def note_omp_task_predetermined_firstprivate_here : Note<
"predetermined as a firstprivate in a task construct here">;
def err_omp_clause_ref_type_arg : Error<
diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def
index 28aafca..b6d983b 100644
--- a/include/clang/Basic/TokenKinds.def
+++ b/include/clang/Basic/TokenKinds.def
@@ -10,7 +10,8 @@
// This file defines the TokenKind database. This includes normal tokens like
// tok::ampamp (corresponding to the && token) as well as keywords for various
// languages. Users of this file must optionally #define the TOK, KEYWORD,
-// CXX11_KEYWORD, ALIAS, or PPKEYWORD macros to make use of this file.
+// CXX11_KEYWORD, CONCEPTS_KEYWORD, ALIAS, or PPKEYWORD macros to make use of
+// this file.
//
//===----------------------------------------------------------------------===//
@@ -26,6 +27,9 @@
#ifndef CXX11_KEYWORD
#define CXX11_KEYWORD(X,Y) KEYWORD(X,KEYCXX11|(Y))
#endif
+#ifndef CONCEPTS_KEYWORD
+#define CONCEPTS_KEYWORD(X) KEYWORD(X,KEYCONCEPTS)
+#endif
#ifndef TYPE_TRAIT
#define TYPE_TRAIT(N,I,K) KEYWORD(I,K)
#endif
@@ -226,6 +230,8 @@ PUNCTUATOR(greatergreatergreater, ">>>")
// implementation namespace
// KEYNOCXX - This is a keyword in every non-C++ dialect.
// KEYCXX11 - This is a C++ keyword introduced to C++ in C++11
+// KEYCONCEPTS - This is a keyword if the C++ extensions for concepts
+// are enabled.
// KEYGNU - This is a keyword if GNU extensions are enabled
// KEYMS - This is a keyword if Microsoft extensions are enabled
// KEYNOMS18 - This is a keyword that must never be enabled under
@@ -344,6 +350,10 @@ CXX11_KEYWORD(nullptr , 0)
CXX11_KEYWORD(static_assert , 0)
CXX11_KEYWORD(thread_local , 0)
+// C++ concepts TS keywords
+CONCEPTS_KEYWORD(concept)
+CONCEPTS_KEYWORD(requires)
+
// GNU Extensions (in impl-reserved namespace)
KEYWORD(_Decimal32 , KEYALL)
KEYWORD(_Decimal64 , KEYALL)
@@ -738,6 +748,7 @@ ANNOTATION(module_end)
#undef TYPE_TRAIT_2
#undef TYPE_TRAIT_1
#undef TYPE_TRAIT
+#undef CONCEPTS_KEYWORD
#undef CXX11_KEYWORD
#undef KEYWORD
#undef PUNCTUATOR
OpenPOWER on IntegriCloud