Skip to content

Commit 9f982ee

Browse files
committed
Merge from 'master' to 'sycl-web' (#21)
CONFLICT (content): Merge conflict in clang/lib/Sema/SemaSYCL.cpp CONFLICT (content): Merge conflict in clang/include/clang/Sema/Sema.h
2 parents d7aa7e9 + 772bd8a commit 9f982ee

File tree

89 files changed

+2631
-914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2631
-914
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4018,3 +4018,11 @@ def ReleaseHandle : InheritableParamAttr {
40184018
let Subjects = SubjectList<[ParmVar]>;
40194019
let Documentation = [ReleaseHandleDocs];
40204020
}
4021+
4022+
def Builtin : InheritableAttr {
4023+
let Spellings = [];
4024+
let Args = [UnsignedArgument<"ID">];
4025+
let Subjects = SubjectList<[Function]>;
4026+
let SemaHandler = 0;
4027+
let Documentation = [Undocumented];
4028+
}

clang/include/clang/Basic/Builtins.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,6 +1020,7 @@ LIBBUILTIN(strncasecmp, "icC*cC*z", "f", "strings.h", ALL_GNU_LANGUAGES)
10201020
LIBBUILTIN(_exit, "vi", "fr", "unistd.h", ALL_GNU_LANGUAGES)
10211021
LIBBUILTIN(vfork, "p", "fj", "unistd.h", ALL_LANGUAGES)
10221022
// POSIX pthread.h
1023+
// FIXME: Should specify argument types.
10231024
LIBBUILTIN(pthread_create, "", "fC<2,3>", "pthread.h", ALL_GNU_LANGUAGES)
10241025

10251026
// POSIX setjmp.h

clang/include/clang/Basic/Diagnostic.td

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class TextSubstitution<string Text> {
4545
// diagnostics
4646
string Component = "";
4747
string CategoryName = "";
48-
bit Deferrable = 0;
4948
}
5049

5150
// Diagnostic Categories. These can be applied to groups or individual
@@ -84,7 +83,6 @@ class Diagnostic<string text, DiagClass DC, Severity defaultmapping> {
8483
bit AccessControl = 0;
8584
bit WarningNoWerror = 0;
8685
bit ShowInSystemHeader = 0;
87-
bit Deferrable = 0;
8886
Severity DefaultSeverity = defaultmapping;
8987
DiagGroup Group;
9088
string CategoryName = "";
@@ -108,14 +106,6 @@ class SuppressInSystemHeader {
108106
bit ShowInSystemHeader = 0;
109107
}
110108

111-
class Deferrable {
112-
bit Deferrable = 1;
113-
}
114-
115-
class NonDeferrable {
116-
bit Deferrable = 0;
117-
}
118-
119109
// FIXME: ExtWarn and Extension should also be SFINAEFailure by default.
120110
class Error<string str> : Diagnostic<str, CLASS_ERROR, SEV_Error>, SFINAEFailure {
121111
bit ShowInSystemHeader = 1;

clang/include/clang/Basic/DiagnosticAST.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define ASTSTART
2121
#include "clang/Basic/DiagnosticASTKinds.inc"

clang/include/clang/Basic/DiagnosticAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define ANALYSISSTART
2121
#include "clang/Basic/DiagnosticAnalysisKinds.inc"

clang/include/clang/Basic/DiagnosticComment.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define COMMENTSTART
2121
#include "clang/Basic/DiagnosticCommentKinds.inc"

clang/include/clang/Basic/DiagnosticCrossTU.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define CROSSTUSTART
2121
#include "clang/Basic/DiagnosticCrossTUKinds.inc"

clang/include/clang/Basic/DiagnosticDriver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define DRIVERSTART
2121
#include "clang/Basic/DiagnosticDriverKinds.inc"

clang/include/clang/Basic/DiagnosticFrontend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define FRONTENDSTART
2121
#include "clang/Basic/DiagnosticFrontendKinds.inc"

clang/include/clang/Basic/DiagnosticIDs.h

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ namespace clang {
6464

6565
// Get typedefs for common diagnostics.
6666
enum {
67-
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, CATEGORY, \
68-
NOWERROR, SHOWINSYSHEADER, DEFFERABLE) \
69-
ENUM,
67+
#define DIAG(ENUM,FLAGS,DEFAULT_MAPPING,DESC,GROUP,\
68+
SFINAE,CATEGORY,NOWERROR,SHOWINSYSHEADER) ENUM,
7069
#define COMMONSTART
7170
#include "clang/Basic/DiagnosticCommonKinds.inc"
7271
NUM_BUILTIN_COMMON_DIAGNOSTICS
@@ -281,13 +280,6 @@ class DiagnosticIDs : public RefCountedBase<DiagnosticIDs> {
281280
/// are not SFINAE errors.
282281
static SFINAEResponse getDiagnosticSFINAEResponse(unsigned DiagID);
283282

284-
/// Whether the diagnostic message can be deferred.
285-
///
286-
/// For single source offloading languages, a diagnostic message occurred
287-
/// in a device host function may be deferred until the function is sure
288-
/// to be emitted.
289-
static bool isDeferrable(unsigned DiagID);
290-
291283
/// Get the string of all diagnostic flags.
292284
///
293285
/// \returns A list of all diagnostics flags as they would be written in a

clang/include/clang/Basic/DiagnosticLex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define LEXSTART
2121
#include "clang/Basic/DiagnosticLexKinds.inc"

clang/include/clang/Basic/DiagnosticParse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define PARSESTART
2121
#include "clang/Basic/DiagnosticParseKinds.inc"

clang/include/clang/Basic/DiagnosticRefactoring.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define REFACTORINGSTART
2121
#include "clang/Basic/DiagnosticRefactoringKinds.inc"

clang/include/clang/Basic/DiagnosticSema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define SEMASTART
2121
#include "clang/Basic/DiagnosticSemaKinds.inc"

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4101,8 +4101,6 @@ def err_ovl_static_nonstatic_member : Error<
41014101
"static and non-static member functions with the same parameter types "
41024102
"cannot be overloaded">;
41034103

4104-
let Deferrable = 1 in {
4105-
41064104
def err_ovl_no_viable_function_in_call : Error<
41074105
"no matching function for call to %0">;
41084106
def err_ovl_no_viable_member_function_in_call : Error<
@@ -4416,8 +4414,6 @@ def err_addr_ovl_not_func_ptrref : Error<
44164414
def err_addr_ovl_no_qualifier : Error<
44174415
"cannot form member pointer of type %0 without '&' and class name">;
44184416

4419-
} // let Deferrable
4420-
44214417
// C++11 Literal Operators
44224418
def err_ovl_no_viable_literal_operator : Error<
44234419
"no matching literal operator for call to %0"

clang/include/clang/Basic/DiagnosticSerialization.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace clang {
1515
namespace diag {
1616
enum {
1717
#define DIAG(ENUM, FLAGS, DEFAULT_MAPPING, DESC, GROUP, SFINAE, NOWERROR, \
18-
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
18+
SHOWINSYSHEADER, CATEGORY) \
1919
ENUM,
2020
#define SERIALIZATIONSTART
2121
#include "clang/Basic/DiagnosticSerializationKinds.inc"

clang/include/clang/Basic/IdentifierTable.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -225,18 +225,6 @@ class alignas(IdentifierInfoAlignment) IdentifierInfo {
225225
}
226226
void setObjCKeywordID(tok::ObjCKeywordKind ID) { ObjCOrBuiltinID = ID; }
227227

228-
/// True if setNotBuiltin() was called.
229-
bool hasRevertedBuiltin() const {
230-
return ObjCOrBuiltinID == tok::NUM_OBJC_KEYWORDS;
231-
}
232-
233-
/// Revert the identifier to a non-builtin identifier. We do this if
234-
/// the name of a known builtin library function is used to declare that
235-
/// function, but an unexpected type is specified.
236-
void revertBuiltin() {
237-
setBuiltinID(0);
238-
}
239-
240228
/// Return a value indicating whether this is a builtin function.
241229
///
242230
/// 0 is not-built-in. 1+ are specific builtin functions.

clang/include/clang/Basic/LangOptions.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ LANGOPT(CUDADeviceApproxTranscendentals, 1, 0, "using approximate transcendental
241241
LANGOPT(GPURelocatableDeviceCode, 1, 0, "generate relocatable device code")
242242
LANGOPT(GPUAllowDeviceInit, 1, 0, "allowing device side global init functions for HIP")
243243
LANGOPT(GPUMaxThreadsPerBlock, 32, 256, "default max threads per block for kernel launch bounds for HIP")
244-
LANGOPT(GPUDeferDiag, 1, 0, "defer host/device related diagnostic messages for CUDA/HIP")
245244

246245
LANGOPT(SYCL , 1, 0, "SYCL")
247246
LANGOPT(SYCLIsDevice , 1, 0, "Generate code for SYCL device")

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,6 @@ defm hip_new_launch_api : OptInFFlag<"hip-new-launch-api",
688688
"Use", "Don't use", " new kernel launching API for HIP">;
689689
defm gpu_allow_device_init : OptInFFlag<"gpu-allow-device-init",
690690
"Allow", "Don't allow", " device side init function in HIP">;
691-
defm gpu_defer_diag : OptInFFlag<"gpu-defer-diag",
692-
"Defer", "Don't defer", " host/device related diagnostic messages"
693-
" for CUDA/HIP">;
694691
def gpu_max_threads_per_block_EQ : Joined<["--"], "gpu-max-threads-per-block=">,
695692
Flags<[CC1Option]>,
696693
HelpText<"Default max threads per block for kernel launch bounds for HIP">;

0 commit comments

Comments
 (0)