Skip to content

Commit bed7be3

Browse files
committed
Merge branch 'main' into pei
2 parents c341308 + 9bb3c62 commit bed7be3

File tree

874 files changed

+56112
-45021
lines changed

Some content is hidden

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

874 files changed

+56112
-45021
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
@@ -294,9 +294,6 @@ C++ Language Changes
294294
C++2c Feature Support
295295
^^^^^^^^^^^^^^^^^^^^^
296296

297-
- Add ``__builtin_is_implicit_lifetime`` intrinsic, which supports
298-
`P2647R1 A trait for implicit lifetime types <https://wg21.link/p2674r1>`_
299-
300297
- Add ``__builtin_is_virtual_base_of`` intrinsic, which supports
301298
`P2985R0 A type trait for detecting virtual base classes <https://wg21.link/p2985r0>`_
302299

@@ -318,13 +315,20 @@ C++23 Feature Support
318315

319316
- ``__cpp_explicit_this_parameter`` is now defined. (#GH82780)
320317

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

323323
C++20 Feature Support
324324
^^^^^^^^^^^^^^^^^^^^^
325325

326326
- Implemented module level lookup for C++20 modules. (#GH90154)
327327

328+
C++17 Feature Support
329+
^^^^^^^^^^^^^^^^^^^^^
330+
- The implementation of the relaxed template template argument matching rules is
331+
more complete and reliable, and should provide more accurate diagnostics.
328332

329333
Resolutions to C++ Defect Reports
330334
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -351,7 +355,8 @@ Resolutions to C++ Defect Reports
351355
(`CWG2351: void{} <https://cplusplus.github.io/CWG/issues/2351.html>`_).
352356

353357
- Clang now has improved resolution to CWG2398, allowing class templates to have
354-
default arguments deduced when partial ordering.
358+
default arguments deduced when partial ordering, and better backwards compatibility
359+
in overload resolution.
355360

356361
- Clang now allows comparing unequal object pointers that have been cast to ``void *``
357362
in constant expressions. These comparisons always worked in non-constant expressions.
@@ -636,6 +641,10 @@ Improvements to Clang's diagnostics
636641

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

644+
- Clang now properly explains the reason a template template argument failed to
645+
match a template template parameter, in terms of the C++17 relaxed matching rules
646+
instead of the old ones.
647+
639648
- Don't emit duplicated dangling diagnostics. (#GH93386).
640649

641650
- Improved diagnostic when trying to befriend a concept. (#GH45182).
@@ -807,6 +816,8 @@ Improvements to Clang's diagnostics
807816

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

819+
- Clang now diagnoses the use of attribute names reserved by the C++ standard (#GH92196).
820+
810821
Improvements to Clang's time-trace
811822
----------------------------------
812823

@@ -885,6 +896,8 @@ Bug Fixes to C++ Support
885896
- Correctly check constraints of explicit instantiations of member functions. (#GH46029)
886897
- When performing partial ordering of function templates, clang now checks that
887898
the deduction was consistent. Fixes (#GH18291).
899+
- Fixes to several issues in partial ordering of template template parameters, which
900+
were documented in the test suite.
888901
- Fixed an assertion failure about a constraint of a friend function template references to a value with greater
889902
template depth than the friend function template. (#GH98258)
890903
- Clang now rebuilds the template parameters of out-of-line declarations and specializations in the context
@@ -975,6 +988,8 @@ Bug Fixes to C++ Support
975988
- Fixed a nested lambda substitution issue for constraint evaluation. (#GH123441)
976989
- Fixed various false diagnostics related to the use of immediate functions. (#GH123472)
977990
- Fix immediate escalation not propagating through inherited constructors. (#GH112677)
991+
- Fixed assertions or false compiler diagnostics in the case of C++ modules for
992+
lambda functions or inline friend functions defined inside templates (#GH122493).
978993

979994
Bug Fixes to AST Handling
980995
^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1272,6 +1287,13 @@ libclang
12721287
- Added ``clang_getOffsetOfBase``, which allows computing the offset of a base
12731288
class in a class's layout.
12741289

1290+
1291+
Code Completion
1292+
---------------
1293+
1294+
- Use ``HeuristicResolver`` (upstreamed from clangd) to improve code completion results
1295+
in dependent code
1296+
12751297
Static Analyzer
12761298
---------------
12771299

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

0 commit comments

Comments
 (0)