Skip to content

Commit 7c98ead

Browse files
authored
Merge pull request llvm#289 from AMD-Lightning-Internal/amd/merge/upstream_merge_20250123205037
merge main into amd-staging
2 parents c327adf + cca8f82 commit 7c98ead

File tree

766 files changed

+40610
-30319
lines changed

Some content is hidden

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

766 files changed

+40610
-30319
lines changed

clang-tools-extra/modularize/CoverageChecker.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,15 +278,15 @@ CoverageChecker::collectUmbrellaHeaderHeaders(StringRef UmbrellaHeaderName) {
278278
sys::fs::current_path(PathBuf);
279279

280280
// Create the compilation database.
281-
std::unique_ptr<CompilationDatabase> Compilations;
282-
Compilations.reset(new FixedCompilationDatabase(Twine(PathBuf), CommandLine));
281+
FixedCompilationDatabase Compilations(Twine(PathBuf), CommandLine);
283282

284283
std::vector<std::string> HeaderPath;
285284
HeaderPath.push_back(std::string(UmbrellaHeaderName));
286285

287286
// Create the tool and run the compilation.
288-
ClangTool Tool(*Compilations, HeaderPath);
289-
int HadErrors = Tool.run(new CoverageCheckerFrontendActionFactory(*this));
287+
ClangTool Tool(Compilations, HeaderPath);
288+
CoverageCheckerFrontendActionFactory ActionFactory(*this);
289+
int HadErrors = Tool.run(&ActionFactory);
290290

291291
// If we had errors, exit early.
292292
return !HadErrors;

clang/docs/ReleaseNotes.rst

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,6 @@ C++2c Feature Support
299299
The changes to attributes declarations are not part of this release.
300300
- Implemented `P2741R3: user-generated static_assert messages <https://wg21.link/P2741R3>`_.
301301

302-
- Add ``__builtin_is_implicit_lifetime`` intrinsic, which supports
303-
`P2647R1 A trait for implicit lifetime types <https://wg21.link/p2674r1>`_
304-
305302
- Add ``__builtin_is_virtual_base_of`` intrinsic, which supports
306303
`P2985R0 A type trait for detecting virtual base classes <https://wg21.link/p2985r0>`_
307304

@@ -323,13 +320,20 @@ C++23 Feature Support
323320

324321
- ``__cpp_explicit_this_parameter`` is now defined. (#GH82780)
325322

323+
- Add ``__builtin_is_implicit_lifetime`` intrinsic, which supports
324+
`P2674R1 A trait for implicit lifetime types <https://wg21.link/p2674r1>`_
325+
326326
- Add support for `P2280R4 Using unknown pointers and references in constant expressions <https://wg21.link/P2280R4>`_. (#GH63139)
327327

328328
C++20 Feature Support
329329
^^^^^^^^^^^^^^^^^^^^^
330330

331331
- Implemented module level lookup for C++20 modules. (#GH90154)
332332

333+
C++17 Feature Support
334+
^^^^^^^^^^^^^^^^^^^^^
335+
- The implementation of the relaxed template template argument matching rules is
336+
more complete and reliable, and should provide more accurate diagnostics.
333337

334338
Resolutions to C++ Defect Reports
335339
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -356,7 +360,8 @@ Resolutions to C++ Defect Reports
356360
(`CWG2351: void{} <https://cplusplus.github.io/CWG/issues/2351.html>`_).
357361

358362
- Clang now has improved resolution to CWG2398, allowing class templates to have
359-
default arguments deduced when partial ordering.
363+
default arguments deduced when partial ordering, and better backwards compatibility
364+
in overload resolution.
360365

361366
- Clang now allows comparing unequal object pointers that have been cast to ``void *``
362367
in constant expressions. These comparisons always worked in non-constant expressions.
@@ -666,6 +671,10 @@ Improvements to Clang's diagnostics
666671

667672
- Clang now diagnoses when the result of a [[nodiscard]] function is discarded after being cast in C. Fixes #GH104391.
668673

674+
- Clang now properly explains the reason a template template argument failed to
675+
match a template template parameter, in terms of the C++17 relaxed matching rules
676+
instead of the old ones.
677+
669678
- Don't emit duplicated dangling diagnostics. (#GH93386).
670679

671680
- Improved diagnostic when trying to befriend a concept. (#GH45182).
@@ -837,6 +846,8 @@ Improvements to Clang's diagnostics
837846

838847
- Clang now emits a ``-Wignored-qualifiers`` diagnostic when a base class includes cv-qualifiers (#GH55474).
839848

849+
- Clang now diagnoses the use of attribute names reserved by the C++ standard (#GH92196).
850+
840851
Improvements to Clang's time-trace
841852
----------------------------------
842853

@@ -917,6 +928,8 @@ Bug Fixes to C++ Support
917928
- Correctly check constraints of explicit instantiations of member functions. (#GH46029)
918929
- When performing partial ordering of function templates, clang now checks that
919930
the deduction was consistent. Fixes (#GH18291).
931+
- Fixes to several issues in partial ordering of template template parameters, which
932+
were documented in the test suite.
920933
- Fixed an assertion failure about a constraint of a friend function template references to a value with greater
921934
template depth than the friend function template. (#GH98258)
922935
- Clang now rebuilds the template parameters of out-of-line declarations and specializations in the context
@@ -1007,6 +1020,8 @@ Bug Fixes to C++ Support
10071020
- Fixed a nested lambda substitution issue for constraint evaluation. (#GH123441)
10081021
- Fixed various false diagnostics related to the use of immediate functions. (#GH123472)
10091022
- Fix immediate escalation not propagating through inherited constructors. (#GH112677)
1023+
- Fixed assertions or false compiler diagnostics in the case of C++ modules for
1024+
lambda functions or inline friend functions defined inside templates (#GH122493).
10101025

10111026
Bug Fixes to AST Handling
10121027
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1306,6 +1321,13 @@ libclang
13061321
- Added ``clang_getOffsetOfBase``, which allows computing the offset of a base
13071322
class in a class's layout.
13081323

1324+
1325+
Code Completion
1326+
---------------
1327+
1328+
- Use ``HeuristicResolver`` (upstreamed from clangd) to improve code completion results
1329+
in dependent code
1330+
13091331
Static Analyzer
13101332
---------------
13111333

clang/include/clang/Basic/AttributeCommonInfo.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,18 @@ class AttributeCommonInfo {
6161
};
6262
enum Kind {
6363
#define PARSED_ATTR(NAME) AT_##NAME,
64-
#include "clang/Sema/AttrParsedAttrList.inc"
64+
#include "clang/Basic/AttrParsedAttrList.inc"
6565
#undef PARSED_ATTR
6666
NoSemaHandlerAttribute,
6767
IgnoredAttribute,
6868
UnknownAttribute,
6969
};
7070
enum class Scope { NONE, CLANG, GNU, MSVC, OMP, HLSL, GSL, RISCV };
71+
enum class AttrArgsInfo {
72+
None,
73+
Optional,
74+
Required,
75+
};
7176

7277
private:
7378
const IdentifierInfo *AttrName = nullptr;
@@ -241,6 +246,8 @@ class AttributeCommonInfo {
241246
static Kind getParsedKind(const IdentifierInfo *Name,
242247
const IdentifierInfo *Scope, Syntax SyntaxUsed);
243248

249+
static AttrArgsInfo getCXX11AttrArgsInfo(const IdentifierInfo *Name);
250+
244251
private:
245252
/// Get an index into the attribute spelling list
246253
/// defined in Attr.td. This index is used by an attribute

clang/include/clang/Basic/Attributes.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ int hasAttribute(AttributeCommonInfo::Syntax Syntax,
2323
const IdentifierInfo *Scope, const IdentifierInfo *Attr,
2424
const TargetInfo &Target, const LangOptions &LangOpts);
2525

26+
int hasAttribute(AttributeCommonInfo::Syntax Syntax,
27+
const IdentifierInfo *Scope, const IdentifierInfo *Attr,
28+
const TargetInfo &Target, const LangOptions &LangOpts,
29+
bool CheckPlugins);
30+
2631
} // end namespace clang
2732

2833
#endif // LLVM_CLANG_BASIC_ATTRIBUTES_H

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5191,51 +5191,51 @@ let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] i
51915191
}
51925192

51935193
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5194-
def vcvtne2ph2bf8_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
5194+
def vcvt2ph2bf8_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
51955195
}
51965196

51975197
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5198-
def vcvtne2ph2bf8_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
5198+
def vcvt2ph2bf8_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
51995199
}
52005200

52015201
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5202-
def vcvtne2ph2bf8_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
5202+
def vcvt2ph2bf8_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
52035203
}
52045204

52055205
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5206-
def vcvtne2ph2bf8s_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
5206+
def vcvt2ph2bf8s_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
52075207
}
52085208

52095209
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5210-
def vcvtne2ph2bf8s_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
5210+
def vcvt2ph2bf8s_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
52115211
}
52125212

52135213
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5214-
def vcvtne2ph2bf8s_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
5214+
def vcvt2ph2bf8s_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
52155215
}
52165216

52175217
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5218-
def vcvtne2ph2hf8_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
5218+
def vcvt2ph2hf8_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
52195219
}
52205220

52215221
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5222-
def vcvtne2ph2hf8_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
5222+
def vcvt2ph2hf8_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
52235223
}
52245224

52255225
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5226-
def vcvtne2ph2hf8_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
5226+
def vcvt2ph2hf8_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
52275227
}
52285228

52295229
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5230-
def vcvtne2ph2hf8s_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
5230+
def vcvt2ph2hf8s_128 : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<8, _Float16>)">;
52315231
}
52325232

52335233
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5234-
def vcvtne2ph2hf8s_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
5234+
def vcvt2ph2hf8s_256 : X86Builtin<"_Vector<32, char>(_Vector<16, _Float16>, _Vector<16, _Float16>)">;
52355235
}
52365236

52375237
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5238-
def vcvtne2ph2hf8s_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
5238+
def vcvt2ph2hf8s_512 : X86Builtin<"_Vector<64, char>(_Vector<32, _Float16>, _Vector<32, _Float16>)">;
52395239
}
52405240

52415241
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
@@ -5251,51 +5251,51 @@ let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] i
52515251
}
52525252

52535253
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5254-
def vcvtneph2bf8_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
5254+
def vcvtph2bf8_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
52555255
}
52565256

52575257
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5258-
def vcvtneph2bf8_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
5258+
def vcvtph2bf8_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
52595259
}
52605260

52615261
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5262-
def vcvtneph2bf8_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
5262+
def vcvtph2bf8_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
52635263
}
52645264

52655265
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5266-
def vcvtneph2bf8s_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
5266+
def vcvtph2bf8s_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
52675267
}
52685268

52695269
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5270-
def vcvtneph2bf8s_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
5270+
def vcvtph2bf8s_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
52715271
}
52725272

52735273
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5274-
def vcvtneph2bf8s_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
5274+
def vcvtph2bf8s_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
52755275
}
52765276

52775277
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5278-
def vcvtneph2hf8_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
5278+
def vcvtph2hf8_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
52795279
}
52805280

52815281
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5282-
def vcvtneph2hf8_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
5282+
def vcvtph2hf8_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
52835283
}
52845284

52855285
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5286-
def vcvtneph2hf8_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
5286+
def vcvtph2hf8_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
52875287
}
52885288

52895289
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
5290-
def vcvtneph2hf8s_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
5290+
def vcvtph2hf8s_128_mask : X86Builtin<"_Vector<16, char>(_Vector<8, _Float16>, _Vector<16, char>, unsigned char)">;
52915291
}
52925292

52935293
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<256>] in {
5294-
def vcvtneph2hf8s_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
5294+
def vcvtph2hf8s_256_mask : X86Builtin<"_Vector<16, char>(_Vector<16, _Float16>, _Vector<16, char>, unsigned short)">;
52955295
}
52965296

52975297
let Features = "avx10.2-512", Attributes = [NoThrow, RequiredVectorWidth<512>] in {
5298-
def vcvtneph2hf8s_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
5298+
def vcvtph2hf8s_512_mask : X86Builtin<"_Vector<32, char>(_Vector<32, _Float16>, _Vector<32, char>, unsigned int)">;
52995299
}
53005300

53015301
let Features = "avx10.2-256", Attributes = [NoThrow, RequiredVectorWidth<128>] in {
@@ -5375,14 +5375,9 @@ let Features = "avx10.2-512", Attributes = [NoThrow, Const, RequiredVectorWidth<
53755375
def vsubnepbf16512 : X86Builtin<"_Vector<32, __bf16>(_Vector<32, __bf16>, _Vector<32, __bf16>)">;
53765376
}
53775377

5378-
let Features = "avx10.2-256", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
5379-
def vcomsbf16eq : X86Builtin<"int(_Vector<8, __bf16>, _Vector<8, __bf16>)">;
5380-
def vcomsbf16lt : X86Builtin<"int(_Vector<8, __bf16>, _Vector<8, __bf16>)">;
5381-
def vcomsbf16neq : X86Builtin<"int(_Vector<8, __bf16>, _Vector<8, __bf16>)">;
5382-
def vcomsbf16ge : X86Builtin<"int(_Vector<8, __bf16>, _Vector<8, __bf16>)">;
5383-
def vcomsbf16gt : X86Builtin<"int(_Vector<8, __bf16>, _Vector<8, __bf16>)">;
5384-
def vcomsbf16le : X86Builtin<"int(_Vector<8, __bf16>, _Vector<8, __bf16>)">;
5385-
}
5378+
let Features = "avx10.2-256", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in
5379+
foreach Cmp = ["eq", "lt", "le", "gt", "ge", "neq"] in
5380+
def vcomisbf16#Cmp : X86Builtin<"int(_Vector<8, __bf16>, _Vector<8, __bf16>)">;
53865381

53875382
let Features = "avx10.2-512", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
53885383
def vcmppbf16512_mask : X86Builtin<"unsigned int(_Vector<32, __bf16>, _Vector<32, __bf16>, _Constant int, unsigned int)">;

clang/include/clang/Basic/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ clang_tablegen(AttrList.inc -gen-clang-attr-list
3636
SOURCE Attr.td
3737
TARGET ClangAttrList)
3838

39+
clang_tablegen(AttrParsedAttrList.inc -gen-clang-attr-parsed-attr-list
40+
-I ${CMAKE_CURRENT_SOURCE_DIR}/../../
41+
SOURCE Attr.td
42+
TARGET ClangAttrParsedAttrList)
43+
3944
clang_tablegen(AttrSubMatchRulesList.inc -gen-clang-attr-subject-match-rule-list
4045
-I ${CMAKE_CURRENT_SOURCE_DIR}/../../
4146
SOURCE Attr.td
@@ -53,6 +58,12 @@ clang_tablegen(AttrHasAttributeImpl.inc -gen-clang-attr-has-attribute-impl
5358
TARGET ClangAttrHasAttributeImpl
5459
)
5560

61+
clang_tablegen(CXX11AttributeInfo.inc -gen-cxx11-attribute-info
62+
-I ${CMAKE_CURRENT_SOURCE_DIR}/../../
63+
SOURCE Attr.td
64+
TARGET CXX11AttributeInfo
65+
)
66+
5667
clang_tablegen(Builtins.inc -gen-clang-builtins
5768
SOURCE Builtins.td
5869
TARGET ClangBuiltins)

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,7 @@ def AmbiguousMacro : DiagGroup<"ambiguous-macro">;
760760
def KeywordAsMacro : DiagGroup<"keyword-macro">;
761761
def ReservedIdAsMacro : DiagGroup<"reserved-macro-identifier">;
762762
def ReservedIdAsMacroAlias : DiagGroup<"reserved-id-macro", [ReservedIdAsMacro]>;
763+
def ReservedAttributeIdentifier : DiagGroup<"reserved-attribute-identifier">;
763764
def RestrictExpansionMacro : DiagGroup<"restrict-expansion">;
764765
def FinalMacro : DiagGroup<"final-macro">;
765766

@@ -935,7 +936,8 @@ def SignedEnumBitfield : DiagGroup<"signed-enum-bitfield">;
935936

936937
def ReservedModuleIdentifier : DiagGroup<"reserved-module-identifier">;
937938
def ReservedIdentifier : DiagGroup<"reserved-identifier",
938-
[ReservedIdAsMacro, ReservedModuleIdentifier, UserDefinedLiterals]>;
939+
[ReservedIdAsMacro, ReservedModuleIdentifier,
940+
UserDefinedLiterals, ReservedAttributeIdentifier]>;
939941

940942
// Unreachable code warning groups.
941943
//

clang/include/clang/Basic/DiagnosticLexKinds.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ def warn_pp_macro_hides_keyword : Extension<
407407
def warn_pp_macro_is_reserved_id : Warning<
408408
"macro name is a reserved identifier">, DefaultIgnore,
409409
InGroup<ReservedIdAsMacro>;
410+
def warn_pp_macro_is_reserved_attribute_id : Warning<
411+
"%0 is a reserved attribute identifier">, DefaultIgnore,
412+
InGroup<ReservedAttributeIdentifier>;
410413
def warn_pp_objc_macro_redef_ignored : Warning<
411414
"ignoring redefinition of Objective-C qualifier macro">,
412415
InGroup<DiagGroup<"objc-macro-redefinition">>;

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5323,6 +5323,13 @@ def note_template_arg_refers_here_func : Note<
53235323
def err_template_arg_template_params_mismatch : Error<
53245324
"template template argument has different template parameters than its "
53255325
"corresponding template template parameter">;
5326+
def note_template_arg_template_params_mismatch : Note<
5327+
"template template argument has different template parameters than its "
5328+
"corresponding template template parameter">;
5329+
def err_non_deduced_mismatch : Error<
5330+
"could not match %diff{$ against $|types}0,1">;
5331+
def err_inconsistent_deduction : Error<
5332+
"conflicting deduction %diff{$ against $|types}0,1 for parameter">;
53265333
def err_template_arg_not_integral_or_enumeral : Error<
53275334
"non-type template argument of type %0 must have an integral or enumeration"
53285335
" type">;

clang/include/clang/Lex/Preprocessor.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,11 @@ class Preprocessor {
22712271
}
22722272
}
22732273

2274+
/// Determine whether the next preprocessor token to be
2275+
/// lexed is a '('. If so, consume the token and return true, if not, this
2276+
/// method should have no observable side-effect on the lexed tokens.
2277+
bool isNextPPTokenLParen();
2278+
22742279
private:
22752280
/// Identifiers used for SEH handling in Borland. These are only
22762281
/// allowed in particular circumstances
@@ -2648,11 +2653,6 @@ class Preprocessor {
26482653

26492654
void removeCachedMacroExpandedTokensOfLastLexer();
26502655

2651-
/// Determine whether the next preprocessor token to be
2652-
/// lexed is a '('. If so, consume the token and return true, if not, this
2653-
/// method should have no observable side-effect on the lexed tokens.
2654-
bool isNextPPTokenLParen();
2655-
26562656
/// After reading "MACRO(", this method is invoked to read all of the formal
26572657
/// arguments specified for the macro invocation. Returns null on error.
26582658
MacroArgs *ReadMacroCallArgumentList(Token &MacroName, MacroInfo *MI,

0 commit comments

Comments
 (0)