ilya-biryukov wrote:
> But I'll still ask the question: would it make sense to name this
> `-helpful-reproducers` or something more generic so we don't feel tempted to
> expose even more internal options this way?
This is tricky as some issues reproduce only when we skip function bodies and
s
https://github.com/ilya-biryukov approved this pull request.
https://github.com/llvm/llvm-project/pull/100135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ilya-biryukov wrote:
> This patch resolves it by visiting the body twice (of course, it's
> suboptimal), however patch #99882 still crashes because that relies on the
> mechanism above, I believe.
I have also observed it crashes, but I still think that in principle we don't
need to traverse t
ilya-biryukov wrote:
Looking at the code a bit deeper, I think (not 100% sure) we're not calling
`DiagnoseUnexpandedPacks` during substitution.
And we probably don't want the logic that produces diagnostics (substitutions
cannot create new unexpanded packs in bad places), but we do need the log
https://github.com/ilya-biryukov approved this pull request.
LGTM, since it now has a test that executes this code path and changes from UB
to defined (even if undesired behavior).
As mentioned earlier, I'm working on a proper fix for those cases
https://github.com/llvm/llvm-project/pull/10040
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/100408
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/100985
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov commented:
Thanks for the change!
This looks like an improvement, but I suspect we can do even better. See the
comments I've left in the code.
https://github.com/llvm/llvm-project/pull/100985
___
cfe-commits mailing li
@@ -3747,6 +3747,16 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr
*RetValExp,
Diag(ReturnLoc, diag::err_acc_branch_in_out_compute_construct)
<< /*return*/ 1 << /*out of */ 0);
+ // using plain return in a coroutine is not allowed.
+ FunctionScopeIn
@@ -291,6 +294,38 @@ void mixed_coreturn_template2(bool b, T) {
return; // expected-error {{not allowed in coroutine}}
}
+struct promise_handle;
+
+struct Handle : std::coroutine_handle { // expected-note
2{{candidate constructor (the implicit copy constructor) not viable
@@ -3747,6 +3747,16 @@ Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr
*RetValExp,
Diag(ReturnLoc, diag::err_acc_branch_in_out_compute_construct)
<< /*return*/ 1 << /*out of */ 0);
+ // using plain return in a coroutine is not allowed.
+ FunctionScopeIn
@@ -291,6 +294,38 @@ void mixed_coreturn_template2(bool b, T) {
return; // expected-error {{not allowed in coroutine}}
}
+struct promise_handle;
+
+struct Handle : std::coroutine_handle { // expected-note
2{{candidate constructor (the implicit copy constructor) not viable
@@ -1120,7 +1120,7 @@ void Sema::CheckCompletedCoroutineBody(FunctionDecl *FD,
Stmt *&Body) {
// [stmt.return.coroutine]p1:
// A coroutine shall not enclose a return statement ([stmt.return]).
- if (Fn->FirstReturnLoc.isValid()) {
+ if (Fn->FirstReturnLoc.isValid() &&
@@ -291,6 +294,38 @@ void mixed_coreturn_template2(bool b, T) {
return; // expected-error {{not allowed in coroutine}}
}
+struct promise_handle;
+
+struct Handle : std::coroutine_handle { // expected-note
2{{candidate constructor (the implicit copy constructor) not viable
https://github.com/ilya-biryukov approved this pull request.
LGTM, but I also have one question (either I don't understand something or
there might be an error in the comment)
https://github.com/llvm/llvm-project/pull/99032
___
cfe-commits mailing lis
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/99032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -34,6 +34,6 @@ struct basic_string {
};
} // namespace std
void test(const char* a) {
- // verify we're emitting the `-Wdangling-assignment` warning.
+ // verify we're emitting the `-Wdangling-assignment-gsl` warning.
a = std::basic_string().c_str(); // expected-warnin
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/98320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov commented:
Thanks for adding an optional flag for this.
Given that the profiles are 2-3x larger now, this seems very much warranted.
Mostly LG, but I did have some questions and suggestions. PTAL.
https://github.com/llvm/llvm-project/pull/98320
_
@@ -307,14 +331,25 @@ struct llvm::TimeTraceProfiler {
// Minimum time granularity (in microseconds)
const unsigned TimeTraceGranularity;
+
+ // Make time trace capture verbose event details (eg. source filenames). This
ilya-biryukov wrote:
NIT: `e.g. `
@@ -83,16 +83,27 @@ namespace llvm {
class raw_pwrite_stream;
+struct TimeTraceMetadata {
ilya-biryukov wrote:
Could we also include the line numbers?
I suspect it would be trivial to add that, but we will have an option of
pointing at an exact line in the
@@ -60,39 +74,65 @@ bool compileFromString(StringRef Code, StringRef Standard,
StringRef FileName) {
return Compiler.ExecuteAction(Action);
}
+std::string GetMetadata(json::Object *Event) {
+ std::string Metadata = "";
+ if (json::Object *Args = Event->getObject("args"))
@@ -83,16 +83,27 @@ namespace llvm {
class raw_pwrite_stream;
+struct TimeTraceMetadata {
+ std::string Detail;
+ // Source file information for the event.
+ std::string Filename;
ilya-biryukov wrote:
NIT: Maybe use `File` here and `file` in JSON for brev
@@ -60,39 +74,65 @@ bool compileFromString(StringRef Code, StringRef Standard,
StringRef FileName) {
return Compiler.ExecuteAction(Action);
}
+std::string GetMetadata(json::Object *Event) {
+ std::string Metadata = "";
+ if (json::Object *Args = Event->getObject("args"))
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/98320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov commented:
A few more suggestions, and happy to approve as soon as the question about
source events gets resolved.
https://github.com/llvm/llvm-project/pull/98320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -3426,11 +3426,16 @@ Sema::InstantiateClass(SourceLocation
PointOfInstantiation,
return true;
llvm::TimeTraceScope TimeScope("InstantiateClass", [&]() {
-std::string Name;
-llvm::raw_string_ostream OS(Name);
+llvm::TimeTraceMetadata M;
+llvm::raw_stri
@@ -38,14 +42,24 @@ std::string teardownProfiler() {
// Returns true if code compiles successfully.
// We only parse AST here. This is enough for constexpr evaluation.
-bool compileFromString(StringRef Code, StringRef Standard, StringRef FileName)
{
+bool compileFromString(St
@@ -3426,11 +3426,16 @@ Sema::InstantiateClass(SourceLocation
PointOfInstantiation,
return true;
llvm::TimeTraceScope TimeScope("InstantiateClass", [&]() {
-std::string Name;
-llvm::raw_string_ostream OS(Name);
+llvm::TimeTraceMetadata M;
+llvm::raw_stri
ilya-biryukov wrote:
This still fails on Windows, see the buildkite errors.
I believe the `filename(..., style::posix)` does not do what you intend, it
actually assumes the inputs are in posix format, which is not the case on
Windows. You want to use the native style
https://github.com/llvm/ll
@@ -60,13 +75,29 @@ bool compileFromString(StringRef Code, StringRef Standard,
StringRef FileName) {
return Compiler.ExecuteAction(Action);
}
+std::string GetMetadata(json::Object *Event) {
+ std::string Metadata;
+ llvm::raw_string_ostream OS(Metadata);
+ if (json::Obje
https://github.com/ilya-biryukov approved this pull request.
LGTM, thanks
https://github.com/llvm/llvm-project/pull/99545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov created
https://github.com/llvm/llvm-project/pull/99880
This addresses the FIXME in the code. There are tests for the new behavior in a
follow up fix for #99877, which also addresses other bugs that prevent exposing
the wrong results of `ContainsUnexpandedPac
https://github.com/ilya-biryukov created
https://github.com/llvm/llvm-project/pull/99882
This addresses a crash in https://github.com/llvm/llvm-project/issues/99877
that happens on nested lambdas that use
template parameter packs, see the added test.
Before this patch, the code computing the '
ilya-biryukov wrote:
This PR also includes changes from #99880, which I separated into another
commit to simplify the review as this PR is a bit involved.
https://github.com/llvm/llvm-project/pull/99882
___
cfe-commits mailing list
cfe-commits@lists.l
@@ -81,7 +81,6 @@ std::string GetMetadata(json::Object *Event) {
if (json::Object *Args = Event->getObject("args")) {
if (auto Detail = Args->getString("detail"))
OS << Detail;
-// Use only filename to not include os-specific path separators.
il
@@ -152,7 +152,13 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool
SkipFunctionBodies) {
bool HaveLexer = S.getPreprocessor().getCurrentLexer();
if (HaveLexer) {
-llvm::TimeTraceScope TimeScope("Frontend");
+llvm::TimeTraceScope TimeScope("Frontend", [&]() {
@@ -209,7 +208,7 @@ constexpr int slow_init_list[] = {1, 1, 2, 3, 5, 8, 13,
21}; // 25th line
ASSERT_TRUE(compileFromString(Code, "-std=c++20", "test.cc"));
std::string Json = teardownProfiler();
ASSERT_EQ(R"(
-Frontend
+Frontend (, test.cc)
ilya-biryuko
ilya-biryukov wrote:
> At first glance this seems like a duplicate of #86265
That seems right, I was not aware of the other PR, thanks for pointing this out.
I still feel that avoiding the use of the flag from `LambdaScopeInfo` is an
overall improvement that makes the code simpler, but the othe
ilya-biryukov wrote:
Just FYI, I wasn't aware of this PR and have ended up with an alternative
approach to tracking the unexpanded packs in #99882. (Thanks @cor3ntin for
pointing this out)
I'll let the reviewers decide if we should go with this change or mine, also
happy to have some combinat
https://github.com/ilya-biryukov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/99866
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ilya-biryukov wrote:
> I think I prefer the approach chosen by @zyn0217.
>
> The changes are more targeted, and using a visitor for the call operator
> avoid a lot of code duplication. In particular, if we want to properly handle
> attributes, we might need code in `CollectUnexpandedParameterP
@@ -353,7 +353,11 @@ Sema::DiagnoseUnexpandedParameterPacks(SourceLocation Loc,
}
if (!EnclosingStmtExpr) {
-LSI->ContainsUnexpandedParameterPack = true;
+// It is ok to have unexpanded packs in captures, template parameters
+// and paramete
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/99882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/106241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov requested changes to this pull request.
This looks good, but I wanted to explore if we could write a unit test for
this...
https://github.com/llvm/llvm-project/pull/106241
___
cfe-commits mailing list
cfe-commits@lists
@@ -350,6 +350,7 @@ void SourceManager::clearIDTables() {
LastLineNoContentCache = nullptr;
LastFileIDLookup = FileID();
+ IncludedLocMap.clear();
ilya-biryukov wrote:
Is there a way to write a unit test checking this behavior?
SourceManager should be r
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/106277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov commented:
Suggestion: could we update the PR title to say something like "Output location
in separate fields of `-ftime-trace`"?
"properly" is open to interpretation and requires reading the full change
description.
https://github.com/llvm/llvm-project/pull/1
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy
Parser::ParseDeclarationOrFunctionDefinition(
// Add an enclosing time trace scope for a bunch of small scopes with
// "EvaluateAsConstExpr".
llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]()
{
-
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy
Parser::ParseDeclarationOrFunctionDefinition(
// Add an enclosing time trace scope for a bunch of small scopes with
// "EvaluateAsConstExpr".
llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]()
{
-
@@ -223,15 +223,15 @@ Frontend (test.cc)
| | | | EvaluateAsRValue ()
| | | EvaluateAsBooleanCondition ()
| | | | EvaluateAsRValue ()
-| ParseDeclarationOrFunctionDefinition (test.cc:16:1)
+| ParseDeclarationOrFunctionDefinition (test.cc:16)
| | ParseFunctionDefinition (slow_te
@@ -1255,8 +1256,12 @@ Parser::DeclGroupPtrTy
Parser::ParseDeclarationOrFunctionDefinition(
// Add an enclosing time trace scope for a bunch of small scopes with
// "EvaluateAsConstExpr".
llvm::TimeTraceScope TimeScope("ParseDeclarationOrFunctionDefinition", [&]()
{
-
https://github.com/ilya-biryukov requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/103039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -92,13 +94,17 @@ struct TimeTraceMetadata {
bool isEmpty() const { return Detail.empty() && File.empty(); }
};
+struct TimeTraceProfilerEntry;
ilya-biryukov wrote:
The idea of sharing most code and configuring only the relevant bits we need to
write for
@@ -104,6 +105,23 @@ struct llvm::TimeTraceProfilerEntry {
}
};
+struct InProgressEntry {
+ std::unique_ptr Event;
ilya-biryukov wrote:
Could we store it directly as `TimeTraceProfilerEntry` without unique_ptr?
We are already creating `InProgressEntry` in
https://github.com/ilya-biryukov commented:
I have left quite a few comments, but they are mostly about the code style.
I think this looks really good overall and almost ready to land.
Could you split the change to Sema into a separate PR so that we have time
profiler changes separately?
https
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/103039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -75,18 +76,18 @@ struct llvm::TimeTraceProfilerEntry {
const std::string Name;
TimeTraceMetadata Metadata;
- const bool AsyncEvent = false;
+ TimeTraceEventType EventType;
ilya-biryukov wrote:
Let's assign the default to avoid accidentally having uni
@@ -104,6 +105,23 @@ struct llvm::TimeTraceProfilerEntry {
}
};
+struct InProgressEntry {
+ std::unique_ptr Event;
+ std::vector InstantEvents;
+
+ InProgressEntry(TimePointType &&S, TimePointType &&E, std::string &&N,
+ std::string &&Dt, TimeTraceEventTy
@@ -83,6 +83,8 @@ namespace llvm {
class raw_pwrite_stream;
+enum class TimeTraceEventType { CompleteEvent, InstantEvent, AsyncEvent };
ilya-biryukov wrote:
It would be useful to add a comment explaining what different event types are
about (e.g. it would m
@@ -104,6 +105,23 @@ struct llvm::TimeTraceProfilerEntry {
}
};
+struct InProgressEntry {
+ std::unique_ptr Event;
+ std::vector InstantEvents;
+
+ InProgressEntry(TimePointType &&S, TimePointType &&E, std::string &&N,
ilya-biryukov wrote:
Suggestion: re
@@ -406,34 +450,50 @@ TimeTraceProfilerEntry
*llvm::timeTraceProfilerBegin(StringRef Name,
StringRef Detail) {
if (TimeTraceProfilerInstance != nullptr)
return TimeTraceProfilerInstance->begin(
-std::string(Nam
@@ -194,13 +236,15 @@ struct llvm::TimeTraceProfiler {
J.attribute("pid", Pid);
J.attribute("tid", int64_t(Tid));
J.attribute("ts", StartUs);
-if (E.AsyncEvent) {
+if (TimeTraceEventType::AsyncEvent == E.EventType) {
J.attribut
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/106241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov approved this pull request.
LGMT with a small suggestion.
Thanks for getting the test in!
https://github.com/llvm/llvm-project/pull/106241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
@@ -453,6 +454,61 @@ TEST_F(SourceManagerTest,
loadedSLocEntryIsInTheSameTranslationUnit) {
#if defined(LLVM_ON_UNIX)
+TEST_F(SourceManagerTest, ResetsIncludeLocMap) {
ilya-biryukov wrote:
Suggestion: add a comment explaining what this aims to test at a mor
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/102040
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov commented:
I hope folks are ok with me chiming in as a reviewer for this.
I've left quite a few comments in the RFC and is also supportive of landing
this change and happy to invest into supporting it going forward inside our
team.
https://github.com/llvm/llvm-
@@ -1472,3 +1472,25 @@ template struct Outer {
};
};
Outer::Inner outerinner;
+
+void aggregate() {
+ struct B {
+[[clang::explicit_init]] int f1;
+ };
+
+ struct S : B { // expected-warning {{uninitialized}}
+int f2;
+int f3 [[clang::explicit_init]];
+ };
+
+
@@ -1419,6 +1419,28 @@ is not specified.
}];
}
+def ExplicitInitDocs : Documentation {
+ let Category = DocCatField;
+ let Content = [{
+The ``clang::explicit_init`` attribute indicates that the field must be
+initialized explicitly by the caller when the class is construc
@@ -534,6 +534,8 @@ TEST(WalkAST, Enums) {
testWalk(R"(namespace ns { enum E { A = 42 }; }
struct S { using ns::E::A; };)",
"int e = S::^A;");
+ testWalk(R"(namespace ns { enum E { $explicit^A = 42 }; })",
+ "namespace z = ns; int e = z::^A
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/106706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov approved this pull request.
LGTM. See a small suggestion about adding another test too.
https://github.com/llvm/llvm-project/pull/106706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
https://github.com/ilya-biryukov created
https://github.com/llvm/llvm-project/pull/106730
…e arguments
This allows to deduplicate the type lists efficiently in C++. It is possible to
achieve the same effect via template metaprogramming, but performance of the
resulting code is much lower than
https://github.com/ilya-biryukov updated
https://github.com/llvm/llvm-project/pull/106730
>From 0151fbf9a8cea2d1c60dc399f088258dd94ad562 Mon Sep 17 00:00:00 2001
From: Ilya Biryukov
Date: Fri, 23 Aug 2024 17:27:26 +0200
Subject: [PATCH 1/2] [Clang] Add __type_list_dedup builtin to deduplicate
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/106706
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov approved this pull request.
Still LGTM. See one minor comment about the code style, but up to you if you
want to apply it or not.
https://github.com/llvm/llvm-project/pull/106706
___
cfe-commits mailing list
cfe-commit
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor {
//
// If it's an enum constant, it must be due to prior decl. Report
references
// to it when qualifier isn't a type.
-if (llvm::isa(FD)) {
- if (!DRE->getQualifier() || DRE->getQualifier(
@@ -534,6 +534,8 @@ TEST(WalkAST, Enums) {
testWalk(R"(namespace ns { enum E { A = 42 }; }
struct S { using ns::E::A; };)",
"int e = S::^A;");
+ testWalk(R"(namespace ns { enum E { $explicit^A = 42 }; })",
+ "namespace z = ns; int e = z::^A
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor {
//
// If it's an enum constant, it must be due to prior decl. Report
references
// to it when qualifier isn't a type.
-if (llvm::isa(FD)) {
- if (!DRE->getQualifier() || DRE->getQualifier(
ilya-biryukov wrote:
RFC for this change:
https://discourse.llvm.org/t/rfc-adding-builtin-for-deduplicating-type-lists/80986
https://github.com/llvm/llvm-project/pull/106730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
@@ -146,9 +148,24 @@ class ASTWalker : public RecursiveASTVisitor {
//
// If it's an enum constant, it must be due to prior decl. Report
references
// to it when qualifier isn't a type.
-if (llvm::isa(FD)) {
- if (!DRE->getQualifier() || DRE->getQualifier(
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/98320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov commented:
Are we worried about the increase in the output file sizes?
https://github.com/llvm/llvm-project/pull/98320
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation
PointOfInstantiation,
llvm::raw_string_ostream OS(Name);
Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(),
/*Qualified=*/true);
+OS << ", file:" << Source
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation
PointOfInstantiation,
llvm::raw_string_ostream OS(Name);
ilya-biryukov wrote:
Should we do this for other things?
Most of the nodes are likely to have a source location they can be attributed
to.
@@ -3430,6 +3430,7 @@ Sema::InstantiateClass(SourceLocation
PointOfInstantiation,
llvm::raw_string_ostream OS(Name);
Instantiation->getNameForDiagnostic(OS, getPrintingPolicy(),
/*Qualified=*/true);
+OS << ", file:" << Source
ilya-biryukov wrote:
Adding @kadircet to continue the review where Sam left off.
Unfortunately, Sam does not have the capacity to finish this review.
https://github.com/llvm/llvm-project/pull/66462
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
ilya-biryukov wrote:
Sorry for loosing track of this change. I will go through the comments and try
to land this some time next week.
https://github.com/llvm/llvm-project/pull/79875
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
ilya-biryukov wrote:
🤯 amazingly, this only happens when the identifier being called is a lowercase
version of the class name:
https://gcc.godbolt.org/z/8aoaoPKnT:
```cpp
template
class Clone {
public:
Clone(const Clone&);
T* operator->() const;
T* ptr_;
};
template
struct F
ilya-biryukov wrote:
Heh, of course! Now that you say it, that's quite obvious.
Do you think is fix is just around the corner or will it take a long time?
This blocks our internal compiler release and there is no workaround we could
easily employ.
https://github.com/llvm/llvm-project/pull/9015
ilya-biryukov wrote:
Awesome, thanks a lot for looking into it!
https://github.com/llvm/llvm-project/pull/90152
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ilya-biryukov wrote:
A few comments from me to move this review forward.
The major question I have is about the tests and how reference members should
affect the results of that trait.
https://github.com/llvm/llvm-project/pull/86512
___
cfe-commits ma
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
@@ -3958,6 +3958,50 @@ Note that the `size` argument must be a compile time
constant.
Note that this intrinsic cannot yet be called in a ``constexpr`` context.
+``__is_bitwise_cloneable``
+-
+
+A type trait is used to check whether a type can be safel
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s
+
+// Scalar types are bitwise clonable.
+static_assert(__is_bitwise_cloneable(int));
+static_assert(__is_bitwise_cloneable(int*));
+// array
+static_assert(__is_bitwise_cloneable(int[10]));
+
+// non-scalar
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
&Context) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType = getCa
@@ -2718,6 +2718,36 @@ bool QualType::isTriviallyCopyableType(const ASTContext
&Context) const {
/*IsCopyConstructible=*/false);
}
+bool QualType::isBitwiseCloneableType(const ASTContext & Context) const {
+ QualType CanonicalType = getCa
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/86512
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
901 - 1000 of 1460 matches
Mail list logo