Skip to content

Commit 237b4f2

Browse files
committed
Merge from 'master' to 'sycl-web' (#1)
CONFLICT (content): Merge conflict in clang/lib/Sema/SemaSYCL.cpp CONFLICT (content): Merge conflict in clang/include/clang/Sema/Sema.h
2 parents dca6732 + 52bcd69 commit 237b4f2

Some content is hidden

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

41 files changed

+543
-258
lines changed

clang-tools-extra/clangd/Diagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace {
4343
const char *getDiagnosticCode(unsigned ID) {
4444
switch (ID) {
4545
#define DIAG(ENUM, CLASS, DEFAULT_MAPPING, DESC, GROPU, SFINAE, NOWERROR, \
46-
SHOWINSYSHEADER, CATEGORY) \
46+
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
4747
case clang::diag::ENUM: \
4848
return #ENUM;
4949
#include "clang/Basic/DiagnosticASTKinds.inc"

clang/include/clang/Basic/Diagnostic.td

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

5051
// Diagnostic Categories. These can be applied to groups or individual
@@ -83,6 +84,7 @@ class Diagnostic<string text, DiagClass DC, Severity defaultmapping> {
8384
bit AccessControl = 0;
8485
bit WarningNoWerror = 0;
8586
bit ShowInSystemHeader = 0;
87+
bit Deferrable = 0;
8688
Severity DefaultSeverity = defaultmapping;
8789
DiagGroup Group;
8890
string CategoryName = "";
@@ -106,6 +108,14 @@ class SuppressInSystemHeader {
106108
bit ShowInSystemHeader = 0;
107109
}
108110

111+
class Deferrable {
112+
bit Deferrable = 1;
113+
}
114+
115+
class NonDeferrable {
116+
bit Deferrable = 0;
117+
}
118+
109119
// FIXME: ExtWarn and Extension should also be SFINAEFailure by default.
110120
class Error<string str> : Diagnostic<str, CLASS_ERROR, SEV_Error>, SFINAEFailure {
111121
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, CATEGORY) \
18+
SHOWINSYSHEADER, DEFERRABLE, 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, CATEGORY) \
18+
SHOWINSYSHEADER, DEFERRABLE, 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, CATEGORY) \
18+
SHOWINSYSHEADER, DEFERRABLE, 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, CATEGORY) \
18+
SHOWINSYSHEADER, DEFERRABLE, 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, CATEGORY) \
18+
SHOWINSYSHEADER, DEFERRABLE, 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, CATEGORY) \
18+
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
1919
ENUM,
2020
#define FRONTENDSTART
2121
#include "clang/Basic/DiagnosticFrontendKinds.inc"

clang/include/clang/Basic/DiagnosticIDs.h

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

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

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+
283291
/// Get the string of all diagnostic flags.
284292
///
285293
/// \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, CATEGORY) \
18+
SHOWINSYSHEADER, DEFERRABLE, CATEGORY) \
1919
ENUM,
2020
#define LEXSTART
2121
#include "clang/Basic/DiagnosticLexKinds.inc"

0 commit comments

Comments
 (0)