[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-15 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz abandoned this revision. tamas.petz added a comment. In D75364#1966818 , @MyDeveloperDay wrote: > In D75364#1966743 , @tamas.petz > wrote: > > > Wow, I have missed that configuration option. > > I will

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-07 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:5149-5152 + if (BPI.BranchTargetEnforcement) +Fn->addFnAttr("branch-target-enforcement", "true"); + else +Fn->addFnAttr("branch-target-enforcement", "false");

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-07 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz added a comment. Wow, I have missed that configuration option. I will try it, I assume it should work. Looks like this change should be abandoned. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75364/new/ https://reviews.llvm.org/D75364

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-04-07 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz marked 2 inline comments as done. tamas.petz added a comment. @all, thank you for the review so far. The case I am trying to handle is way too ambiguous. IMHO looking at tokens only is not going to lead to a "perfect" formatter. The case I am trying to handle is quite common but it can

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-03 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1827-1828 + + auto RASignKind = getLangOpts().getSignReturnAddressScope(); + if (RASignKind != LangOptions::SignReturnAddressScopeKind::None) { +FuncAttrs.addAttribute("sign-return-address",

[PATCH] D77131: [clang] Move branch-protection from CodeGenOptions to LangOptions

2020-04-01 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz updated this revision to Diff 254174. tamas.petz added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77131/new/ https://reviews.llvm.org/D77131 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Basic/CodeGenOption

[PATCH] D77131: [clang] Move branch-protection from CodeGenOptions to LangOptions

2020-04-01 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz added a comment. Tests pass, however, I am not sure ParseLangArgs is called in all the necessary cases (see the occurrences in the code). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77131/new/ https://reviews.llvm.org/D77131 __

[PATCH] D77134: [clang][AARCH64] Add __ARM_FEATURE_{PAC, BTI}_DEFAULT defines

2020-03-31 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz added a comment. Depends on: https://reviews.llvm.org/D77131 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77134/new/ https://reviews.llvm.org/D77134 ___ cfe-commits mailing list cfe-commits

[PATCH] D77131: [clang] Move branch-protection from CodeGenOptions to LangOptions

2020-03-31 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz marked an inline comment as done. tamas.petz added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:402 #undef VALUE_CODEGENOPT - danielkiss wrote: > is this change necessary? I think there should be one new line at the end o

[PATCH] D77134: [clang][AARCH64] Add __ARM_FEATURE_{PAC, BTI}_DEFAULT defines

2020-03-31 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz created this revision. tamas.petz added a reviewer: momchil.velikov. tamas.petz added a project: clang. Herald added subscribers: cfe-commits, danielkiss. tamas.petz added a comment. Depends on: https://reviews.llvm.org/D77131 As defined by Arm C Language Extensions (ACLE) these macro

[PATCH] D77131: [clang] Move branch-protection from CodeGenOptions to LangOptions

2020-03-31 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz created this revision. tamas.petz added a reviewer: momchil.velikov. tamas.petz added a project: clang. Herald added a subscriber: cfe-commits. danielkiss added a comment. tamas.petz marked an inline comment as done. just a nit, LGTM otherwise. Comment at: clang/incl

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-03-30 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz added a comment. Friendly ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75364/new/ https://reviews.llvm.org/D75364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-03-02 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz updated this revision to Diff 247561. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75364/new/ https://reviews.llvm.org/D75364 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format/FormatTest.cpp Index: clang/unittests/Format/FormatTest.cpp ===

[PATCH] D75364: [clang-format] Handle macros in function params and return value

2020-02-28 Thread Tamas Petz via Phabricator via cfe-commits
tamas.petz created this revision. tamas.petz added reviewers: chandlerc, djasper. tamas.petz added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support to handle macros in function parameter list and function return type. Consider