https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/93229
>From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 23 May 2024 14:55:16 -0400
Subject: [PATCH 1/5] Diagnose problematic diagnostic messages
Clang has
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/93229
>From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 23 May 2024 14:55:16 -0400
Subject: [PATCH 1/4] Diagnose problematic diagnostic messages
Clang has
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/93229
>From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 23 May 2024 14:55:16 -0400
Subject: [PATCH 1/3] Diagnose problematic diagnostic messages
Clang has
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/93229
>From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 23 May 2024 14:55:16 -0400
Subject: [PATCH 1/3] Diagnose problematic diagnostic messages
Clang has
@@ -1355,7 +1357,7 @@ static void verifyDiagnosticWording(const Record ) {
if (isDigit(FullDiagText.back()) && *(FullDiagText.end() - 2) == '}') {
// Scan backwards to find the opening curly brace.
size_t BraceCount = 1;
-auto Iter = FullDiagText.end() - /*}0*/
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/93229
>From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 23 May 2024 14:55:16 -0400
Subject: [PATCH 1/2] Diagnose problematic diagnostic messages
Clang has
@@ -1213,6 +1213,194 @@ static bool isRemark(const Record ) {
return ClsName == "CLASS_REMARK";
}
+// Presumes the text has been split at the first whitespace or hyphen.
+static bool isExemptAtStart(StringRef Text) {
+ // Fast path, the first character is lowercase or not
https://github.com/AaronBallman updated
https://github.com/llvm/llvm-project/pull/93229
>From 38d6d9b809e1cf9d6a8f577630c838421486cd04 Mon Sep 17 00:00:00 2001
From: Aaron Ballman
Date: Thu, 23 May 2024 14:55:16 -0400
Subject: [PATCH] Diagnose problematic diagnostic messages
Clang has some
Author: Aaron Ballman
Date: 2024-05-23T15:52:15-04:00
New Revision: 10be6c96b831a3511d2b381d5e1130d6b7e3e2ff
URL:
https://github.com/llvm/llvm-project/commit/10be6c96b831a3511d2b381d5e1130d6b7e3e2ff
DIFF:
https://github.com/llvm/llvm-project/commit/10be6c96b831a3511d2b381d5e1130d6b7e3e2ff.diff
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/93229
Clang has some unwritten rules about diagnostic wording regarding things like
punctuation and capitalization. This patch documents those rules and adds some
tablegen support for checking diagnostics follow
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/93190
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10362,12 +10362,12 @@ def err_shufflevector_argument_too_large : Error<
"index for __builtin_shufflevector must be less than the total number "
"of vector elements">;
def err_shufflevector_minus_one_is_undefined_behavior_constexpr : Error<
- "index for
@@ -4526,7 +4526,7 @@ def err_objc_attr_typedef_not_void_pointer : Error<
def err_objc_cf_bridged_not_interface : Error<
"CF object of type %0 is bridged to %1, which is not an Objective-C class">;
def err_objc_ns_bridged_invalid_cfobject : Error<
- "ObjectiveC object of
https://github.com/AaronBallman approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/93187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/93187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
Despite not showing up in the list of precommit CI checks for some reason, this
did pass testing:
https://buildkite.com/llvm-project/github-pull-requests/builds/66650
https://github.com/llvm/llvm-project/pull/93190
___
@@ -337,7 +337,7 @@ def warn_atomic_op_oversized : Warning<
InGroup;
def warn_sync_op_misaligned : Warning<
- "__sync builtin operation MUST have natural alignment (consider using
__atomic).">,
+ "__sync builtin operation MUST have natural alignment (consider using
AaronBallman wrote:
All of the issues were found using some new tooling I've not yet put up for
review. The changes were largely mechanical (uppercase->lowercase, remove
trailing punctuation), but there were some surgical fixes to grammar,
punctuation, etc. Also, if the diagnostic was not
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/93077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/93077
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Aaron Ballman
Date: 2024-05-22T13:43:34-04:00
New Revision: cc3b6c3ba9c0dd7df0fd7ac23c8609c4675dd62a
URL:
https://github.com/llvm/llvm-project/commit/cc3b6c3ba9c0dd7df0fd7ac23c8609c4675dd62a
DIFF:
https://github.com/llvm/llvm-project/commit/cc3b6c3ba9c0dd7df0fd7ac23c8609c4675dd62a.diff
Author: Aaron Ballman
Date: 2024-05-22T13:17:56-04:00
New Revision: f203cb03d93240cfd79e603b742006f96227a00b
URL:
https://github.com/llvm/llvm-project/commit/f203cb03d93240cfd79e603b742006f96227a00b
DIFF:
https://github.com/llvm/llvm-project/commit/f203cb03d93240cfd79e603b742006f96227a00b.diff
@@ -3123,10 +3172,28 @@ bool ByteCodeExprGen::VisitCallExpr(const
CallExpr *E) {
}
}
+ std::optional CalleeOffset;
// Add the (optional, implicit) This pointer.
if (const auto *MC = dyn_cast(E)) {
-if (!this->visit(MC->getImplicitObjectArgument()))
-
@@ -0,0 +1,112 @@
+//===- MemberPointer.h --*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,112 @@
+//===- MemberPointer.h --*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,112 @@
+//===- MemberPointer.h --*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -3123,10 +3172,28 @@ bool ByteCodeExprGen::VisitCallExpr(const
CallExpr *E) {
}
}
+ std::optional CalleeOffset;
// Add the (optional, implicit) This pointer.
if (const auto *MC = dyn_cast(E)) {
-if (!this->visit(MC->getImplicitObjectArgument()))
-
AaronBallman wrote:
It gets set a few lines down for `Compound`:
`Compound = AllowDeclarationsInC | AllowStandaloneOpenMPDirectives`
https://github.com/llvm/llvm-project/pull/92908
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Author: Aaron Ballman
Date: 2024-05-21T15:14:03-04:00
New Revision: 87a6865d2c8eba802a7e9f42fa8b6ac1edd0664e
URL:
https://github.com/llvm/llvm-project/commit/87a6865d2c8eba802a7e9f42fa8b6ac1edd0664e
DIFF:
https://github.com/llvm/llvm-project/commit/87a6865d2c8eba802a7e9f42fa8b6ac1edd0664e.diff
Author: Aaron Ballman
Date: 2024-05-21T15:03:26-04:00
New Revision: 32cf7a25f2f8174bc448ae7032e419dc0375fd6a
URL:
https://github.com/llvm/llvm-project/commit/32cf7a25f2f8174bc448ae7032e419dc0375fd6a
DIFF:
https://github.com/llvm/llvm-project/commit/32cf7a25f2f8174bc448ae7032e419dc0375fd6a.diff
Author: Aaron Ballman
Date: 2024-05-21T15:01:13-04:00
New Revision: 01c600dec6f506ae305abf04cf955e08aa59b234
URL:
https://github.com/llvm/llvm-project/commit/01c600dec6f506ae305abf04cf955e08aa59b234
DIFF:
https://github.com/llvm/llvm-project/commit/01c600dec6f506ae305abf04cf955e08aa59b234.diff
Author: Aaron Ballman
Date: 2024-05-21T14:47:15-04:00
New Revision: ce1d28e645b53ba9518d295dad35a4578dd8e8dc
URL:
https://github.com/llvm/llvm-project/commit/ce1d28e645b53ba9518d295dad35a4578dd8e8dc
DIFF:
https://github.com/llvm/llvm-project/commit/ce1d28e645b53ba9518d295dad35a4578dd8e8dc.diff
@@ -8497,7 +8498,8 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange,
SourceRange ExprRange,
<< 0 << AdjustedNumArgs << static_cast(Args.size())
<< /*is non object*/ 0 << ExprRange;
return ExprError();
- } else if (Args.size() > AdjustedNumArgs) {
@@ -8544,6 +8546,13 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange,
SourceRange ExprRange,
}
}
+ // pointer to object of size zero is not allowed
AaronBallman wrote:
```suggestion
// Pointer to object of size zero is not allowed.
```
@@ -330,6 +330,9 @@ def warn_atomic_op_misaligned : Warning<
"; the expected alignment (%0 bytes) exceeds the actual alignment (%1
bytes)">,
InGroup;
+def err_atomic_op_size_zero : Error<
AaronBallman wrote:
Rather than introduce a new diagnostic, I
https://github.com/AaronBallman commented:
Thank you for the fix! Please be sure to add a release note to
clang/docs/ReleaseNotes.rst so users know about the improved behavior.
https://github.com/llvm/llvm-project/pull/91057
___
cfe-commits mailing
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/91057
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -269,7 +267,10 @@ const char *const Runtimes = R"(
void __clang_Interpreter_SetValueCopyArr(const T (*Src)[N], void*
Placement, unsigned long Size) {
__clang_Interpreter_SetValueCopyArr(Src[0], Placement, Size);
}
+extern "C"
AaronBallman
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/89811
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM, feel free to apply my suggestion if you like it.
https://github.com/llvm/llvm-project/pull/89811
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/89811
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -42,6 +42,9 @@
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
+
+#include
AaronBallman wrote:
`` instead?
https://github.com/llvm/llvm-project/pull/89811
https://github.com/AaronBallman commented:
Generally looks good, but it seems that some parts of this PR are also
incorporated into another PR, so it's a bit hard to review.
https://github.com/llvm/llvm-project/pull/89811
___
cfe-commits mailing list
AaronBallman wrote:
> > I have no idea whether that returns a `SourceLocation`, a `PresumedLoc`, a
> > `FullSourceLoc`, etc, so I don't think that is a use of `auto` I would want
> > to have to reason about as a reviewer. That said, if the only use of `loc`
> > is: `Diag(loc,
AaronBallman wrote:
> What part of the "camelBack" is visible to the user of the API? (we're not
> talking about method names or class names here I believe)
Parameter names, which show up in tooltips in IDEs, etc.
But again, the important thing is to at least be self-consistent. e.g.,
```
https://github.com/AaronBallman approved this pull request.
LGTM with a possible improvement in the code (take it or leave it, your call).
https://github.com/llvm/llvm-project/pull/89804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit
) {
}
}
}
+
+ // FIXME: We should de-allocate MostRecentTU
+ for (Decl *D : MostRecentTU->decls()) {
+auto *ND = dyn_cast(D);
+if (!ND)
+ continue;
+// Check if we
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/89804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/92674
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
https://github.com/llvm/llvm-project/pull/92674
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1459,11 +1460,11 @@ static AccessResult CheckEffectiveAccess(Sema ,
llvm_unreachable("invalid access result");
}
-static Sema::AccessResult CheckAccess(Sema , SourceLocation Loc,
- AccessTarget ) {
+static SemaAccess::AccessResult
https://github.com/AaronBallman commented:
Also, please be sure to add a release note about the new functionality.
https://github.com/llvm/llvm-project/pull/91306
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/91306
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1176,6 +1176,12 @@ def ConvertVector : Builtin {
let Prototype = "void(...)";
}
+def SelectVector : Builtin {
+ let Spellings = ["__builtin_selectvector"];
+ let Attributes = [NoThrow, Const, CustomTypeChecking];
AaronBallman wrote:
Should this also
@@ -3013,6 +3013,62 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl,
unsigned BuiltinID,
break;
}
+ case Builtin::BI__builtin_selectvector: {
+if (checkArgCount(*this, TheCall, 3))
+ return ExprError();
+
+ExprResult LHS = TheCall->getArg(0);
+
@@ -3013,6 +3013,62 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl,
unsigned BuiltinID,
break;
}
+ case Builtin::BI__builtin_selectvector: {
+if (checkArgCount(*this, TheCall, 3))
+ return ExprError();
+
+ExprResult LHS = TheCall->getArg(0);
+
AaronBallman wrote:
I'm less certain, but CC @jdoerfert @mikerice1969 for more opinions.
The original changes actually fixed a bug in OpenMP related to standalone
directives.
> Note, this seems to have fixed an issue with some OpenMP stand-alone
directives not being properly diagnosed as per:
https://github.com/AaronBallman commented:
The changes generally LG, but there's a merge conflict preventing the PR from
going through precommit CI.
https://github.com/llvm/llvm-project/pull/92767
___
cfe-commits mailing list
@@ -2092,8 +2096,8 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
LLVM_PREFERRED_TYPE(TypeBitfields)
unsigned : NumTypeBits;
-LLVM_PREFERRED_TYPE(bool)
-unsigned IsUnqual : 1; // If true: typeof_unqual, else: typeof
+
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/92767
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -92,3 +92,35 @@ extern __attribute__((address_space(0))) int
type_attr_test_2; // expec
void invalid_param_fn(__attribute__((address_space(1))) int i); //
expected-error {{parameter may not be qualified with an address space}}
typeof(invalid_param_fn)
https://github.com/AaronBallman created
https://github.com/llvm/llvm-project/pull/92908
This fixes a regression introduced in 8bd06d5b65845e5e01dd899a2deb773580460b89
where Clang began to accept a declaration where a statement is required. e.g.,
```
if (1)
int x; // Previously accepted, now
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/92646
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/92646
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
AaronBallman wrote:
FWIW, I landed 3591da9f1ccbd8b19fef4814f96638dbbe9c2b40 to address testing
issues on Windows.
https://github.com/llvm/llvm-project/pull/91446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Author: Aaron Ballman
Date: 2024-05-20T14:23:17-04:00
New Revision: 3591da9f1ccbd8b19fef4814f96638dbbe9c2b40
URL:
https://github.com/llvm/llvm-project/commit/3591da9f1ccbd8b19fef4814f96638dbbe9c2b40
DIFF:
https://github.com/llvm/llvm-project/commit/3591da9f1ccbd8b19fef4814f96638dbbe9c2b40.diff
@@ -68,7 +68,7 @@ function compute-projects-to-test() {
done
;;
clang)
- for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do
+ for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
AaronBallman wrote:
@@ -68,7 +68,7 @@ function compute-projects-to-test() {
done
;;
clang)
- for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do
+ for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
AaronBallman wrote:
@@ -68,7 +68,7 @@ function compute-projects-to-test() {
done
;;
clang)
- for p in clang-tools-extra compiler-rt flang lldb cross-project-tests; do
+ for p in clang-tools-extra compiler-rt lldb cross-project-tests; do
AaronBallman wrote:
https://github.com/AaronBallman commented:
Please add more of a description to the patch summary so it's clear why these
changes are being made.
https://github.com/llvm/llvm-project/pull/92740
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit
) {
}
}
}
+
+ // FIXME: We should de-allocate MostRecentTU
+ for (Decl *D : MostRecentTU->decls()) {
+if (!isa(D))
+ continue;
+// Check if we need to clean up the
@@ -2282,7 +2282,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) {
// Remove this name from our lexical scope, and warn on it if we haven't
// already.
-IdResolver.RemoveDecl(D);
+if (!PP.isIncrementalProcessingEnabled())
+
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit
) {
}
}
}
+
+ // FIXME: We should de-allocate MostRecentTU
+ for (Decl *D : MostRecentTU->decls()) {
+if (!isa(D))
+ continue;
+// Check if we need to clean up the
AaronBallman wrote:
> What is the goal here?
The eventual goal is for Sema to have appropriate layering instead of being a
monolithic design. "Appropriate layering" can be handled in many different
ways, but the goal when this was discussed extensively in the past was to split
by "category"
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/92311
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/92277
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2282,7 +2282,8 @@ void Sema::ActOnPopScope(SourceLocation Loc, Scope *S) {
// Remove this name from our lexical scope, and warn on it if we haven't
// already.
-IdResolver.RemoveDecl(D);
+if (!PP.isIncrementalProcessingEnabled())
+
@@ -407,6 +406,16 @@ void IncrementalParser::CleanUpPTU(PartialTranslationUnit
) {
}
}
}
+
+ // FIXME: We should de-allocate MostRecentTU
+ for (Decl *D : MostRecentTU->decls()) {
+if (!isa(D))
+ continue;
+// Check if we need to clean up the
https://github.com/AaronBallman approved this pull request.
LGTM!
https://github.com/llvm/llvm-project/pull/92452
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
AaronBallman wrote:
Present Aaron thanks you and Past Aaron apologized
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
https://github.com/AaronBallman closed
https://github.com/llvm/llvm-project/pull/92442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1527,20 +1527,20 @@ struct DeclaratorChunk {
/// Retrieve the location of the 'const' qualifier.
SourceLocation getConstQualifierLoc() const {
- assert(MethodQualifiers);
- return MethodQualifiers->getConstSpecLoc();
+ return MethodQualifiers ?
@@ -9203,15 +9203,15 @@ static NamedDecl *DiagnoseInvalidRedeclaration(
<< Idx << FDParam->getType()
<< NewFD->getParamDecl(Idx - 1)->getType();
} else if (FDisConst != NewFDisConst) {
- SemaRef.Diag(FD->getLocation(),
@@ -487,6 +487,9 @@ Improvements to Clang's diagnostics
}
};
+- Clang emits a ``-Wparentheses`` warning for expressions with consecutive
comparisons like ``x < y < z``.
+ It was made a ``-Wparentheses`` warning to be consistent with gcc.
https://github.com/AaronBallman approved this pull request.
LGTM aside from a small nit with the release notes.
https://github.com/llvm/llvm-project/pull/92200
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/AaronBallman edited
https://github.com/llvm/llvm-project/pull/92200
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -215,3 +215,10 @@ namespace PR20735 {
// fix-it:"{{.*}}":{[[@LINE-9]]:20-[[@LINE-9]]:20}:")"
}
}
+
+void consecutive_builtin_compare(int x, int y, int z) {
+ (void)(x < y < z); // expected-warning {{comparisons like 'X<=Y<=Z' don't
have their mathematical meaning}}
@@ -7963,6 +7968,154 @@ static Attr *getCCTypeAttr(ASTContext , ParsedAttr
) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
AaronBallman wrote:
Yeah, Present Aaron regrets Past Aaron's caution
@@ -1435,6 +1435,38 @@ def CXX11NoReturn : InheritableAttr {
let Documentation = [CXX11NoReturnDocs];
}
+def NonBlocking : TypeAttr {
+ let Spellings = [CXX11<"clang", "nonblocking">,
AaronBallman wrote:
CC @erichkeane
`clang_builtin_alias` is the only
@@ -4381,11 +4381,13 @@ class PackIndexingExpr final
PackIndexingExpr(QualType Type, SourceLocation EllipsisLoc,
SourceLocation RSquareLoc, Expr *PackIdExpr, Expr
*IndexExpr,
- ArrayRef SubstitutedExprs = {})
+
@@ -7963,6 +7968,154 @@ static Attr *getCCTypeAttr(ASTContext , ParsedAttr
) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+
@@ -5028,3 +5060,263 @@ void AutoType::Profile(llvm::FoldingSetNodeID ,
const ASTContext ) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind
@@ -7963,6 +7968,154 @@ static Attr *getCCTypeAttr(ASTContext , ParsedAttr
) {
llvm_unreachable("unexpected attribute kind!");
}
+std::optional
+Sema::ActOnEffectExpression(Expr *CondExpr, StringRef AttributeName) {
+ auto BadExpr = [&]() {
+
@@ -5028,3 +5060,263 @@ void AutoType::Profile(llvm::FoldingSetNodeID ,
const ASTContext ) {
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
getTypeConstraintConcept(), getTypeConstraintArguments());
}
+
+FunctionEffect::Kind
@@ -4639,6 +4645,303 @@ class FunctionNoProtoType : public FunctionType, public
llvm::FoldingSetNode {
}
};
+//
--
+
+/// Represents an abstract function effect, using just an enumeration
@@ -3649,6 +3649,35 @@ FunctionProtoType::FunctionProtoType(QualType result,
ArrayRef params,
auto = *getTrailingObjects();
EllipsisLoc = epi.EllipsisLoc;
}
+
+ if (!epi.FunctionEffects.empty()) {
+auto = *getTrailingObjects();
+const size_t EffectsCount
@@ -2743,3 +2759,153 @@ bool Sema::isDeclaratorFunctionLike(Declarator ) {
});
return Result;
}
+
+FunctionEffectDifferences::FunctionEffectDifferences(
+const FunctionEffectsRef , const FunctionEffectsRef ) {
+
+ FunctionEffectsRef::iterator POld = Old.begin();
+
1 - 100 of 4748 matches
Mail list logo