[PATCH] D135339: [clang] makes `__is_destructible` KEYCXX instead of KEYMS

2022-10-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: aaron.ballman, shafik, erichkeane. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This makes it possible to be used in all modes, instead of just when `-fm

[PATCH] D135338: [clang] adds move-assignable type-trait builtins

2022-10-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: aaron.ballman, shafik, erichkeane. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - `__is_move_assignable` - `__is_nothrow_move_assignable` - `__is_trivial

[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

2022-10-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:24 #include "clang/AST/RecursiveASTVisitor.h" +#include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" shafik wrote: > Why also `Type.h`? The most likely reason is that it's come from D11

[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

2022-10-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:2630 // CUDA device code and some other targets don't support VLAs. -targetDiag(Loc, (getLangOpts().CUDA && getLangOpts().CUDAIsDevice) -? diag::err_cuda_vla -

[PATCH] D135240: [clang] adds move-constructible type-trait builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - `__is_move_constructible` - `__is_nothrow_move_constructible` - `__is_trivially_move_const

[PATCH] D135239: [clang] adds copy-assignable type-trait builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465286. cjdb edited the summary of this revision. cjdb added a comment. corrects commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135239/new/ https://reviews.llvm.org/D135239 Files: clang/include/cl

[PATCH] D135238: [clang] adds copy-constructible type-trait builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465285. cjdb edited the summary of this revision. cjdb added a comment. rewords commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135238/new/ https://reviews.llvm.org/D135238 Files: clang/include/cla

[PATCH] D135239: [clang] adds copy-assignable type-trait builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - `__is_copy_assignable` - `__is_nothrow_copy_assignable` - `__is_trivially_copy_assignable`

[PATCH] D135238: [clang] adds copy-constructible type-trait builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465278. cjdb added a comment. Restarts CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135238/new/ https://reviews.llvm.org/D135238 Files: clang/include/clang/Basic/TokenKinds.def clang/lib/Parse/ParseDeclCX

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465277. cjdb edited the summary of this revision. cjdb added a comment. Updates the commit message so patch applications work Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135177/new/ https://reviews.llvm.org/D135

[PATCH] D135238: [clang] adds copy-constructible type-trait builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - `__is_copy_constructible` - `__is_nothrow_copy_constructible` - `__is_trivially_copy_constructible` This is information that th

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465273. cjdb added a comment. Replaces `T`/`F` with `static_assert` to match D116203 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135177/new/ https://reviews.llvm.org/D135177

[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465272. cjdb added a comment. Changes `T`/`F` to `static_assert` to match D116203 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135175/new/ https://reviews.llvm.org/D135175 Fil

[PATCH] D135177: [clang] adds `__is_scoped_enum`, `__is_nullptr`, and `__is_referenceable`

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ... as builtins. This is information that the compiler already has, and should be exposed s

[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465057. cjdb added a comment. adds missing property Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135175/new/ https://reviews.llvm.org/D135175 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/inc

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 465048. cjdb added a comment. uploading for archival purposes, will abandon the review in a moment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116280/new/ https://reviews.llvm.org/D116280 Files: clang/include

[PATCH] D135175: [clang] adds `__is_bounded_array` and `__is_unbounded_array` as builtins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This is information that the compiler already has, and should be exposed so that the library

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-10-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. This commit is suffering from feature creep, which has a whole host of problems associated with it. I'm going to dump everything that I've got related to the patch here for archival purposes, abandon it, and then spin out tiny CLs, some of which are hopefully trivial to re

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-09-11 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D130867#3781492 , @ldionne wrote: > In D130867#3781429 , @cjdb wrote: > >> I had not realised that libc++ was listed as a reviewer. > > The change does have an impact on libc++, so I think

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-09-09 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. I had not realised that libc++ was listed as a reviewer. I am going to abandon this revision, since I only wish to interact with that community when it is both business-critical and unavoidable. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-09-07 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-09-06 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D130867#3759181 , @aaron.ballman wrote: > Thanks for working on this; these sort of improvements to compile time > overhead are very much appreciated! > > Has this been tested against libc++ (our preccommit CI doesn't test that)

[PATCH] D132821: [clang][Parse] Fix crash when emitting template diagnostic

2022-08-29 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb accepted this revision. cjdb added a comment. This revision is now accepted and ready to land. Thanks for looking into this so quickly. LGTM with Aaron's suggested changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132821/new/ https://revi

[PATCH] D132821: [clang][Parse] Fix crash when emitting template diagnostic

2022-08-29 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:779 + "|refers to a variable template||refers to a concept|" + "refers to a concept template}1">; def err_id_after_template_in_nested_name_spec : Error< Is "concept templ

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-26 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG82e893c47c77: [clang] Enable output of SARIF diagnostics (authored by abrahamcd, committed by cjdb). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Frontend/SARIFDiagnosticPrinter.cpp:53 + OS.flush(); +} + aaron.ballman wrote: > Should we be invalidating that `SARIFDiag` object here so the printer cannot > be used after the source file has ended? I suggeste

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-25 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Frontend/SARIFDiagnostic.cpp:191 +#ifdef _WIN32 + TmpFilename = (*File)->getName(); + llvm::sys::fs::make_absolute(TmpFilename); denik wrote: > cjdb wrote: > > aaron.ballman wrote: > > > Note: this is no

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-08-25 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. This patch has been open for weeks without maintainer input, despite repeated requests, and @abrahamcd finishes his internship this Friday. We would very much appreciate direction on whether or not D128372 is ready to be merged. Reposit

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb accepted this revision. cjdb added a comment. This revision is now accepted and ready to land. Open comments notwithstanding, I'm happy with this patch. Thank you for working on this, it's a huge step towards getting more helpful diagnostics for C++! @aaron.ballman, @vaibhav.y, do you folks

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-08-23 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 455051. cjdb edited the summary of this revision. cjdb added a comment. changes RemoveReference to BuiltinRemoveReference Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116280/new/ https://reviews.llvm.org/D116280

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-23 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/include/clang/Frontend/SARIFDiagnosticPrinter.h:41 + void setPrefix(llvm::StringRef Value) { +Prefix = std::move(Value); + } We don't need to move a StringRef. Comment at: clang/lib/Frontend/S

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-23 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:727-728 + static_cast(&CI.getDiagnosticClient()) + ->setSarifWriter(std::unique_ptr( + new SarifDocumentWriter(CI.getSourceManager(; +} Now that the i

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-23 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 454908. cjdb added a comment. rebases onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130867/new/ https://reviews.llvm.org/D130867 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Builtins

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-08-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. e137fb6fb85 should fix this issue. Thanks for your patience! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116203/new/ https://reviews.llvm.org/D116203 _

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-08-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. I think there's a forward fix available, but since I can't repro locally, I'm going to need to push it to main and observe how the tools fare. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116203/new/ https://reviews.llvm.org

[PATCH] D131632: [clang] Enable output of SARIF diagnostics

2022-08-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. This looks great, thank you so much @abrahamcd! Comment at: clang/include/clang/Frontend/SARIFDiagnosticPrinter.h:31 +class SARIFDiagnosticPrinter : public DiagnosticConsumer { + raw_ostream &OS; + IntrusiveRefCntPtr DiagOpts; Please mak

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-08-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. @fdeazeve I haven't been able to repro this issue at all. In D116203#3740092 , @fdeazeve wrote: > In D116203#3740015 , @cjdb wrote: > >> In D116203#3739856

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-08-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. @njames93, @LegalizeAdulthood, are there any further concerns regarding this CL? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___ cfe-c

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-08-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D116203#3739856 , @fdeazeve wrote: > It seems like non-lldb bots are also failing, if it makes it easier to > reproduce: > > https://green.lab.llvm.org/green/view/Clang/job/clang-stage1-RA/30837/consoleFull#-54352964249ba4694-1

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 452358. cjdb added a comment. rebase messed up diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130867/new/ https://reviews.llvm.org/D130867 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Buil

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 452357. cjdb added a comment. applies a fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130867/new/ https://reviews.llvm.org/D130867 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Builtins.def

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-08-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked an inline comment as done. cjdb added inline comments. Comment at: clang/include/clang/Sema/DeclSpec.h:424-431 + static bool isTransformTypeTrait(TST T) { +constexpr TST Traits[] = { +#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) TST_##Trait, +#include "clang/AST/Tr

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-08-11 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Thanks for patiently reviewing! I'll do the libc++ stuff and a pilot run in some code. Hopefully can get it merged tomorrow :-) Comment at: clang/lib/Parse/ParseDeclCXX.cpp:1149-1150 + default: +assert(false && "passed in an unhandled type transforma

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-09 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb accepted this revision. cjdb added a comment. This revision is now accepted and ready to land. In D130894#3709431 , @aaron.ballman wrote: > In D130894#3709027 , @tbaeder wrote: > >> I don't really want to bi

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-08-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:177-178 + diag(NonMemberLoc, "ignoring the result of '%0', did you mean 'clear()'?") + << llvm::dyn_cast(NonMemberCall->getCalleeDecl()) + ->getQ

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-07 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:5726-5731 + FirstArgType = S.BuiltinAddReference( + dyn_cast( + dyn_cast(FirstArgType)->getNamedType()) + ->getArg(0) + .getAsType(), + Sema::UTTKind::AddLvalueReference,

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-06 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 450587. cjdb added a comment. rebases to ToT Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130867/new/ https://reviews.llvm.org/D130867 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/Builtins.de

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-08-06 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 450585. cjdb added a comment. fixes commit update mistake and rebases to ToT Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116280/new/ https://reviews.llvm.org/D116280 Files: clang/include/clang/Basic/Diagnosti

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-06 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 450584. cjdb added a comment. adds logic to diagnose misqualified pointer-to-member functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130867/new/ https://reviews.llvm.org/D130867 Files: clang/docs/Release

[PATCH] D130867: [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-08-06 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 450581. cjdb retitled this revision from "WORK-IN-PROGRESS [clang] adds builtin `std::invoke` and `std::invoke_r`" to "[clang] adds builtin `std::invoke` and `std::invoke_r`". cjdb edited the summary of this revision. cjdb added a comment. updates commit messag

[PATCH] D130894: [clang] Print more information about failed static assertions

2022-08-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Thank you so much for working on this! It's been on my todo list for a while and just haven't gotten around to it. In D130894#3702166 , @aaron.ballman wrote: > In D130894#3701749 , @tbaede

[PATCH] D131084: Add support for specifying the severity of a SARIF Result.

2022-08-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: Naghasan. cjdb added a comment. In D131084#3699223 , @aaron.ballman wrote: > In D131084#3697678 , @cjdb wrote: > >> It seems I got confused and conflated the two this morning. >> >> In D1

[PATCH] D131084: Add support for specifying the severity of a SARIF Result.

2022-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. It seems I got confused and conflated the two this morning. In D131084#3697525 , @vaibhav.y wrote: >> Hmm, we can probably use "informational" for notes, warnings, and remarks, >> but I'm kinda partial to proposing the latter two u

[PATCH] D131084: Add support for specifying the severity of a SARIF Result.

2022-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D131084#3697211 , @vaibhav.y wrote: > Submitting for review: > > Some notes: > > There are a couple of ways I think we can acheive this, per the spec: > > 1. The reportingDescriptor (rule) objects can be given a default > configu

[PATCH] D130867: WORK-IN-PROGRESS [clang] adds builtin `std::invoke` and `std::invoke_r`

2022-07-31 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: aaron.ballman, rsmith. Herald added a reviewer: NoQ. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `std::invoke` and `std::invoke_r` are fairly easy to im

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-07-30 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked 13 inline comments as done. cjdb added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1755-1756 + Tok.setKind(tok::identifier); + Diag(Tok, diag::ext_keyword_as_ident) + << Tok.getIdentifierInfo()->getName() << 0; + goto ParseIdenti

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-07-30 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 448806. cjdb added a subscriber: rsmith. cjdb added a comment. I think this covers all the feedback @rsmith has provided, though my treatment of `BuildPointerType` and `BuildReferenceType` might be wrong. Hopefully `__make_signed` and `__make_unsigned` are corr

[PATCH] D130058: [Clang] Diagnose ill-formed constant expression when setting a non fixed enum to a value outside the range of the enumeration values

2022-07-27 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx11.cpp:2420 + constexpr E1 x2 = static_cast(8); // expected-error {{must be initialized by a constant expression}} + // expected-note@-1 {{integer value 8 is outside the valid range of values [-

[PATCH] D129886: [clang] Add -fdiagnostics-format=sarif option for future SARIF output

2022-07-21 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG119d22310bd6: [clang] Add -fdiagnostics-format=sarif option for future SARIF output (authored by abrahamcd, committed by cjdb). Repository: rG LLV

[PATCH] D129886: [clang] Add -fdiagnostics-format=sarif option for future SARIF output

2022-07-19 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4009-4011 +if (StringRef(A->getValue()) == "sarif") { + D.Diag(diag::warn_drv_sarif_format_unstable); +} aaron.ballman wrote: > Do we want to be kind to people who spell it

[PATCH] D129886: [clang] Add -fdiagnostics-format=sarif option for future SARIF output

2022-07-19 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb accepted this revision. cjdb added a comment. This revision is now accepted and ready to land. Thanks for working on this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129886/new/ https://reviews.llvm.org/D129886

[PATCH] D129886: [clang] Add -fdiagnostics-format=sarif option for future SARIF output

2022-07-18 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:684 + "diagnostic formatting in SARIF mode is currently unstable">, + InGroup>; } abrahamcd wrote: > Please let me know if there's a better warning group you think this

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-17 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:9438 // FIXME: Pass in the explicit template arguments? ArgumentDependentLookup(Name, Loc, Args, Fns); rsmith wrote: > It would seem preferable to me to do the filtering in > `Argume

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-17 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D129951#3657923 , @cjdb wrote: > ~~Looking at the output from Clang 14 , I'm > observing that a binary with 178 function templates is 13% the size of the > one with 89 function objects. When only

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Looking at the output from Clang 14 , I'm observing that a binary with 178 function templates is 13% the size of the one with 89 function objects. When only one function object is used vs all 178 function templates, the functions still win

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 445286. cjdb edited the summary of this revision. cjdb added a comment. updates an inaccuracy in the commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129951/new/ https://reviews.llvm.org/D129951 Files

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 445285. cjdb added a comment. moves test from Sema to SemaCXX I Noticed that SemaCXX is only a test directory, and that there's no corresponding SemaCXX in either include or lib. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D129951: [clang] teaches Clang the special ADL rules for functions in std::ranges

2022-07-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Per per [range.iter.ops]/2 and [algorithms.requirements]/2, functions declared in the namesp

[PATCH] D129886: [clang] Add -fdiagnostics-format=sarif for SARIF diagnostics

2022-07-15 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Thanks for getting this started! To get this ready for submission, would you be able to add a test please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129886/new/ https://reviews.llvm.org/D129886 __

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-15 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: ldionne. cjdb added a comment. In D129835#3655487 , @aaron.ballman wrote: >> When we have a function that can have its value discarded, we can use >> [[clang::discardable]] to indicate that the `[[nodiscard]]` attribute should

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 444890. cjdb added a comment. undoes editor autotrimming of spaces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129835/new/ https://reviews.llvm.org/D129835 Files: clang/docs/ReleaseNotes.rst clang/include/c

[PATCH] D129835: [clang] adds a discardable attribute

2022-07-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Although the default behaviour for C and C++ is to not

[PATCH] D129538: [clang] adds prototype for being able to alternate diagnostic formats

2022-07-11 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 443833. cjdb added a comment. `arc diff` no longer seems to autoformat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129538/new/ https://reviews.llvm.org/D129538 Files: clang/include/clang/Basic/Diagnostic.h

[PATCH] D129538: [clang] adds prototype for being able to alternate diagnostic formats

2022-07-11 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In an effort to move from unstructured text diagnostics to structured diagnostics, while kee

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-07-07 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb accepted this revision. cjdb added a comment. Thanks for working on this! I'll merge this on your behalf once there's maintainer approval. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128372/new/ https://reviews.llvm.org/D128372 ___

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-07-07 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:128 + << FixItHint::CreateReplacement(ReplacementRange, "clear"); +} else { + diag(MemberLoc, "ignoring the result of 'empty()'"); Let's elimi

[PATCH] D128372: [Clang-Tidy] Empty Check

2022-06-27 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:76 + +auto Methods = Arg->getType()->getAsCXXRecordDecl()->methods(); +auto Clear = llvm::find_if(Methods, [](const CXXMethodDecl *F) { denik wrote: > C

[PATCH] D116280: [clang] adds unary type trait checks as compiler built-ins

2022-06-26 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 440079. cjdb added a comment. rebases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116280/new/ https://reviews.llvm.org/D116280 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/clang/Bas

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:5863 // FIXME: derive from "Target" ? - return WCharTy; + return IntTy; } rsmith wrote: > This change seems surprising. Can you explain what's going on here? Motivated by `__make_signed(wc

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:61 + "ignoring the result of 'empty()', did you mean 'clear()'? "); + Builder << FixItHint::CreateReplacement(ReplacementRange, "clear"); +} -

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D128372#3602881 , @tschuett wrote: > Just for reference: > https://reviews.llvm.org/D128267 Ack. I still think this CL is useful, given that not every library will have `[[nodiscard]]`, and because it can suggest appropriate alt

[PATCH] D128372: Clang-Tidy Empty Check

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. A great start, thanks! Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:51-57 +auto Methods = MemberCall->getRecordDecl()->methods(); +auto Clear = llvm::find_if(Methods, [](const CXXMethodDecl *F) { + return F->getDe

[PATCH] D128368: added clear check functionality

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. A great start, thanks! I understand this CL to have been sent out a few minutes in advance, so as a note to other reviewers: maybe check back in in ~20 minutes please? Comment at: clang-tools-extra/clang-tidy/bugprone/StandaloneEmptyCheck.cpp:52-55 +

[PATCH] D109701: [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

2022-06-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: abrahamcd. cjdb added a comment. I think this CL (which is quite large) might be worth just getting the functionality in, and deferring the in-tree usage to a second CL. That second CL probably should just lift the existing diagnostics so that they're in the message com

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-06-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1750 +#undef TRANSFORM_TYPE_TRAIT_DEF +if (NextToken().is(tok::less)) { + Tok.setKind(tok::identifier); rsmith wrote: > Here you're checking for `trait<` and treating it as an identifi

[PATCH] D126832: [clang][tablegen] adds human documentation to `WarningOption`

2022-06-10 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf21187eb2d94: [clang][tablegen] adds human documentation to `WarningOption` (authored by cjdb). Changed prior to commit: https://reviews.llvm.org/

[PATCH] D126832: [clang][tablegen] adds human documentation to `WarningOption`

2022-06-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D126832#3567035 , @aaron.ballman wrote: > In D126832#3554816 , @cjdb wrote: > >> In D126832#3553569 , >> @aaron.ballman wrote: >> >>> Can you po

[PATCH] D126832: [clang][tablegen] adds human documentation to `WarningOption`

2022-06-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 435255. cjdb marked 2 inline comments as done. cjdb added a comment. applies feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126832/new/ https://reviews.llvm.org/D126832 Files: clang/include/clang/Basic/

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-08 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG288c1bff96fc: [clang][driver] adds `-print-diagnostics` (authored by cjdb). Changed prior to commit: https://reviews.llvm.org/D126796?vs=435223&id

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/include/clang/Driver/Options.td:829 def Xoffload_linker : JoinedAndSeparate<["-"], "Xoffload-linker">, - HelpText<"Pass to the offload linkers or the ones idenfied by -">, + HelpText<"Pass to the offload linkers or the ones ide

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 435223. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126796/new/ https://reviews.llvm.org/D126796 Files: clang/include/clang/Driver/Options.td clang/lib/Basic/DiagnosticIDs.cpp clang/lib/Driver/Driver.cpp clang/test/Driver/print-diagnostic-opti

[PATCH] D126832: [clang][tablegen] adds human documentation to `WarningOption`

2022-06-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D126832#3553569 , @aaron.ballman wrote: > Can you post some examples of the output from this option so we can see what > the end results look like more easily? Right now this doesn't do anything at all, except feed the document

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 433901. cjdb added a comment. - simplifies code - minimises test to only a handful of cases CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126796/new/ https://reviews.llvm.org/D126796 Files: clang/include/clang/Driver/Options.td clang/lib/Basic/Dia

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Okay, I understand why `-W` isn't being printed now, but the missing ones are still a bit baffling. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126796/new/ https://reviews.llvm.org/D126796 ___ cfe-commits mailing list

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 433823. cjdb added a comment. Herald added subscribers: sstefan1, mgrang, aheejin. Herald added a reviewer: jdoerfert. - renames flag to `-print-diagnostic-options` - adds test - adds logic to get as many options to be visible as possible I'm very unhappy with t

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D126796#3551288 , @aaron.ballman wrote: > In D126796#3551280 , @MaskRay wrote: > >> In D126796#3551261 , @cjdb wrote: >> >>> In D126796#3550848 <

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-01 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D126796#3551834 , @tschuett wrote: > In D126796#3551781 , @cjdb wrote: > >> In D126796#3551312 , @tschuett >> wrote: >> >>> Would a JSON dump hel

[PATCH] D126832: [clang][tablegen] adds human documentation to `WarningOption`

2022-06-01 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Building on D126796

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-01 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D126796#3551312 , @tschuett wrote: > Would a JSON dump help you for your tools? Do you think a JSON dump would be more appropriate? I was just going for something not unlike `--help` here. Repository: rG LLVM Github Monorepo

[PATCH] D126796: [clang][driver] adds `-print-diagnostics`

2022-06-01 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D126796#3550848 , @MaskRay wrote: > FYI `diagtool tree` dumps the diagnostics. You can even provide -W options > and observe the differences. Is `diagtool tree` something that users widely know about? Repository: rG LLVM Git

<    1   2   3   4   5   >