[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

2018-08-13 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 160347. mboehme added a comment. Rebase to head. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49910 Files: clang-tidy/bugprone/UseAfterMoveCheck.cpp docs/clang-tidy/checks/bugprone-use-after-move.rst test/clang-tidy/bugprone-use-aft

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-08-13 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 160348. mboehme marked 2 inline comments as done. mboehme added a comment. Rebase to head. Repository: rC Clang https://reviews.llvm.org/D49911 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/Sema/SemaDeclAttr.cpp test/Sema

[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

2018-08-13 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Thank you for the review! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-08-13 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC339569: Summary:Add clang::reinitializes attribute (authored by mboehme, committed by ). Changed prior to commit: https://reviews.llvm.org/D49911?vs=160348&id=160351#toc Repository: rC Clang https:/

[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

2018-08-13 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL339571: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after… (authored by mboehme, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://revie

[PATCH] D49910: Reviewers:

2018-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a subscriber: cfe-commits. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49910 Files: clang-tidy/bugprone/UseAfterMoveCheck.cpp docs/clang-tidy/checks/bugprone-use-after-move.rst test/clang-tidy/bugprone-use-after-move.cpp Inde

[PATCH] D49910: Reviewers:

2018-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 157669. mboehme added a comment. [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move. This allows member functions to be marked as reinitializing the object. After a moved-from object has been reinitialized, the check will n

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a subscriber: cfe-commits. This is for use by clang-tidy's bugprone-use-after-move check -- see corresponding clang-tidy patch at https://reviews.llvm.org/D49910. Repository: rC Clang https://reviews.llvm.org/D49911 Files: include/clang/Basic/Att

[PATCH] D49918: [clang-tidy] Sequence declaration in while statement before the condition

2018-07-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, xazax.hun. Fixes https://bugs.llvm.org/show_bug.cgi?id=36516. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49918 Files: clang-tidy/utils/ExprSequence.cpp test/cl

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-07-30 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 158051. mboehme added a comment. Various changes in response to reviewer comments. Repository: rC Clang https://reviews.llvm.org/D49911 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/Sema/SemaDeclAttr.cpp test/SemaCXX/attr

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-07-30 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added a comment. > Should this attribute have some semantic checking that ensures the non-static > data members are accessed in the function that claims it reinitializes the > object? I think this would be hard to do in a way that provides meani

[PATCH] D49918: [clang-tidy] Sequence declaration in while statement before the condition

2018-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 158314. mboehme added a comment. Add support for switch statement. While I'm here, also add support for the init statement in an if statement. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49918 Files: clang-tidy/utils/ExprSequence.cpp

[PATCH] D49918: [clang-tidy] Sequence declaration in while statement before the condition

2018-07-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:147 return TheIfStmt->getCond(); +} else if (const auto *TheWhileStmt = dyn_cast(Parent)) { + // While statement: If a variable is declared ins

[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Any comments? https://reviews.llvm.org/D49911, on which this relies, is now ready to land. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http:/

[PATCH] D49918: [clang-tidy] Sequence init statements, declarations, and conditions correctly in if, switch, and while

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. Any further comments? This is marked ready to land, but I've made some non-trivial changes since then, so I didn't just want to land this. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49918

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 159007. mboehme marked an inline comment as done. mboehme added a comment. Various changes in response to review comments. Repository: rC Clang https://reviews.llvm.org/D49911 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td lib/S

[PATCH] D49911: Summary:Add clang::reinitializes attribute

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added a comment. Thanks for the review! In https://reviews.llvm.org/D49911#1186185, @aaron.ballman wrote: > The attribute itself is looking reasonable aside from some minor nits, but > this should not be committed until the clang-tidy functional

[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In https://reviews.llvm.org/D49910#1187455, @aaron.ballman wrote: > Are you going to propose adding this attribute to libc++, or is this expected > to only work with UDTs? I don't have any experience contributing to libc++, but I think this would make sense. The chec

[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In https://reviews.llvm.org/D49910#1187809, @aaron.ballman wrote: > In https://reviews.llvm.org/D49910#1187492, @mboehme wrote: > > > In https://reviews.llvm.org/D49910#1187455, @aaron.ballman wrote: > > > > > Are you going to propose adding this attribute to libc++, or i

[PATCH] D49910: [clang-tidy] Recognize [[clang::reinitializes]] attribute in bugprone-use-after-move

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Sorry, that code got formatted strangely. Here's the same code block in more legible form: MyContainer container; T t; while (GetNextT(&t)) { container.Add(t); if (SomeCondition()) { PassToConsumer(std::move(container)); container.Clear(); }

[PATCH] D49918: [clang-tidy] Sequence init statements, declarations, and conditions correctly in if, switch, and while

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 159093. mboehme added a comment. Apply clang-format. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49918 Files: clang-tidy/utils/ExprSequence.cpp test/clang-tidy/bugprone-use-after-move.cpp Index: test/clang-tidy/bugprone-use-after-m

[PATCH] D49918: [clang-tidy] Sequence init statements, declarations, and conditions correctly in if, switch, and while

2018-08-03 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE338932: [clang-tidy] Sequence init statements, declarations, and conditions correctly… (authored by mboehme, committed by ). Changed prior to commit: https://reviews.llvm.org/D49918?vs=159093&id=15910

[PATCH] D56585: [clang-tidy] Treat references to smart pointers correctly in use-after-move.

2019-01-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: cfe-commits, xazax.hun. Previously, we weren't recognizing these as smart pointers and thus weren't allowing non-dereference accesses as we should -- see new test cases which fail without the fix. Repository: rCTE Clang Tools Extra http

[PATCH] D56585: [clang-tidy] Treat references to smart pointers correctly in use-after-move.

2019-01-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 181228. mboehme added a comment. Removing experimental code that shouldn't have been added. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56585/new/ https://reviews.llvm.org/D56585 Files: clang-tidy/bugprone/

[PATCH] D56585: [clang-tidy] Treat references to smart pointers correctly in use-after-move.

2019-01-15 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D56585#1358477 , @JonasToth wrote: > LGTM, is there a bug report for this issue? If yes please close that too :) Thanks for the reminder! This was a bug that was reported internally, so there is no LLVM bug for this. Reposi

[PATCH] D56585: [clang-tidy] Treat references to smart pointers correctly in use-after-move.

2019-01-15 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL351303: [clang-tidy] Treat references to smart pointers correctly in use-after-move. (authored by mboehme, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAS

[PATCH] D52782: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)

2018-10-02 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: cfe-commits, xazax.hun. Before this fix, the bugprone-use-after-move check could incorrectly conclude that a use and move in a function template were not sequenced. For details, see https://bugs.llvm.org/show_bug.cgi?id=39149 Repository:

[PATCH] D52782: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)

2018-10-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 168239. mboehme added a comment. - Responses to reviewer comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52782 Files: clang-tidy/bugprone/UseAfterMoveCheck.cpp clang-tidy/utils/ExprSequence.cpp clang-tidy/utils/ExprSequence.h

[PATCH] D52782: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)

2018-10-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:103 for (const Stmt *Parent : getParentStmts(S, Context)) { +// For statements that have multiple parents, make sure we're using the +// parent that l

[PATCH] D52782: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)

2018-10-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added a comment. In https://reviews.llvm.org/D52782#1254933, @JonasToth wrote: > Thanks for clarification :) Thanks! Do you agree this is ready to land now? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52782 _

[PATCH] D52782: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)

2018-10-04 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343768: [clang-tidy] Sequence statements with multiple parents correctly (PR39149) (authored by mboehme, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llv

[PATCH] D67627: Clang-format: Add Whitesmiths indentation style

2019-09-17 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D67627#1671638 , @echristo wrote: > Martin should know who should look at this... maybe Krasimir? Yes, I think he'd be a good person to look at this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D80781: [clang] Always allow including builtin headers in [no_undeclared_headers] modules.

2020-05-29 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a project: clang. Herald added a subscriber: cfe-commits. mboehme added a reviewer: rsmith. Previously, this would fail if the builtin headers had been "claimed" by a different module that wraps these builtin headers. libc++ does this, for example. T

[PATCH] D80781: [clang] Always allow including builtin headers in [no_undeclared_headers] modules.

2020-05-29 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Temporarily retracting from review as I've realized there's another case I need to take care of. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80781/new/ https://reviews.llvm.org/D80781 _

[PATCH] D80781: [clang] Always allow including builtin headers in [no_undeclared_headers] modules.

2020-05-29 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 267210. mboehme added a comment. When testing with the real libc++ and glibc, I realized that I was still getting a cyclic dependency between the two modules because the builtin stddef.h that glibc was including was still being ascribed to libc++. This modi

[PATCH] D81080: [clang-tidy] Compile fix: Change CPlusPlus2a to CPlusPlus20.

2020-06-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a reviewer: sammccall. mboehme added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. The name of the option was changed here: https://github.com/llvm/llvm-project/commit/6a30894391ca671bab1

[PATCH] D81079: [clangd] Add std::move() to a return statement to please some compilers.

2020-06-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a reviewer: sammccall. mboehme added a project: clang-tools-extra. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. This has been causing build errors in Swift CI. R

[PATCH] D81080: [clang-tidy] Compile fix: Change CPlusPlus2a to CPlusPlus20.

2020-06-03 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Already fixed in https://github.com/llvm/llvm-project/commit/fd2740143e626ca32432aac0b51b2880a3b1e0bc Retracting this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81080/new/ https://reviews.llvm.org/D81080 __

[PATCH] D81079: [clangd] Add std::move() to a return statement to please some compilers.

2020-06-03 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa3220dffcb1d: [clangd] Add std::move() to a return statement to please some compilers. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8

[PATCH] D80781: [clang] Always allow including builtin headers in [no_undeclared_headers] modules.

2020-06-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Committed as https://github.com/llvm/llvm-project/commit/8d74de9de6d6cca552d7de7d0bfd36b6dd7d58dc. I thought I had added a "Differential Revision:" to the commit message, but something must have gone wrong. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80781/n

[PATCH] D81392: [clang] Rename Decl::isHidden() to isUnconditionallyVisible()

2020-06-08 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a reviewer: rsmith. mboehme added a project: clang. Herald added a subscriber: cfe-commits. Also invert the sense of the return value. As pointed out by the FIXME that this change resolves, isHidden() wasn't a very accurate name for this function. I

[PATCH] D81392: [clang] Rename Decl::isHidden() to isUnconditionallyVisible()

2020-06-12 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D81392#2088131 , @rsmith wrote: > I think renaming the flag in the AST dump output would be a good idea, though > it'll be a lot of churn in the tests. I would prefer that we continue to dump > a marker only if the declaration

[PATCH] D81392: [clang] Rename Decl::isHidden() to isUnconditionallyVisible()

2020-06-12 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2e92b397ae4b: [clang] Rename Decl::isHidden() to isUnconditionallyVisible(). (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81392/new/

[PATCH] D81732: [clang] Replace Decl::isUnconditionallyVisible() with Sema::isVisible()

2020-06-12 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a reviewer: rsmith. mboehme added a project: clang. Herald added a subscriber: cfe-commits. For context, see https://bugs.llvm.org/show_bug.cgi?id=46248 This handles only the easy cases in Sema/SemaDeclObjC.cpp. The cases in AST/DeclObjC.{h,cpp} will

[PATCH] D81732: [clang] Replace Decl::isUnconditionallyVisible() with Sema::isVisible()

2020-06-15 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D81732#2093260 , @dblaikie wrote: > Test case(s)? Is there anything specific you have in mind? This change should be behavior-preserving in the case where -fmodules-local-submodule-visibility isn't set, as evidenced by the e

[PATCH] D79486: [clang] Make arrangeCXX{Constructor,Method}Call() publicly available

2020-05-06 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a project: clang. Herald added a subscriber: cfe-commits. These are needed for C++ interop in Swift. See this Swift forum discussion for details: https://forums.swift.org/t/calling-c-constructors-looking-for-feedback-on-my-approach/34787/4?u=mboehme

[PATCH] D79486: [clang] Make arrangeCXX{Constructor,Method}Call() publicly available

2020-05-07 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Abandoning this change as I've realized I'm going to need additional features, specifically those related to extra args passed for virtual base classes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79486/new/ https://revi

[PATCH] D79942: [clang] Add an API to retrieve implicit constructor arguments.

2020-05-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. mboehme added a project: clang. Herald added a subscriber: cfe-commits. This is needed in Swift for C++ interop. As part of this change, I've had to make some changes to the interface of CGCXXABI to return the additional parameters separately rather than adding the

[PATCH] D79942: [clang] Add an API to retrieve implicit constructor arguments.

2020-05-18 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Can someone commit for me? I've applied to have my SVN commit access transferred to github, but haven't gotten a response yet. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79942/new/ https://reviews.llvm.org/D79942 ___

[PATCH] D128439: [Clang][WIP] Don't call distributeTypeAttrsFromDeclarator() on empty list.

2022-06-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. Thanks for the pointer -- I wasn't aware of that document yet! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128439/new/ https://reviews.llvm.org/D128439 ___ cfe-commits mailing

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 440134. mboehme marked an inline comment as done. mboehme added a comment. Turn off clang-format for attr-declspec-ignored.cpp. It has existing formatting (indentation within namespaces) that's incompatible with clang-format. Repository: rG LLVM Github Mo

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 440492. mboehme added a comment. Remove `clang-format` directives from test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128499/new/ https://reviews.llvm.org/D128499 Files: clang/include/clang/Sema/Sema.h

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added inline comments. Comment at: clang/test/SemaCXX/attr-declspec-ignored.cpp:3-6 +// For this test, we want the contents of the namespaces to be indented, which +// clang-format doesn't like. Also, clang-format reformats the lo

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-27 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 440494. mboehme marked 2 inline comments as done. mboehme added a comment. Remove trailing spaces Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128499/new/ https://reviews.llvm.org/D128499 Files: clang/inclu

[PATCH] D128499: [Clang] Fix: Restore warning inadvertently removed by D126061.

2022-06-27 Thread Martin Böhme 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 rG86866107b89c: [Clang] Fix: Restore warning inadvertently removed by D126061. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D128706: [Clang] Disable clang-format entirely for clang/test tree.

2022-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a subscriber: JDevlieghere. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. See discussion here: https://github.com/llvm/llvm-project/issues/55982 We don't g

[PATCH] D128706: [Clang] Disable clang-format entirely for clang/test tree.

2022-06-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D128706#3615623 , @aaron.ballman wrote: > The changes here LGTM and I think this is the correct way to go. However, > since you discovered that it was perhaps intentional that we did some style > checking on tests, do you th

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-03-31 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 419642. mboehme added a comment. Herald added a project: All. Uploading newest version. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Files: clang/include/clang/B

[PATCH] D114235: [clang] Extend ParsedAttr to allow custom handling for type attributes

2022-04-01 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. As mentioned in my previous comment, here is the RFC proposing a new `annotate_type` attribute: https://discourse.llvm.org/t/rfc-new-attribute-annotate-type-iteration-2/61378 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-07 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 421159. mboehme added a comment. Add documentation and a unit test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Files: clang/include/clang/Basic/Attr.td clang

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-08 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 421506. mboehme added a comment. Documentation: Added discussion of type system implications and fixed syntax error in example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-08 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6387 +additional information specific to the annotation category. The optional +arguments must be constant expressions of arbitrary type. +

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 421930. mboehme marked 2 inline comments as done. mboehme added a comment. Various changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-11 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 4 inline comments as done. mboehme added a comment. In D111548#3439039 , @aaron.ballman wrote: > Also, you should add a release note about the new attribute Done. and check the Precommit CI pipeline failure out: > Failed Tests (1): > >

[PATCH] D123783: [clang] Eliminate TypeProcessingState::trivial.

2022-04-14 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This flag is redundant -- it's true iff `savedAttrs` is empty. Querying `savedAttrs.empty()` should not take any more time

[PATCH] D123783: [clang] Eliminate TypeProcessingState::trivial.

2022-04-18 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:170 /// Whether we saved the attributes in the decl spec. bool hasSavedAttrs; aaron.ballman wrote: > Isn't the same true for this variable? It seems like: > > `trivial` == `savedA

[PATCH] D123783: [clang] Eliminate TypeProcessingState::trivial.

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:170 /// Whether we saved the attributes in the decl spec. bool hasSavedAttrs; aaron.ballman wrote: > mboehme wrote: > > aaron.ballman wrot

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 423856. mboehme marked 2 inline comments as done. mboehme added a comment. Changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Fil

[PATCH] D124081: [clang] Reject non-declaration C++11 attributes on declarations.

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a reviewer: aaron.ballman. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang has allowed this so far, transferring the attributes to the declaration's type

[PATCH] D124083: [clang] [draft] Reject C++ 11 attributes appertaining to the wrong entity type.

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a reviewer: aaron.ballman. Herald added a project: All. mboehme requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. DRAFT -- do not review. Depends On D11

[PATCH] D124081: [clang] [draft] Reject non-declaration C++11 attributes on declarations.

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. I'd like to mark this patch as a draft so that Herald doesn't keep adding reviewers -- but I'm not sure how? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124081/new/ https://reviews.llvm.org/D124081 _

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 5 inline comments as done. mboehme added inline comments. Comment at: clang/lib/AST/TypePrinter.cpp:1686 + // would require retrieving the attribute arguments, which we don't have here. + if (T->getAttrKind() == attr::AnnotateType) +return;

[PATCH] D124081: [clang] [draft] Reject non-declaration C++11 attributes on declarations.

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D124081#3461731 , @aaron.ballman wrote: > In D124081#3461556 , @mboehme wrote: > >> I'd like to mark this patch as a draft so that Herald doesn't keep adding >> reviewers -- but I'm n

[PATCH] D124081: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-04-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D124081#3461761 , @aaron.ballman wrote: > [snip] > However, it sounds to me like you want anyone to be able to come by and > comment if they'd like while you're prepping the patch, so I'd stick with the > [WIP] in the tit

[PATCH] D123783: [clang] Eliminate TypeProcessingState::trivial.

2022-04-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 425145. mboehme marked an inline comment as done. mboehme added a comment. Eliminate hasSavedAttrs as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123783/new/ https://reviews.llvm.org/D123783 Files: c

[PATCH] D123783: [clang] Eliminate TypeProcessingState::trivial.

2022-04-26 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:170 /// Whether we saved the attributes in the decl spec. bool hasSavedAttrs; aaron.ballman wrote: > mboehme wrote: > > aaron.ballman wrot

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-28 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 5 inline comments as done. mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { aaron.ballman wrote: > mboehme wrote: > > aaron.ballman wrote: > > >

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-04-29 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { aaron.ballman wrote: > mboehme wrote: > > aaron.ballman wrote: > > > mboehme wrote: > > > > aaron.ballman wrot

[PATCH] D123783: [clang] Eliminate TypeProcessingState::trivial.

2022-04-29 Thread Martin Böhme via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. mboehme marked an inline comment as done. Closed by commit rG23c10e8d0f97: [clang] Eliminate TypeProcessingState::trivial. (authored by mboehme). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 426977. mboehme added a comment. Rebased to a more recent base change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Files: clang/docs/ReleaseNotes.rst clang/in

[PATCH] D124919: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a reviewer: aaron.ballman. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For backwards compatiblity, we only emit a warning if the attribute is one of the ex

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { aaron.ballman wrote: > mboehme wrote: > > aaron.ballman wrote: > > > mboehme wrote: > > > > aaron.ballman wrot

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 426990. mboehme added a comment. Changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D124919: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 426991. mboehme added a comment. Reuploaded because base revision changed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124919/new/ https://reviews.llvm.org/D124919 Files: clang/include/clang/Parse/Parser.h

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added inline comments. Comment at: clang/unittests/AST/AttrTest.cpp:89 +S::* [[clang::annotate_type("ptr_to_mem")]] ptr_to_member = &S::mem; +)cpp"); + aaron.ballman wrote: > The formatting looks a bit off for

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added a comment. In D111548#3483275 , @erichkeane wrote: > I don't really know how useful this ends up being, these attributes (since > they are part of `AttributedType` end up disappearing pretty quickl

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. In D111548#3483326 , @xbolva00 wrote: > This patch should not land until we see some real use cases to justify new > hundreds of lines of code. We should more careful and take maintenance

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-05 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { aaron.ballman wrote: > mboehme wrote: > > aaron.ballman wrote: > > > mboehme wrote: > > > > aaron.ballman wrot

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-05 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added a comment. In D111548#3483326 , @xbolva00 wrote: > Please answer points in “ Contributing Extensions to Clang “ > https://clang.llvm.org/get_involved.html I've added these to the RFC: https://discourse.llvm.org/t/rfc-new-attribute-annotate

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-09 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 428015. mboehme added a comment. Move some tests here that I originally added to https://reviews.llvm.org/D124919. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Files: clang/docs/ReleaseNotes.rst cl

[PATCH] D124919: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-05-09 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 428016. mboehme edited the summary of this revision. mboehme added a comment. Herald added a subscriber: jdoerfert. - Added warnings for "legacy" type attributes - Added documentation - Fixed TODOs in the code CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D124919: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-05-10 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 428318. mboehme added a comment. Simply code by replacing `ExtractDefiniteDeclAttrs()` function with `SlideAttrsToDeclSpec()`. This essentially inverts the logic: Instead of moving those attributes to a second list that should definitely remain on the decla

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-10 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { rsmith wrote: > mboehme wrote: > > aaron.ballman wrote: > > > mboehme wrote: > > > > aaron.ballman wrote: > >

[PATCH] D126061: [clang] [WIP] Reject non-declaration C++11 attributes on declarations

2022-05-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. mboehme requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. (

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { rsmith wrote: > mboehme wrote: > > rsmith wrote: > > > mboehme wrote: > > > > aaron.ballman wrote: > > > > > m

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { mboehme wrote: > rsmith wrote: > > mboehme wrote: > > > rsmith wrote: > > > > mboehme wrote: > > > > > aaron.b

[PATCH] D126062: [clang] Don't parse MS attributes in `ParseExportDeclaration()`.

2022-05-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As @rsmith commented on https://reviews.llvm.org/D111548: "That looks like it's simply a bug as far as I can tell, and that

[PATCH] D126066: [clang] Don't plumb access specifier attributes through Parser unnecessarily.

2022-05-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a project: All. mboehme requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. I noticed that a lot of functions in the parser take an `AccessAttrs` parameter

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-20 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { mboehme wrote: > mboehme wrote: > > rsmith wrote: > > > mboehme wrote: > > > > rsmith wrote: > > > > > mboehme

[PATCH] D67292: [clang-tidy] Fix bug in bugprone-use-after-move check

2019-09-09 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang-tools-extra/test/clang-tidy/bugprone-use-after-move.cpp:1198 +} + } for (int i = 0; i < 10; ++i) { gribozavr wrote: > ymandel wrote: > > gribozavr wrote: > > > Unless you think it is redundant, could you al

  1   2   3   4   5   6   >