[PATCH] D92176: Don't use sysroot/include when sysroot is empty.

2020-12-01 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D92176#2419011 , @manojgupta wrote: > lgtm but not an expert in this area. Ditto Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92176/new/ https://reviews.llvm.org/D92176

[PATCH] D94269: Adds -Wfree-nonheap-object to -Wmost

2021-01-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 315471. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94269/new/ https://reviews.llvm.org/D94269 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds.td clang/test/Analysis/NewDelete-intersections.mm

[PATCH] D94269: Adds -Wfree-nonheap-object to -Wmost

2021-01-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 315470. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94269/new/ https://reviews.llvm.org/D94269 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds.td clang/test/Analysis/NewDelete-intersections.mm

[PATCH] D94269: Adds -Wfree-nonheap-object to -Wmost

2021-01-20 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb closed this revision. cjdb added a comment. Merged in 4a47da2cf440c2f2006d9b04acfef4292de1e263 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94269/new/ https://reviews.llvm.org/D94269

[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

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

2021-05-18 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: gbiv, manojgupta, aaron.ballman. Herald added a reviewer: george.burgess.iv. Herald added subscribers: dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester,

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

2021-05-31 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. LGTM, but I'm neither a Clang nor core expert (and I'm not a maintainer), so please wait for others' approval. Comment at:

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

2021-05-30 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb requested changes to this revision. cjdb added a comment. This revision now requires changes to proceed. Thanks for working on this, it'll be a huge win for testing in libc++, methinks! Could we get a few more tests please? I'd like to know what happens when we put a lambda directly

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

[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] 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) || +

[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

[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

[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:

[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/

[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

[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

[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

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

2021-07-04 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 `atomic` (authored by cjdb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105400/new/

[PATCH] D101598: [clang][Sema] adds `[[clang::no_address]]` attribute

2021-04-30 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb created this revision. cjdb added reviewers: rsmith, gbiv, aaron.ballman, manojgupta. Herald added a reviewer: george.burgess.iv. cjdb requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. [namespace.std]/p6 indicates that taking the

[PATCH] D101598: [clang][Sema] adds `[[clang::no_address]]` attribute

2021-04-30 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. A different path forward was discussed with @ldionne and @zoecarver. Will experiment this other way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101598/new/ https://reviews.llvm.org/D101598

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

2021-02-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 38. cjdb marked 4 inline comments as done. cjdb added a comment. Herald added a subscriber: cfe-commits. addresses comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94640/new/

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

2021-02-08 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:10267-10277 + if (const auto *Field = dyn_cast(D)) { S.Diag(UnaryExpr->getBeginLoc(), diag::warn_free_nonheap_object) << CalleeName << Field; +return; + } + + if (const auto *Func =

[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

[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/

[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:

[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/

[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:

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

2021-02-23 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked an inline comment as done. cjdb added a comment. In D94640#2579447 , @aaron.ballman wrote: > In D94640#2560647 , @cjdb wrote: > >> fixes block expressions >> >> @aaron.ballman I'm not sure I follow

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

2021-02-23 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 325889. cjdb added a comment. applies @aaron.ballman's feedback 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] 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:

[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

[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:

[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

[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/

[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=chromium > : > > info->sync_fence_info = (uint64_t)

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Overall LGTM, thank you for working on this :-) Comment at: clang/lib/Sema/SemaDecl.cpp:13761-13771 +bool VisitDeclRefExpr(const DeclRefExpr *DRE) { + auto iter = M->find(DRE->getFoundDecl()); + if (iter != M->end() && iter->second) { +

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

2021-02-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 323414. cjdb added a comment. fixes block expressions @aaron.ballman I'm not sure I follow what you're after re lambdas. Could you please provide a test case that I can work with? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-02-12 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked 3 inline comments as done. cjdb added inline comments. Comment at: clang/test/Analysis/free.c:84 + // expected-warning@-1{{Argument to free() is a block, which is not memory allocated by malloc()}} + // expected-warning@-2{{attempt to call free on non-heap object

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

2021-02-11 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/test/Analysis/free.c:84 + // expected-warning@-1{{Argument to free() is a block, which is not memory allocated by malloc()}} + // expected-warning@-2{{attempt to call free on non-heap object : block expression}} }

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

2021-02-22 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb marked an inline comment as done. cjdb added a comment. Ping. @aaron.ballman any further requests? I think this is good to land otherwise? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D94640/new/ https://reviews.llvm.org/D94640

[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

[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

[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

[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

[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

[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

[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

[PATCH] D107873: [clang-tidy] Add 'performance-const-parameter-value-or-ref' for checking const-qualified parameters

2021-09-01 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.h:40 + static constexpr int DefaultSmallMaxSize = 16; + int SmallMaxSize = Options.get("SmallMaxSize", DefaultSmallMaxSize); + jmarrec wrote: >

[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#2874805 , @cjdb wrote: > In D105439#2874733 , @lebedev.ri > wrote: > >> In D105439#2874706 , @ldionne >> wrote: >> >>> I'm not entirely

[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

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

[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/

[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 +

[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

[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

[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

[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 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

[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

[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 >

[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

[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

[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

[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:

[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

[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

[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:

[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:

[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

[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] D106898: Revert "Revert "[clang][pp] adds '#pragma include_instead'""

2021-07-29 Thread Christopher Di Bella via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG087195419719: Revert Revert [clang][pp] adds #pragma include_instead (authored by cjdb). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106898/new/

[PATCH] D106898: Revert "Revert "[clang][pp] adds '#pragma include_instead'""

2021-07-29 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 362806. cjdb marked an inline comment as done. cjdb added a subscriber: tstellar. cjdb added a comment. fixes up formatting and testing Will merge post-CI. @aaron.ballman do you approve this to be cherry-picked into LLVM 13? (cc @tstellar) Repository: rG

[PATCH] D106898: Revert "Revert "[clang][pp] adds '#pragma include_instead'""

2021-07-29 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:307 +def err_pragma_include_instead_system_reserved : Error< + "header '%0' is an implementation detail; #include %select{'%2'|either '%2' or '%3'|one of %2}1 instead">; +

[PATCH] D106898: Revert "Revert "[clang][pp] adds '#pragma include_instead'""

2021-07-28 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 362479. cjdb added a comment. - attempts to get CI passing (@aaron.ballman) - minimises test case (@hans) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106898/new/ https://reviews.llvm.org/D106898 Files:

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

2021-07-28 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. In D106394#2905660 , @dblaikie wrote: > Just a thought (nothing to hold up this patch/suggest a revert/suggest any > immediate action), but: > >> The problem with extending this to non-system headers is that you need a way >> to

[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");

[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,

[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

[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-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

[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

[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] 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: > >

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

2021-12-30 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 396748. cjdb edited the summary of this revision. cjdb added a comment. adds `__is_unbounded_array` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116280/new/ https://reviews.llvm.org/D116280 Files:

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

2021-12-30 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 396711. cjdb edited the summary of this revision. cjdb added a comment. rebases to activate CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116280/new/ https://reviews.llvm.org/D116280 Files:

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

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 396177. cjdb retitled this revision from "[clang] adds `__add_const` as a compiler built-in" to "[clang] adds unary type transformations as compiler built-ins". cjdb edited the summary of this revision. cjdb added a comment. merges D116205

[PATCH] D116242: [clang] adds `__remove_volatile` as a compiler built-in

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. Merged into D116203 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116242/new/ https://reviews.llvm.org/D116242 ___

[PATCH] D116226: [clang] adds `__remove_const` as a compiler built-in

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. Merged into D116203 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116226/new/ https://reviews.llvm.org/D116226 ___

[PATCH] D116260: [clang] adds `__remove_cv` as a compiler built-in

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. Merged into D116203 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116260/new/ https://reviews.llvm.org/D116260 ___

[PATCH] D116264: [clang] adds `__remove_cvref` as a compiler buiilt-in

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. Merged into D116203 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116264/new/ https://reviews.llvm.org/D116264 ___

[PATCH] D116205: [clang] adds `__add_volatile` as a compiler built-in

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. Merged into D116203 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116205/new/ https://reviews.llvm.org/D116205 ___

[PATCH] D116206: [clang] adds `__add_cv` as a compiler built-in

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb abandoned this revision. cjdb added a comment. Merged into D116203 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116206/new/ https://reviews.llvm.org/D116206 ___

[PATCH] D116262: [clang] adds `__remove_reference` as a compiler built-in

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Merged into D116203 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116262/new/ https://reviews.llvm.org/D116262 ___ cfe-commits mailing list

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

2021-12-24 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 396178. cjdb added a comment. minor fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116203/new/ https://reviews.llvm.org/D116203 Files: clang/include/clang/AST/Type.h clang/include/clang/Basic/Specifiers.h

  1   2   3   4   5   >