[clang] [clang] Remove update_options_td_flags.py (PR #95909)

2024-06-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/95909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
@@ -576,13 +576,18 @@ template static bool isFirstInExternCContext(T *D) { return First->isInExternCContext(); } -static bool isSingleLineLanguageLinkage(const Decl ) { - if (const auto *SD = dyn_cast(D.getDeclContext())) -if (!SD->hasBraces()) - return true;

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM with another small improvement that could be made. https://github.com/llvm/llvm-project/pull/93913 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-18 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -2380,7 +2380,7 @@ FunctionDecl *Sema::CreateBuiltin(IdentifierInfo *II, QualType Type, } FunctionDecl *New = FunctionDecl::Create(Context, Parent, Loc, Loc, II, Type, - /*TInfo=*/nullptr, SC_Extern, +

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -6286,7 +6286,7 @@ static FunctionDecl *rewriteBuiltinFunctionDecl(Sema *Sema, ASTContext , FunctionDecl *OverloadDecl = FunctionDecl::Create( Context, Parent, FDecl->getLocation(), FDecl->getLocation(), FDecl->getIdentifier(), OverloadTy, -

[clang] [lldb] [clang][AST] fix ast-print of extern with >=2 declarators, fixed (PR #93913)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -576,13 +576,19 @@ template static bool isFirstInExternCContext(T *D) { return First->isInExternCContext(); } -static bool isSingleLineLanguageLinkage(const Decl ) { - if (const auto *SD = dyn_cast(D.getDeclContext())) +static bool isUnbracedLanguageLinkage(const

[clang] [clang-tools-extra] [llvm] [mlir] [clang][lldb][mlir] Fix some identical sub-expressions warnings (NFC) (PR #95715)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -96,7 +96,7 @@ bool areStatementsIdentical(const Stmt *FirstStmt, const Stmt *SecondStmt, if (FirstStmt == SecondStmt) return true; - if (FirstStmt->getStmtClass() != FirstStmt->getStmtClass()) + if (FirstStmt->getStmtClass() != SecondStmt->getStmtClass())

[clang] [clang-tools-extra] [llvm] [mlir] [clang][lldb][mlir] Fix some identical sub-expressions warnings (NFC) (PR #95715)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -4368,7 +4368,7 @@ bool Sema::DiagRedefinedPlaceholderFieldDecl(SourceLocation Loc, Diag(Loc, diag::err_using_placeholder_variable) << Name; for (DeclContextLookupResult::iterator It = Found; It != Result.end(); It++) { const NamedDecl *ND = *It; -if

[clang] [clang-tools-extra] [llvm] [mlir] [clang][lldb][mlir] Fix some identical sub-expressions warnings (NFC) (PR #95715)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -430,11 +430,10 @@ class HTMLLogger : public Logger { AST.getSourceManager(), AST.getLangOpts()); if (EltRange.isInvalid()) continue; - if (EltRange.getBegin() < Range.getBegin() || - EltRange.getEnd() >=

[clang] [clang-tools-extra] [llvm] [mlir] [clang][lldb][mlir] Fix some identical sub-expressions warnings (NFC) (PR #95715)

2024-06-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Note, this fixes #95670 https://github.com/llvm/llvm-project/pull/95715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] skip alignment checks on incomplete types to avoid an assertion failure while parsing lambda used as default argument (PR #94542)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] skip alignment checks on incomplete types to avoid an assertion failure while parsing lambda used as default argument (PR #94542)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94542 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -3318,6 +3353,20 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) { DiagnosticsEngine::ak_qualtype, (intptr_t)T.getAsOpaquePtr(), StringRef(), StringRef(), std::nullopt, Buffer, std::nullopt); + if (IsBitInt) { +// The Structure

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-06-17 Thread Aaron Ballman via cfe-commits
@@ -3318,6 +3353,20 @@ llvm::Constant *CodeGenFunction::EmitCheckTypeDescriptor(QualType T) { DiagnosticsEngine::ak_qualtype, (intptr_t)T.getAsOpaquePtr(), StringRef(), StringRef(), std::nullopt, Buffer, std::nullopt); + if (IsBitInt) { +// The Structure

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes seem pretty reasonable to me (aside from a few small nits), but I'd appreciate someone with more compiler-rt knowledge to also sign off on the changes. https://github.com/llvm/llvm-project/pull/93612

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes should come with a release note in clang/docs/ReleaseNotes.rst so users know about the fix. The changes otherwise look correct, but I'd like to hear from @jansvoboda11 as well (especially in light of the question I raised on the original

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/95798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > I guess the general question is - is it acceptable to have the Scanner > > > operating in a language standard different than the passed in language > > > mode and different than the compiler language standard? > > > > > > I think that is acceptable. It is kinda

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/95455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/95455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow non-lvalue values in constant expressions to prevent invalid pointer offset computation (PR #95479)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] disallow non-lvalue values in constant expressions to prevent invalid pointer offset computation (PR #95479)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/91100 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Please be sure to add a release note to clang/docs/ReleaseNotes.rst so users know about the new functionality. https://github.com/llvm/llvm-project/pull/91100 ___ cfe-commits mailing

[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)

2024-06-17 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman, please take a look! > > What do you think of this approach? I suppose it might be even better to > enforce that the function's return type is `bool`, which would align with the > [ThreadSafetyAnalysis >

[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I can see the logic, but it seems like there's a fair amount of related checking that perhaps should happen as well. Marking a destructor as try_lock makes even less sense than marking a constructor, so why not prohibit that as well? And since the

[clang] [clang][ThreadSafety] Warn when constructor is trylock (PR #95290)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/95290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-17 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Implement complex division (PR #94892)

2024-06-17 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= Message-ID: In-Reply-To: https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94892 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/94891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement Complex-complex multiplication (PR #94891)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Fix EmitInvariantStart for non-zero addrspace (PR #94346)

2024-06-17 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/94346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-14 Thread Aaron Ballman via cfe-commits
@@ -9325,6 +9325,9 @@ bool PointerExprEvaluator::VisitCastExpr(const CastExpr *E) { Result.IsNullPtr = false; return true; } else { + if (!Value.isLValue()) AaronBallman wrote: I think it's worth adding a comment here explaining under

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Changes generally LGTM though I had some suggestions to consider. https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Dump Auto Type Inference (PR #95509)

2024-06-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman requested changes to this pull request. I agree with @Endilll regarding the chattiness of this approach. AST dumping is a better way to do this until reflection support comes to C++ (at that point, I expect we'll have more nuanced tools for inspecting the

[clang] [clang] Dump Auto Type Inference (PR #95509)

2024-06-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/95509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-14 Thread Aaron Ballman via cfe-commits
@@ -847,6 +847,7 @@ Bug Fixes to C++ Support - Fixed several bugs in capturing variables within unevaluated contexts. (#GH63845), (#GH67260), (#GH69307), (#GH88081), (#GH89496), (#GH90669) and (#GH91633). - Fixed handling of brace ellison when building deduction guides.

[clang] fix(95366): enhance cast operation safety with LValue validation (PR #95479)

2024-06-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/95479 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-13 Thread Aaron Ballman via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -17,10 +17,6 @@ // GCNO-LOCATION: "-coverage-notes-file={{.*}}/foo/bar.gcno" // GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|}}foo/bar.gcno" -/// GCC allows PWD to change the paths. -// RUN: %if

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-13 Thread Aaron Ballman via cfe-commits
=?utf-8?q?Iñaki?= Amatria Barral Message-ID: In-Reply-To: @@ -17,10 +17,6 @@ // GCNO-LOCATION: "-coverage-notes-file={{.*}}/foo/bar.gcno" // GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|}}foo/bar.gcno" -/// GCC allows PWD to change the paths. -// RUN: %if

[clang] [Clang] allow `` `@$ `` in raw string delimiters in C++26 (PR #93216)

2024-06-13 Thread Aaron Ballman via cfe-commits
@@ -2261,8 +2261,17 @@ bool Lexer::LexRawStringLiteral(Token , const char *CurPtr, unsigned PrefixLen = 0; - while (PrefixLen != 16 && isRawStringDelimBody(CurPtr[PrefixLen])) + while (PrefixLen != 16 && isRawStringDelimBody(CurPtr[PrefixLen])) { ++PrefixLen; +

[clang] 4f09ac7 - Fix off-by-one issue found by post-commit review

2024-06-13 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-13T07:48:08-04:00 New Revision: 4f09ac7705b3b24492d521a97571404c2e9a1f8e URL: https://github.com/llvm/llvm-project/commit/4f09ac7705b3b24492d521a97571404c2e9a1f8e DIFF: https://github.com/llvm/llvm-project/commit/4f09ac7705b3b24492d521a97571404c2e9a1f8e.diff

[clang] [clang] Cover CWG issues about `export template` (PR #94876)

2024-06-11 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: The goal of the status page is to convey implementation status to our users, and so from that perspective I think N/A provides the least information to users because it basically says "this entry doesn't apply to us". So in these kinds of cases, `sup` conveys more

[clang] [hexagon] Add {con, de}structive interference size defn (PR #94877)

2024-06-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: LGTM as far as the code goes, but please add some test coverage for the changes. https://github.com/llvm/llvm-project/pull/94877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Given the libc++ experience, let's move forward with this PR as-is. If there's an issue in practice, we'll disable the tests on changes to Clang at that point. https://github.com/llvm/llvm-project/pull/94208

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > FYI in the libc++ CI we've been running the LLDB tests for a few months now > and I haven't seen a single unrelated failure. Thanks, that's really useful information! https://github.com/llvm/llvm-project/pull/94208 ___

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I have no objections in theory, but in practice I remain concerned about the flakiness of lldb's tests for the impacts on Clang reviewers. There are timeout failures, but they might be limited to Windows and thus not a problem with your PR

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

2024-06-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/90588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Report erroneous floating point results in _Complex math (PR #90588)

2024-06-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Changes LGTM unless @jcranmer-intel still has concerns. https://github.com/llvm/llvm-project/pull/90588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Make warning pragma override -Werror=foo and DefaultError warnings (PR #93647)

2024-06-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I think we should update our documentation: https://github.com/llvm/llvm-project/blob/b01ac5137c28fa5e1b44a5d850cb7a6ace7d8799/clang/docs/UsersManual.rst?plain=1#L1186 Overall, this seems like a sensible improvement to me and the code changes LG.

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-06-07 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman Is the prototype of the implementation here at least sound? Or > should this go somewhere completely different? Maybe in one of the TSA source > files? This is a semantic concern rather than a syntactic one, so I would expect this to happen in Sema rather

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Do you need someone to land these changes on your behalf? https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/88367 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Changes generally LG aside from an update to a test, but this should also have a release note in `clang/docs/ReleaseNotes.rst` so users know about the new functionality and the limitations regarding macros.

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-06 Thread Aaron Ballman via cfe-commits
@@ -533,6 +533,8 @@ __rdtscp(unsigned int *__A) { /// \see __rdpmc #define _rdpmc(A) __rdpmc(A) +; AaronBallman wrote: As far as the changes go, that is fine. I do still think we need to change the underlying comment parsing at some point (not as part of

[clang] [Clang][Comments] Attach comments to decl even if preproc directives are in between (PR #88367)

2024-06-06 Thread Aaron Ballman via cfe-commits
@@ -107,6 +107,24 @@ ///The 2nd source tile. Max size is 1024 Bytes. #define _tile_cmmrlfp16ps(dst, a, b) __builtin_ia32_tcmmrlfp16ps(dst, a, b) +/// Perform matrix multiplication of two tiles containing complex elements and AaronBallman wrote: Thank you

[clang] [Clang][Comments] Add argument parsing for @throw @throws @exception (PR #84726)

2024-06-06 Thread Aaron Ballman via cfe-commits
@@ -89,6 +89,31 @@ class TextTokenRetokenizer { } } + /// Extract a template type + bool lexTemplate(SmallString<32> ) { AaronBallman wrote: This should work okay for simple (most) cases, but we should have tests showing the boundaries, e.g.,

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed grammatical error in "enum specifier" error msg #94443 (PR #94592)

2024-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixed grammatical error in "enum specifier" error msg #94443 (PR #94592)

2024-06-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I had a nice chat with @ldionne and @nikic today and we touched on the topic of precommit CI for lldb being triggered from Clang, and that resulted in a change of opinion and perhaps a better way for me to phrase what I'm after and how it relates to this PR. I think that

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > One question I have is whether there will be follow-up work for other > > thread safety attributes (`acquire_capability`, `try_acquire_capability`, > > etc)? > > They already work fine in C so far. But if you are aware of some issues don't > hesitate to let me know!

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > > @AaronBallman, to be fair, clang is testing the wasm features in > > > > > terms of output. So this is wiring up a bunch of tested features that > > > > > will allow execution. Clang generally does not test execution but > > > > > output, so we are not creating a

[clang] [Clang][Comments] Support for parsing headers in Doxygen \par commands (PR #91100)

2024-06-05 Thread Aaron Ballman via cfe-commits
@@ -149,6 +149,63 @@ class TextTokenRetokenizer { addToken(); } + /// Check if this line starts with @par or \par + bool startsWithParCommand() { +unsigned Offset = 1; + +/// Skip all whitespace characters at the beginning. +/// This needs to backtrack

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > @AaronBallman, to be fair, clang is testing the wasm features in terms of > > > output. So this is wiring up a bunch of tested features that will allow > > > execution. Clang generally does not test execution but output, so we are > > > not creating a precedent here

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman, to be fair, clang is testing the wasm features in terms of > output. So this is wiring up a bunch of tested features that will allow > execution. Clang generally does not test execution but output, so we are not > creating a precedent here since that PR

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/93430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Support wasm execution (PR #86402)

2024-06-05 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: So are we in a chicken-and-egg situation where we need some support in-tree in order to have a reason to set up a postcommit test bot but we don't want to land untested changes? At the end of the day, if we're claiming support for something, we need it to be tested and

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Following the logic in this argument, would you also say it's appropriate for > someone to commit an LLVM patch that changes how textual LLVM IR is printed > in a way that it breaks existing tests in Clang — without updating those > tests? Possibly! I'm talking about

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -899,6 +899,8 @@ class Sema; /// object argument. bool IgnoreObjectArgument : 1; +bool TookAddressOfOverload : 1; AaronBallman wrote: CC @Endilll -- it might be nice to refactor this code to use `LLVM_PREFERRED_TYPE`, but also to fix the

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -5813,6 +5813,27 @@ static TypoCorrection TryTypoCorrectionForCall(Sema , Expr *Fn, return TypoCorrection(); } +// [C++26][[expr.unary.op]/p4 +// A pointer to member is only formed when an explicit & +// is used and its operand is a qualified-id not enclosed in

[clang] [Clang] Static and explicit object member functions with the same parameter-type-lists (PR #93430)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -999,6 +1001,8 @@ class Sema; /// Initialization of an object of class type by constructor, /// using either a parenthesized or braced list of arguments. CSK_InitByConstructor, + + CSK_AddressOfOverloadSet, AaronBallman wrote: Please

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Thank you! https://github.com/llvm/llvm-project/pull/94118 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -Wno-return-type -std=c++23 -fsyntax-only -verify %s +// expected-no-diagnostics +constexpr int f() { } +static_assert(__is_same(decltype([] constexpr -> int { }( )), int)); AaronBallman wrote: We already have such an option,

[clang] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from a small nit with the release notes. Do you need someone to land this on your behalf? https://github.com/llvm/llvm-project/pull/89657 ___ cfe-commits mailing list

[clang] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -832,6 +832,7 @@ Bug Fixes to AST Handling - Fixed malformed AST generated for anonymous union access in templates. (#GH90842) - Improved preservation of qualifiers and sugar in `TemplateNames`, including template keyword. +- ``forCallable`` now properly preserves

[clang] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/89657 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-04 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I would not agree with this specific wording. We have in the past and will in > the future revert commits that break existing tests elsewhere in the LLVM > project. If a patch to Clang breaks an existing test in LLDB, it's up to the > author of the patch to work with the

[clang] Disable constexpr function body checking in more situations (PR #94347)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/94347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/94123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -Wno-return-type -std=c++23 -fsyntax-only -verify %s +// expected-no-diagnostics +constexpr int f() { } +static_assert(__is_same(decltype([] constexpr -> int { }( )), int)); AaronBallman wrote: For C++23, I think users will

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -2487,6 +2477,26 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, return true; } +static bool CheckConstexprMissingReturn(Sema , +const FunctionDecl *Dcl) { + bool IsVoidOrDependentType =

[clang] [Clang][C++23] update constexpr diagnostics for missing return statements per P2448 (PR #94123)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! https://github.com/llvm/llvm-project/pull/94123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -671,6 +671,16 @@ void Parser::ParseGNUAttributeArgs( ParseBoundsAttribute(*AttrName, AttrNameLoc, Attrs, ScopeName, ScopeLoc, Form); return; + } else if (AttrKind == ParsedAttr::AT_GuardedBy) { +ParseGuardedByAttribute(*AttrName,

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -3330,6 +3340,63 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute(IdentifierInfo , + SourceLocation

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for working on this! The changes should come with a release note in clang/docs/ReleaseNotes.rst so users know about the new functionality. One question I have is whether there will be follow-up work for other thread safety attributes

[clang] Support [[guarded_by(mutex)]] attribute inside C struct (PR #94216)

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -3330,6 +3340,63 @@ void Parser::DistributeCLateParsedAttrs(Decl *Dcl, } } +/// GuardedBy attributes (e.g., guarded_by): +/// AttrName '(' expression ')' +void Parser::ParseGuardedByAttribute(IdentifierInfo , + SourceLocation

<    1   2   3   4   5   6   7   8   9   10   >