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

2024-06-04 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] b9f1fdc - Silence a not all control paths return a value diagnostic; NFC

2024-06-04 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-04T11:31:59-04:00 New Revision: b9f1fdcfd9803689461f0c12e04ab1743ad9a030 URL: https://github.com/llvm/llvm-project/commit/b9f1fdcfd9803689461f0c12e04ab1743ad9a030 DIFF: https://github.com/llvm/llvm-project/commit/b9f1fdcfd9803689461f0c12e04ab1743ad9a030.diff

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

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -961,6 +961,10 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">, Group, HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group, Visibility<[ClangOption, CC1Option]>; +def

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

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -505,6 +505,9 @@ COMPATIBLE_LANGOPT(IncrementalExtensions, 1, 0, " True if we want to process sta BENIGN_LANGOPT(CheckNew, 1, 0, "Do not assume C++ operator new may not return NULL") +BENIGN_LANGOPT(CheckConstexprFunctionBodies, 1, 1, + "True if we want to

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

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -2469,11 +2469,20 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, // base class sub-objects shall be a constexpr constructor. // // Note that this rule is distinct from the "requirements for a constexpr - // function", so is not checked

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

2024-06-04 Thread Aaron Ballman via cfe-commits
@@ -2469,11 +2469,20 @@ static bool CheckConstexprFunctionBody(Sema , const FunctionDecl *Dcl, // base class sub-objects shall be a constexpr constructor. // // Note that this rule is distinct from the "requirements for a constexpr - // function", so is not checked

[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
@@ -430,6 +430,78 @@ static bool interp__builtin_iszero(InterpState , CodePtr OpPC, return true; } +static bool interp__builtin_signbit(InterpState , CodePtr OpPC, +const InterpFrame *Frame, const Function *F, +

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

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes generally LGTM, but should come with a release note. Do you think there's a reasonable way to share code between the two constant expression interpreters in this case? https://github.com/llvm/llvm-project/pull/94118

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

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned 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] Disable constexpr function body checking in more situations (PR #94347)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned 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] Disable constexpr function body checking in more situations (PR #94347)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned 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] Disable constexpr function body checking in more situations (PR #94347)

2024-06-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman unassigned 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][Sema] Don't issue -Wcast-function-type-mismatch for enums with a matching underlying type (PR #87793)

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

[clang] [clang][Sema] Don't issue -Wcast-function-type-mismatch for enums with a matching underlying type (PR #87793)

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

[clang] [clang] Make sure all C++ DR tests are running with `-pedantic-errors` (PR #94203)

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

[clang] [clang] Make sure all C++ DR tests are running with `-pedantic-errors` (PR #94203)

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

[clang] [clang] Make sure all C++ DR tests are running with `-pedantic-errors` (PR #94203)

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

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Aaron Ballman via cfe-commits
@@ -282,6 +288,8 @@ namespace { } void HandleTranslationUnit(ASTContext ) override { + IRGenFinished = true; AaronBallman wrote: shouldn't this be set at the end of `HandleTranslationUnit` rather than the beginning?

[clang] [clang-repl] Teach clang-repl how to load PCHs. (PR #94166)

2024-06-03 Thread Aaron Ballman via cfe-commits
@@ -138,6 +138,8 @@ namespace { assert(!M && "Replacing existing Module?"); M.reset(new llvm::Module(ExpandModuleName(ModuleName, CodeGenOpts), C)); + IRGenFinished = false; AaronBallman wrote: Why is IR gen *finished* when we're just

[clang] remove goma support from clang (PR #93942)

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

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM thank you! 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

[clang] 68a6481 - [C11] Claim conformance to N1464

2024-05-31 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-05-31T13:52:13-04:00 New Revision: 68a64812d7bac28412d43a0b4b19bae6db101c48 URL: https://github.com/llvm/llvm-project/commit/68a64812d7bac28412d43a0b4b19bae6db101c48 DIFF: https://github.com/llvm/llvm-project/commit/68a64812d7bac28412d43a0b4b19bae6db101c48.diff

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-05-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > In that case I think it might just make sense to ignore the flag in C++11 and > later then and allow it before C++11. I think that makes the most sense. https://github.com/llvm/llvm-project/pull/88265 ___ cfe-commits mailing

[clang] [Clang] Allow raw string literals in C as an extension (PR #88265)

2024-05-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: C has Unicode string literals as well: https://godbolt.org/z/chdjYrK9v and so if we're allowing raw string literals, it makes sense to also allow raw unicode string literals IMO. I don't think we need to rename the flag though.

[clang] [Bounds-Safety] Add sized_by, counted_by_or_null & sized_by_or_null (PR #93231)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. There are a few minor suggestions from @delcypher that should be addressed, but overall the changes LGTM (assuming there are no precommit CI surprises after fixing the merge conflicts). https://github.com/llvm/llvm-project/pull/93231

[clang] [BoundsSafety] Add `-fexperimental-bounds-safety` CC1 and language option and use it to tweak `counted_by`'s semantics (PR #92623)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I'd like to understand why we need a flag for this rather than changing the behavior of `-fbounds-safety`. (I'd like to avoid a proliferation of flags unless this flag is going to gate more changes in the near future.)

[clang] [BoundsSafety] Add `-fexperimental-bounds-safety` CC1 and language option and use it to tweak `counted_by`'s semantics (PR #92623)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/92623 ___ 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-05-31 Thread Aaron Ballman via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

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

2024-05-31 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-05-31 Thread Aaron Ballman via cfe-commits
@@ -32,5 +36,87 @@ inline bool isFunctionOrMethodOrBlockForAttrSubject(const Decl *D) { return isFuncOrMethodForAttrSubject(D) || llvm::isa(D); } +/// Return true if the given decl has a declarator that should have +/// been processed by Sema::GetTypeForDeclarator. +inline

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

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Precommit CI failures seem relevant. 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][Interp] Member Pointers (PR #91303)

2024-05-31 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -0,0 +1,112 @@ +//===- MemberPointer.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM

[clang] [clang][Interp] Member Pointers (PR #91303)

2024-05-31 Thread Aaron Ballman via cfe-commits
Timm =?utf-8?q?B=C3=A4der?= , Timm =?utf-8?q?B=C3=A4der?= , 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/91303 ___ cfe-commits

[clang] [clang][Interp] Member Pointers (PR #91303)

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

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -92,3 +92,43 @@ 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)

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: In general, I think this is heading in the right direction. I did have a suggestion that may be worth considering. https://github.com/llvm/llvm-project/pull/93503 ___ cfe-commits mailing list

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

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

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -74,8 +74,8 @@ On Unix-like Systems https://llvm.org/docs/CMake.html#frequently-used-cmake-variables;>frequently used cmake variables for more options. AaronBallman wrote: [Re: lines 72 to 76] I think we should update this text at

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. I looked through the review and I think this is generally an improvement. We may find a need to relax some `const` later, but I did not spot any obvious concerns. That said, I'd like @ChuanqiXu9 to give the final sign-off on this as

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

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

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -501,6 +501,9 @@ Improvements to Clang's diagnostics - Clang emits a ``-Wparentheses`` warning for expressions with consecutive comparisons like ``x < y < z``. Fixes #GH20456. +- Clang now diagnoses missing format attributes for non-template functions and +

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,277 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +typedef unsigned short char16_t; +typedef unsigned int char32_t; +typedef __WCHAR_TYPE__ wchar_t; +typedef __SIZE_TYPE__ size_t; +typedef __builtin_va_list va_list; +

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -7131,6 +7138,114 @@ static void handleSwiftAsyncAttr(Sema , Decl *D, const ParsedAttr ) { checkSwiftAsyncErrorBlock(S, D, ErrorAttr, AsyncAttr); } +// This function is called only if function call is not inside template body. +// TODO: Add call for function calls

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,277 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wmissing-format-attribute %s + +typedef unsigned short char16_t; +typedef unsigned int char32_t; +typedef __WCHAR_TYPE__ wchar_t; +typedef __SIZE_TYPE__ size_t; +typedef __builtin_va_list va_list; +

[clang] [clang] Catch missing format attributes (PR #70024)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,303 @@ +// RUN: %clang_cc1 -fsyntax-only -verify=expected,beforeCxx2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++2b -Wmissing-format-attribute %s +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++23 -Wmissing-format-attribute %s

[clang] [clang] Catch missing format attributes (PR #70024)

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

[clang] [clang] require template arg list after template kw (PR #80801)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -2995,13 +2996,23 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec , ParsedType ObjectType, SS, ObjectType, ObjectHadErrors, TemplateKWLoc ? *TemplateKWLoc : SourceLocation(), Id, IdLoc, EnteringContext, Result, TemplateSpecified); -else if

[clang] [clang] require template arg list after template kw (PR #80801)

2024-05-31 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. I think the changes are reasonable, but I'd like to wait a bit before landing to give @erichkeane a chance to review as templates code owner. https://github.com/llvm/llvm-project/pull/80801

[clang] [clang] require template arg list after template kw (PR #80801)

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

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Ah thank you for pointing that out, I had missed some updates on that thread. I think `defined(__wasi__)` would address my concerns. @MaskRay asked a good question about whether we should tie this to `LLVM_ON_UNIX` as well and I don't have a strong intuition there, but my

[clang] [llvm] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-05-31 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > How do I reopen the PR after fixing the test case? AIUI, you cannot reopen a merged PR, you have to start a new PR and mention the old one to link the two together. https://github.com/llvm/llvm-project/pull/81545 ___

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-05-31 Thread Aaron Ballman via cfe-commits
@@ -1329,6 +1341,100 @@ bool Preprocessor::LexAfterModuleImport(Token ) { return true; } +/// Lex a token following the 'module' contextual keyword. +/// +/// [cpp.module]/p2: +/// The pp-tokens, if any, of a pp-module shall be of the form: +/// pp-module-name

[clang] [clang] ``README.txt``: Replace the link to the old bug tracker with the new one. (PR #93878)

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

[clang] remove goma support from clang (PR #93942)

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

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: Comments in the config file isn't a harmful thing, but I'm also worried about folks who never see the config file. e.g., they're working in Path.inc on something, see `HAVE_PWD_H` in the code, and just make assumptions from there. So perhaps a two-pronged approach: a

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

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

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2024-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Sorry for not responding sooner, but I think this approach makes sense to me. It's basically similar to autoconf where we're checking whether a feature is supported and guarding against it. One concern I have is that someone adding new code may think

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -92,3 +92,43 @@ 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)

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -92,3 +92,43 @@ 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)

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -92,3 +92,43 @@ 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)

[clang] [clang/www/get_started.html] Use newer `cmake` syntax (PR #93503)

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -67,15 +67,13 @@ On Unix-like Systems Build LLVM and Clang: cd llvm-project -mkdir build (in-tree build is not supported) -cd build This builds both LLVM and Clang in release mode. Alternatively, if you need a debug build, switch Release to

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

2024-05-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: I applied the patch locally and tried it out, and I think this is an improvement for folks generating VS solutions. https://github.com/llvm/llvm-project/pull/93519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -1064,6 +1090,8 @@ void DeclPrinter::VisitNamespaceAliasDecl(NamespaceAliasDecl *D) { void DeclPrinter::VisitEmptyDecl(EmptyDecl *D) { prettyPrintAttributes(D); + if (const char *lang = tryGetUnbracedLinkageLanguage(D)) +Out << "extern \"" << lang << "\";";

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -662,6 +678,11 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { CXXConversionDecl *ConversionDecl = dyn_cast(D); CXXDeductionGuideDecl *GuideDecl = dyn_cast(D); if (!Policy.SuppressSpecifiers) { +if (const char *lang = tryGetUnbracedLinkageLanguage(D)) {

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Aaron Ballman via cfe-commits
@@ -932,6 +953,11 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) { : D->getASTContext().getUnqualifiedObjCPointerType(D->getType()); if (!Policy.SuppressSpecifiers) { +if (const char *lang = tryGetUnbracedLinkageLanguage(D)) { + // the "extern" specifier is

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM aside from some coding style nits. Because AST printing is not part of the public interface for Clang, I don't think these changes need a release note. https://github.com/llvm/llvm-project/pull/93131

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/93131 ___ 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-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Adding @jyknight because of our discussions on related behavior regarding `DefaultError` diagnostics and suppression. https://github.com/llvm/llvm-project/pull/93647 ___ cfe-commits mailing list

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

2024-05-30 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-05-30 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-05-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! Please add a release note to clang/docs/ReleaseNotes.rst so users know about the behavioral change. Also, should we update some documentation as well? https://github.com/llvm/llvm-project/pull/93647

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

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

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-29 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,36 @@ +//===- Attr.h --- Helper functions for attribute handling in Sema -===// +// +// 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:

[clang] [clang] require template arg list after template kw (PR #80801)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -2995,13 +2996,23 @@ bool Parser::ParseUnqualifiedId(CXXScopeSpec , ParsedType ObjectType, SS, ObjectType, ObjectHadErrors, TemplateKWLoc ? *TemplateKWLoc : SourceLocation(), Id, IdLoc, EnteringContext, Result, TemplateSpecified); -else if

[clang] [clang] require template arg list after template kw (PR #80801)

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

[clang] [clang] require template arg list after template kw (PR #80801)

2024-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! The changes should also come with a release note in clang/docs/ReleaseNotes.rst so users know about the change. https://github.com/llvm/llvm-project/pull/80801 ___ cfe-commits mailing

[clang] [C] Disallow declarations where a statement is required (PR #92908)

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

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -11463,6 +11463,23 @@ void Sema::CheckExplicitObjectMemberFunction(Declarator , D.setInvalidType(); } + // Handle the following case: + // + // struct S { + // struct T { + // int f(this T); + // }; + // + // friend int T::f(this T); // Allow this.

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types + /// AND the ParsedAttr. + template + static std::enable_if_t, SourceLocation> + getAttrLoc(const AttrInfo ) {

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -817,11 +817,11 @@ class alignas(8) Decl { "owned local decl but no local module storage"); return reinterpret_cast(this)[-1]; } - void setLocalOwningModule(Module *M) { + void setLocalOwningModule(const Module *M) { AaronBallman wrote:

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > My philosophy on problems like that is that the first step to getting out of > a hole is to stop digging the hole. We aren't going to make all of clang > const-correct overnight, right? Yup! I think we're in agreement with the long-term goal and how we get there. The

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: You don't have to convince me that being const-correct is a good thing, I'm already in full support of that. :-) The push back isn't "no, don't do this", it's "we're not const correct in a *lot* of places and so adding const correctness to a part of the compiler without

[clang] [llvm] [clang] Introduce target-specific `Sema` components (PR #93179)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -3548,6 +3561,56 @@ class Sema final : public SemaBase { BuiltinFunction }; + /// A helper function to provide Attribute Location for the Attr types + /// AND the ParsedAttr. + template + static std::enable_if_t, SourceLocation> + getAttrLoc(const AttrInfo ) {

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

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

[clang] [clang] Be const-correct with all uses of `Module *`. (PR #93493)

2024-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: In general, I'm in favor of improving const-correctness like this. That said, I share the concerns of other reviewers that we should be sure we're adding const-correctness where it makes sense to do so. e.g., functions named `getSomething()` that

[clang] 273777e - clang:: to llvm::; NFC

2024-05-28 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-05-28T12:05:55-04:00 New Revision: 273777ead296c9ab2c157d16b750e3ee1ace08ec URL: https://github.com/llvm/llvm-project/commit/273777ead296c9ab2c157d16b750e3ee1ace08ec DIFF: https://github.com/llvm/llvm-project/commit/273777ead296c9ab2c157d16b750e3ee1ace08ec.diff

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

2024-05-28 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] [ASTMatchers] forCallable should not erase binding on success (PR #89657)

2024-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: The changes look reasonable to me, but can you also add a release note to clang/docs/ReleaseNotes.rst so that users of AST matchers know about the fix? https://github.com/llvm/llvm-project/pull/89657 ___

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: I think we're going to be printing incorrect code either way, but with this patch, we're more likely to be closer to the original intent of the code than without the patch. So even though this isn't perfect, it's forward progress and I think we're

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s + +// CHECK: extern "C" int printf(const char *, ...); +extern "C" int printf(const char *...); + +// CHECK: extern "C++" { AaronBallman wrote: Oofda, there are differences between the braced

[clang] [clang][AST] fix ast-print of `extern ` with >=2 declarators (PR #93131)

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

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -4845,6 +4845,55 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState , // Check for auto functions and trailing return type and adjust the // return type accordingly. if (!D.isInvalidType()) { +auto isClassType =

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -7525,6 +7525,8 @@ def err_explicit_object_parameter_mutable: Error< def err_invalid_explicit_object_type_in_lambda: Error< "invalid explicit object parameter type %0 in lambda with capture; " "the type must be the same as, or derived from, the lambda">; +def

[clang] [Clang] Disallow explicit object parameters in more contexts (PR #89078)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -4845,6 +4845,55 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState , // Check for auto functions and trailing return type and adjust the // return type accordingly. if (!D.isInvalidType()) { +auto isClassType =

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-28 Thread Aaron Ballman via cfe-commits
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

[clang] [Clang] [C23] Fix typeof_unqual for qualified array types (PR #92767)

2024-05-28 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Precommit CI failure is unrelated to your changes. https://github.com/llvm/llvm-project/pull/92767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

2024-05-28 Thread Aaron Ballman via cfe-commits
@@ -1086,45 +1106,100 @@ void TextNodeDumper::VisitNullTemplateArgument(const TemplateArgument &) { void TextNodeDumper::VisitTypeTemplateArgument(const TemplateArgument ) { OS << " type"; - dumpType(TA.getAsType()); + dumpTemplateArgument(TA); } void

[clang] [clang] Improve ast-dumper text printing of TemplateArgument (PR #93431)

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

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