[PATCH] D94640: adds more checks to -Wfree-nonheap-object

2021-02-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 326261. cjdb added a comment. applies @aaron.ballman's suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94640/new/ https://reviews.llvm.org/D94640 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D94640: adds more checks to -Wfree-nonheap-object

2021-02-25 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f395db86b5c: adds more checks to -Wfree-nonheap-object (authored by cjdb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94640/new/ https://reviews.llvm.or

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-06-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. When should we expect this to land? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103380/new/ https://reviews.llvm.org/D103380 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D107291: [clang][lexer] adds a way for tokens to track their physical spelling

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Tokens don't currently have a way to track their source-based spelling, which makes implementing some warnings difficult.

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Although the alternative tokens `bitand` and `and` _can_ respectively be used in place of `&` and `&&` for declarations,

[PATCH] D107294: [clang] adds warning to suggest users replace symbols with alt tokens

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. C++'s alternative tokens are a good way to improve readability and minimise bugs by expressing intention using words inst

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/test/Parser/warn-declare-references-with-symbols.cpp:2 +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -Wdeclare-references-with-symbols -verify %s + I'm pretty co

[PATCH] D107294: [clang] adds warning to suggest users replace symbols with alt tokens

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D107294#2920355 , @aaron.ballman wrote: > The usual community viewpoint on off-by-default diagnostics is that they're > generally low value and not something that users will manually enable. I was under the impression many warn

[PATCH] D107291: [clang][lexer] adds a way for tokens to track their physical spelling

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. In D107291#2920408 , @aaron.ballman wrote: > You should always be able to go back to the token's spelling through the > `SourceManager` object. Is there a reason why > `SourceManager::getCharacterData

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:5847-5849 +constexpr int AmpAmp = 1; +Diag(Loc, diag::warn_declare_references_with_symbols) +<< AmpAmp << AmpAmp; aaron.ballman wrote: > For consistency with the `Lv

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363546. cjdb marked 5 inline comments as done. cjdb edited the summary of this revision. cjdb added a comment. applies feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107292/new/ https://reviews.llvm.org/D1

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/test/Parser/warn-declare-references-with-symbols.cpp:2 +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -verify %s +// RUN: %clang_cc1 -std=c++20 -fsyntax-only -Wdeclare-references-with-symbols -verify %s + aaron.ballman

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D107292#2920637 , @dblaikie wrote: > Not a huge objection - but minor quandry: What's the motivation for this > patch? I don't know of any codebase that encourages/uses the alternative > tokens and I wonder if adding more usabil

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-02 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: eric_niebler. cjdb added a comment. In D107292#2920774 , @dblaikie wrote: > In D107292#2920746 , @cjdb wrote: > >> In D107292#2920637 , @dblaikie

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363638. cjdb retitled this revision from "[clang] adds warning to suggest users replace symbols with alt tokens" to "[clang-tidy] adds warning to suggest users replace symbols with words". cjdb edited the summary of this revision. cjdb added a comment. Herald ad

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. > Yes, the intention is for //this// patch to remain a Clang warning since it's cheap and can be on by default. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107292/new/ https://reviews.llvm.org/D107292 ___

[PATCH] D106394: [clang][pp] adds '#pragma include_instead'

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D106394#2922972 , @rsmith wrote: > I'm not in love with the design of this feature. Basing the accept / warn > decision on whether the inclusion is in a system header seems fragile and > doesn't seem to enforce the intended sema

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/UseAlternativeTokensCheck.h:5-6 +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// whisperity wrote: > This

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363831. cjdb edited the summary of this revision. cjdb added a comment. - updates licences - updates documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107294/new/ https://reviews.llvm.org/D107294 Files:

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens as references

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D107292#2923003 , @rsmith wrote: > We should also warn on: > > - `and` or `bitand` used as a ref-qualifier in a member function declaration > - `xor` used to declare a block pointer type or block pointer literal > - `bitand` used

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363850. cjdb added a comment. removes obsolete code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107294/new/ https://reviews.llvm.org/D107294 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt cl

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens in declarations

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363927. cjdb retitled this revision from "[clang] adds warning to alert user when they use alternative tokens as references" to "[clang] adds warning to alert user when they use alternative tokens in declarations". cjdb edited the summary of this revision. cjdb

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 364307. cjdb marked 5 inline comments as done. cjdb edited the summary of this revision. cjdb added a comment. - renames check to 'readability-alternative-tokens' - adds section in documentation about configurability - adds support for C source - corrects whitesp

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp:133-134 "readability-uppercase-literal-suffix"); +CheckFactories.registerCheck( +"readability-use-alternative-tokens"); CheckFactories.registerChe

[PATCH] D107528: [llvm][clang][NFC] updates inline licence info

2021-08-04 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: aaron.ballman, chandlerc, lattner, tonic. Herald added subscribers: dexonsmith, martong, pengfei, arphaman, kbarton, hiraditya, nemanjai, qcolombet, MatzeB. cjdb requested review of this revision. Herald added projects: clang, LLDB, LLVM, clang-too

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 364555. cjdb marked 10 inline comments as done. cjdb added a comment. - adds TODOs - adds asserts - removes "imported" SourceManager (apparently there was already a pointer in `Result`) - fixes C++ documentation to match opening line of RST doc Repository: r

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked an inline comment as done. cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/AlternativeTokensCheck.h:20-21 +namespace readability { +/// Flags uses of symbol-based bitwise and logical operators. +class AlternativeTokensCheck : public C

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Ping @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107294/new/ https://reviews.llvm.org/D107294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens in declarations

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Ping @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107292/new/ https://reviews.llvm.org/D107292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. Herald added subscribers: xazax.hun, mgorny. cjdb requested review of this revision. Herald added projects: LLVM, clang-tools-extra. Herald added subscribers: cfe-commits, llvm-commits. Checks ``const``-qualified parameters to deter

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Work left to do in this patch: add user options. Figured getting a non-config version up for review first would be a good idea. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107873/new/ https://reviews.llvm.org/D107873 _

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Those CI failures are kinda embarrassing. Is there any way to leverage clang-format in a case like this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107873/new/ https://reviews.llvm.org/D107873

[PATCH] D107528: [llvm][clang][NFC] updates inline licence info

2021-08-10 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 365648. cjdb added a comment. uploading solely for a fast visual inspection on the diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107528/new/ https://reviews.llvm.org/D107528 Files: clang-tools-extra/clang-

[PATCH] D107528: [llvm][clang][NFC] updates inline licence info

2021-08-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. cjdb marked 3 inline comments as done. Closed by commit rGc874dd53628d: [llvm][clang][NFC] updates inline licence info (authored by cjdb). Changed prior to commit: h

[PATCH] D107900: Add a new clang-tidy check for trivially copyable types passed by const reference

2021-08-11 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-pod-const-ref-to-value.rst:21 + + If set to `true`, this check will limit itself to the `builtinType()` types. Default is `false`. jmarrec wrote: > Quuxplusone wrote: > > D1

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/AlternativeTokensCheck.cpp:85 + assert(First != nullptr); + if (std::isalpha(*First) || Loc.isMacroID()) +return; aaron.ballman wrote: > `isLetter()`? (or potentially `isIdent

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens in declarations

2021-08-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D107292#2939521 , @aaron.ballman wrote: > In D107292#2923261 , @cjdb wrote: > >> Patch 2: expressions >> >> xor {} >> bitand x // warning will suggest std::addressof in C++ land >> and la

[PATCH] D107900: Add a new clang-tidy check for trivially copyable types passed by const reference

2021-08-13 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-pod-const-ref-to-value.rst:21 + + If set to `true`, this check will limit itself to the `builtinType()` types. Default is `false`. jmarrec wrote: > cjdb wrote: > > jmarrec w

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 366456. cjdb marked 9 inline comments as done. cjdb added a comment. - adds user options - removes use of `auto` - fixes header comment - removes unused type - fixes documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D107873: [WIP][clang-tidy] adds a const-qualified parameter check

2021-08-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked an inline comment as done. cjdb added a comment. @jmarrec I believe you wanted to import a discussion from D107900 ? Comment at: clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.cpp:57 +namespace { +bool isSharedP

[PATCH] D107873: [clang-tidy] adds a const-qualified parameter check

2021-08-14 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 366457. cjdb retitled this revision from "[WIP][clang-tidy] adds a const-qualified parameter check" to "[clang-tidy] adds a const-qualified parameter check". cjdb added a comment. removes WIP tag from patch name Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2021-08-16 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. @JonasToth, @aaron.ballman suspects that there's enough overlap between this patch and D107873 to consider merging the two efforts. I'm happy to collaborate, but we should probably check that our goals are aligned. Are you active on the L

[PATCH] D102728: [clang][Sema] removes -Wfree-nonheap-object reference param false positive

2021-06-28 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Oops, looks like I never submitted my replies! Comment at: clang/lib/Sema/SemaChecking.cpp:10466 if (isa(D)) - return CheckFreeArgumentsOnLvalue(S, CalleeName, UnaryExpr, D); + if (!isa(D) || + !dyn_cast(D)->getType()->isReferenceTy

[PATCH] D105400: [clangd][iwyu] explicitly includes ``

2021-07-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. Herald added subscribers: usaxena95, kadircet, jfb, arphaman. cjdb requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Compiling clangd with Clang modules and libc++ revealed that `

[PATCH] D105400: [clangd][iwyu] explicitly includes ``

2021-07-03 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG478092d33116: [clangd][iwyu] explicitly includes `` (authored by cjdb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105400/new/ https://reviews.ll

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: aaron.ballman, rsmith, manojgupta, gbiv, ldionne, EricWF. Herald added a reviewer: george.burgess.iv. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. libc++ has started splicing standar

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. A few notes to reviewers: - The patch assumes everything is under a top-level `__libcxx` directory, because it seems there are other system headers that could be prefixed with `__`. libc++ currently has many top-level directories, following the trend of `__${STD_LIB_HEADE

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D105439#2858291 , @Quuxplusone wrote: > Step 1 should be to find out if this is even a problem at all. For example, > try using one of these tools to compile a C++ program against GNU libstdc++, > or against a library like rang

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-05 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. I should note that I didn't use private headers in libc++'s `modules.modulemap` because it created a very noticeable impact to our test suite's run-time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105439/new/ https://revie

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-07 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. I tried the following, but it doesn't work with modules, so it looks like a compiler solution is necessary. // in #define _LIBCPP_PRIVATE_HEADER_ALLOWED // in <__algorithm/find.h> #ifndef _LIBCPP_PRIVATE_HEADER_ALLOWED #error This is a libc++ detail header. Pl

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Ping @aaron.ballman and @ldionne Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105439/new/ https://reviews.llvm.org/D105439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D105439#2871429 , @Quuxplusone wrote: > Given that the goal is to get `include-what-you-use` to stop suggesting that > users `#include <__detail/fooimpl.h>` when what they want is spelled > ``, I think what's desired here (if a

[PATCH] D102728: [clang][Sema] removes -Wfree-nonheap-object reference param false positive

2021-07-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 358127. cjdb marked 6 inline comments as done. cjdb added a comment. responds to feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102728/new/ https://reviews.llvm.org/D102728 Files: clang/lib/Sema/SemaChe

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-13 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D105439#2874706 , @ldionne wrote: > I'm not entirely sure I understand the purpose of this patch. So the idea is > that let's say a tool suggests including `<__algorithm/find.h>` to get the > definition of `std::find` as a IWYU

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-13 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D105439#2874733 , @lebedev.ri wrote: > In D105439#2874706 , @ldionne wrote: > >> I'm not entirely sure I understand the purpose of this patch. So the idea is >> that let's say a tool sug

[PATCH] D105439: [clang] protects users from relying on libc++ detail headers

2021-07-13 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D105439#2874805 , @cjdb wrote: > In D105439#2874733 , @lebedev.ri > wrote: > >> In D105439#2874706 , @ldionne >> wrote: >> >>> I'm not entirely

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-02-25 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added a reviewer: aaron.ballman. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. ... unless it's a literal Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D97512 Files: clang/lib/Se

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-02-26 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 326723. cjdb edited the summary of this revision. cjdb added a comment. updates commit message to explain what's going on and why the change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97512/new/ https://reviews

[PATCH] D94640: adds more checks to -Wfree-nonheap-object

2021-02-26 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D94640#2590512 , @thakis wrote: > This seems to flag > https://source.chromium.org/chromium/chromium/src/+/master:third_party/libsync/src/sync.c;l=142?q=sync.c&ss=chromium > : > > info->sync_fence_info = (uint64_t) calloc(num_f

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-02-26 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 326742. cjdb marked 2 inline comments as done. cjdb added a comment. applies comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97512/new/ https://reviews.llvm.org/D97512 Files: clang/lib/Sema/SemaChecking.

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-02-26 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a subscriber: rsmith. cjdb added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10320 + + const clang::CastKind Kind = Cast->getCastKind(); + if (Kind == clang::CK_BitCast && aaron.ballman wrote: > We don't typically use top-level `cons

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-02-26 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 326748. cjdb added a comment. `s/IgnoreImplicitAsWritten/IgnoreParenImpCasts/` since the latter seems to work. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97512/new/ https://reviews.llvm.org/D97512 Files: cla

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-02-26 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked an inline comment as done. cjdb added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10326 + !isa( + Cast->getSubExpr()->IgnoreImplicitAsWritten()->IgnoreParens())) +return; cjdb wrote: > aaron.ballman wrote: > > I'm no

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-03-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10326 + !isa( + Cast->getSubExpr()->IgnoreImplicitAsWritten()->IgnoreParens())) +return; thakis wrote: > cjdb wrote: > > cjdb wrote: > > > aaron.ballman wrote: > > > > I'm n

[PATCH] D97512: [clang] removes check against integral-to-pointer conversion...

2021-03-04 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9830901b341c: [clang] removes check against integral-to-pointer conversion... (authored by cjdb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97512/new/ h

[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] 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] 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] 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] 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] 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. @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] 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. 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] 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] 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] 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] 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] 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-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] 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-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] 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-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] 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] 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 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 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] 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 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 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] 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 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 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] 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 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 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] 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] 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] 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

<    1   2   3   4   5   >