[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > Also, it's a bit funny to have .bat files without CRLF endings given that > they run on Windows. I'm not sure about the funny bit - but certainly dangerous. I've had cmd misinterpret batch files with LF vs CRLF. https://github.com/llvm/llvm-project/pull/86318

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > changes to `clang/test/CXX/lex/lex.literal/lex.string/p4.cpp` should be > reverted (it's a CRLF related test) This is the type of problems that I am concerned about. We certainly have some tests which are line-ending sensitive, and each test should be audited before we make

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > @compnerd I just realised I didn't respond to your concern. Apologies. > > > I think that the concern that I have is that do we have sufficient testing > > for supporting line-ending dependent behaviour in the compiler? > > For the first part: I don't know that it matters,

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
@@ -1146,6 +1146,12 @@ class TagTableInfo : public CommonTypeTableInfo { writer.write(Flags); +if (auto Copyable = TI.isSwiftCopyable()) { compnerd wrote: Unnecessary braces and we should be able to use the named constants here.

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
@@ -1125,10 +1125,10 @@ class CommonTypeTableInfo class TagTableInfo : public CommonTypeTableInfo { public: unsigned getUnversionedInfoSize(const TagInfo ) { -return 2 + (TI.SwiftImportAs ? TI.SwiftImportAs->size() : 0) + - 2 + (TI.SwiftRetainOp ?

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
@@ -527,6 +527,13 @@ class TagTableInfo Info.EnumExtensibility = static_cast((Payload & 0x3) - 1); +uint8_t Copyable = +endian::readNext(Data); +if (Copyable == 1) + Info.setSwiftCopyable(std::optional(false)); +else if (Copyable == 2)

[clang] [APINotes] Allow annotating a C++ type as non-copyable in Swift (PR #90064)

2024-04-25 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/90064 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Revert "NFC: Make clang resource headers an interface library (#88317)" (PR #89266)

2024-04-18 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Approving it in case it needs to be merged, but I think that we should try to determine how it is breaking. This change feels like it should be correct and is a pretty good cleanup, so I would prefer that fix forward rather than revert.

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Thanks, this seems good! https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
@@ -501,6 +501,10 @@ add_header_target("windows-resource-headers" ${windows_only_files}) add_header_target("utility-resource-headers" ${utility_files}) get_clang_resource_dir(header_install_dir SUBDIR include) +target_include_directories(clang-resource-headers INTERFACE + $

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. This seems like a step in the right direction - avoiding custom targets is generally better. https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list

[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-10 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/88317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Add test for C++ class templates (PR #87006)

2024-03-28 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/87006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-27 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Philosophically, I agree with this change. Enshrining the information about the line endings into the SCM tool makes sense. I think that the concern that I have is that do we have sufficient testing for supporting line-ending dependent behaviour in the compiler? Additionally,

[clang] [APINotes] For a re-exported module, look for APINotes in the re-exporting module's apinotes file (PR #86820)

2024-03-27 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/86820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,6 @@ +// RUN: rm -rf %t +// RUN: not %clang_cc1 -fsyntax-only -fapinotes %s -I %S/Inputs/BrokenHeaders2 2>&1 | FileCheck %s compnerd wrote: Extra space after `-fapinotes` https://github.com/llvm/llvm-project/pull/84773

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1 @@ +extern int TopLevelPrivateKit_Public; compnerd wrote: Missing newline https://github.com/llvm/llvm-project/pull/84773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,2 @@ +#include +extern int FrameworkWithActualPrivateModule_Private; compnerd wrote: Missing newline https://github.com/llvm/llvm-project/pull/84773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1 @@ +extern int FrameworkWithWrongCase; compnerd wrote: Missing newline https://github.com/llvm/llvm-project/pull/84773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,55 @@ +#ifndef SOMEKIT_H +#define SOMEKIT_H + +#define ROOT_CLASS __attribute__((objc_root_class)) + +ROOT_CLASS +@interface A +-(A*)transform:(A*)input; +-(A*)transform:(A*)input integer:(int)integer; + +@property (nonatomic, readonly, retain) A* someA; +@property

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,187 @@ +// RUN: rm -rf %t && mkdir -p %t + +// Build and check the unversioned module file. +// RUN: %clang_cc1 -fmodules -fblocks -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache/Unversioned -fdisable-module-hash -fapinotes-modules -fsyntax-only -I

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,37 @@ +Name: HeaderLib +SwiftInferImportAsMember: true +Functions: + - Name: custom_realloc +NullabilityOfRet: N +Nullability: [ N, S ] + - Name: unavailable_function +Availability: none +AvailabilityMsg: "I beg you not to use this" + - Name:

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1 @@ +garbage here because this file shouldn't get read compnerd wrote: Missing newline https://github.com/llvm/llvm-project/pull/84773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1 @@ +extern int PrivateLib; compnerd wrote: Missing newline https://github.com/llvm/llvm-project/pull/84773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,44 @@ +// RUN: rm -rf %t && mkdir -p %t +// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache -fapinotes-modules -Wno-private-module -fsyntax-only -I %S/Inputs/Headers -F %S/Inputs/Frameworks %s -verify + +// Test with Swift

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1 @@ +garbage here because this file shouldn't get read compnerd wrote: Missing newline https://github.com/llvm/llvm-project/pull/84773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1 @@ +extern int FrameworkWithActualPrivateModule; compnerd wrote: Missing newline https://github.com/llvm/llvm-project/pull/84773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,187 @@ +// RUN: rm -rf %t && mkdir -p %t + +// Build and check the unversioned module file. +// RUN: %clang_cc1 -fmodules -fblocks -fimplicit-module-maps -fmodules-cache-path=%t/ModulesCache/Unversioned -fdisable-module-hash -fapinotes-modules -fsyntax-only -I

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -52,49 +52,54 @@ static void applyNullability(Sema , Decl *D, NullabilityKind Nullability, if (!Metadata.IsActive) return; - auto IsModified = [&](Decl *D, QualType QT, -NullabilityKind Nullability) -> bool { + auto GetModified = +

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,4 @@ +Name: SomeBrokenLib +Functions: + - Name: do_something_with_pointers +Nu llabilityOfRet: O compnerd wrote: Is it possible to comment that the space here is intentional? Particularly with this diff, it was difficult to verify until you get

[clang] [APINotes] Upstream the remaining API Notes fixes and tests (PR #84773)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -638,15 +638,15 @@ ObjCPropertyDecl *Sema::CreatePropertyDecl(Scope *S, PDecl->setInvalidDecl(); } - ProcessDeclAttributes(S, PDecl, FD.D); - // Regardless of setter/getter attribute, we save the default getter/setter // selector names in anticipation of

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/82084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/82084 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-03-19 Thread Saleem Abdulrasool via cfe-commits
@@ -3191,6 +3191,22 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one was passed

[clang] [clang] Add `__has_extension(swiftcc)` support (PR #85347)

2024-03-18 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Might be nice to have a test for `swiftasynccc` as well. https://github.com/llvm/llvm-project/pull/85347 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: I don't see why removing the help text is not sufficient to handle the issue? Even if no major players are using it, I think that there are people using it. It is a fairly self-contained bit of support. https://github.com/llvm/llvm-project/pull/84121

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Perhaps the better approach here is to either indicate that it is only supported on a particular target or to drop the help information rather than removing the feature. https://github.com/llvm/llvm-project/pull/84121 ___ cfe-commits

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-13 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Facebook was using it at one point (can't say if they are currently), I know that Sony had some interested users as well. Yes, the order matters - that was the reason that the flag was implemented in the first place. https://github.com/llvm/llvm-project/pull/84121

[clang] [Clang][AST] Print attributes of Obj-C interfaces (PR #84772)

2024-03-11 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/84772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Fix a few accidental refactoring artifacts (PR #83057)

2024-02-26 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/83057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Most of the new comments are nits and small readability tweaks. I still would like to avoid the double `dyn_cast` checks, but I don't know if this is worth holding up on at that point. Thank you for the multiple rounds on this and sorry

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-24 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/78445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,989 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,995 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-23 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-22 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-22 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #78445)

2024-02-21 Thread Saleem Abdulrasool via cfe-commits
@@ -0,0 +1,1014 @@ +//===--- SemaAPINotes.cpp - API Notes Handling ===// +// +// 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] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-17 Thread Saleem Abdulrasool via cfe-commits
@@ -3218,6 +3218,21 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one was passed

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-17 Thread Saleem Abdulrasool via cfe-commits
@@ -3218,6 +3218,21 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one was passed

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-17 Thread Saleem Abdulrasool via cfe-commits
@@ -3218,6 +3218,21 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one was passed

[clang] Add support for sysroot-relative system header search paths (PR #82084)

2024-02-17 Thread Saleem Abdulrasool via cfe-commits
@@ -3218,6 +3218,21 @@ static bool ParseHeaderSearchArgs(HeaderSearchOptions , ArgList , bool IsIndexHeaderMap = false; bool IsSysrootSpecified = Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); + + // Expand a leading `=` to the sysroot if one was passed

[clang] Frontend: sink vendor definitions from Basic to Frontend (PR #80364)

2024-02-04 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd updated https://github.com/llvm/llvm-project/pull/80364 >From c895dff0e59b9d851c15e5b3b25a735478b811fc Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 1 Feb 2024 15:37:39 -0800 Subject: [PATCH] Frontend: sink vendor definitions from Basic to Frontend

[clang] Frontend: sink vendor definitions from Basic to Frontend (PR #80364)

2024-02-03 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd updated https://github.com/llvm/llvm-project/pull/80364 >From 2bff496bd1b3c1bc5177f5072c2c7b8a4db54f14 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 1 Feb 2024 15:37:39 -0800 Subject: [PATCH] Frontend: sink vendor definitions from Basic to Frontend

[clang] Frontend: sink vendor definitions from Basic to Frontend (PR #80364)

2024-02-01 Thread Saleem Abdulrasool via cfe-commits
@@ -804,6 +804,11 @@ static void InitializePredefinedMacros(const TargetInfo , } } + if (TI.getTriple().getVendor() == Triple::AMD) +Builder.defineMacro("__AMD__"); + if (TI.getTriple().getVendor() == Triple::Apple) +Builder.defineMacro("__APPLE__");

[clang] Frontend: sink vendor definitions from Basic to Frontend (PR #80364)

2024-02-01 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: CC: @kubamracek https://github.com/llvm/llvm-project/pull/80364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Frontend: sink vendor definitions from Basic to Frontend (PR #80364)

2024-02-01 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd created https://github.com/llvm/llvm-project/pull/80364 The vendor specific macro definitions are based on the vendor rather than the target specific information. This ensures that `__APPLE__` is always defined for `*-apple-*` targets. Take the opportunity to do

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
@@ -463,7 +471,8 @@ class ObjCRuntime { case iOS: return true; case WatchOS: return true; case GCC: return false; -case GNUstep: return false; +case GNUstep: + return (getVersion() >= VersionTuple(2, 2)); compnerd wrote: The

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
@@ -2649,13 +2767,18 @@ CGObjCGNU::GenerateMessageSend(CodeGenFunction , } } + bool isDirect = Method && Method->isDirectMethod(); + IdTy = cast(CGM.getTypes().ConvertType(ASTIdTy)); llvm::Value *cmd; - if (Method) -cmd = GetSelector(CGF, Method); - else -

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
@@ -2006,6 +2024,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction , llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-21 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. Left some minor nits. https://github.com/llvm/llvm-project/pull/78030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] document correct defaults for `-fms-compatibility-version` / `-fmsc-version` (PR #76418)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd closed https://github.com/llvm/llvm-project/pull/76418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-cl] document correct defaults for `-fms-compatibility-version` / `-fmsc-version` (PR #76418)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Thank you for fixing the documentation! https://github.com/llvm/llvm-project/pull/76418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream dependencies of Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: Do we want to submit the first three in the series and then take on the topmost commit? https://github.com/llvm/llvm-project/pull/73017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-16 Thread Saleem Abdulrasool via cfe-commits
@@ -2601,6 +2604,22 @@ def SwiftError : InheritableAttr { let Documentation = [SwiftErrorDocs]; } +def SwiftImportAsNonGeneric : InheritableAttr { compnerd wrote: Ah, okay. https://github.com/llvm/llvm-project/pull/73017

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction , llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -3906,14 +4028,50 @@ llvm::Function *CGObjCGNU::GenerateMethod(const ObjCMethodDecl *OMD, CodeGenTypes = CGM.getTypes(); llvm::FunctionType *MethodTy = Types.GetFunctionType(Types.arrangeObjCMethodDeclaration(OMD)); - std::string FunctionName =

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction , llvm::Function *Fn, +

[clang] Enable direct methods and fast alloc calls for libobjc2. (PR #78030)

2024-01-14 Thread Saleem Abdulrasool via cfe-commits
@@ -1994,6 +2004,106 @@ class CGObjCGNUstep2 : public CGObjCGNUstep { { PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty, PtrToInt8Ty }); } +void GenerateDirectMethodPrologue(CodeGenFunction , llvm::Function *Fn, +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7539,74 +7559,65 @@ static NullabilityKind mapNullabilityAttrKind(ParsedAttr::Kind kind) { } } -/// Applies a nullability type specifier to the given type, if possible. -/// -/// \param state The type processing state. -/// -/// \param type The type to which the

[clang] [APINotes] Upstream Sema logic to apply API Notes to decls (PR #73017)

2024-01-12 Thread Saleem Abdulrasool via cfe-commits
@@ -7519,6 +7519,26 @@ static bool HandleWebAssemblyFuncrefAttr(TypeProcessingState , return false; } +/// Rebuild an attributed type without the nullability attribute on it. +static QualType rebuildAttributedTypeWithoutNullability(ASTContext , +

  1   2   3   4   5   6   7   8   9   >