[PATCH] D109611: Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all analyzer source

2022-02-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson reopened this revision. arichardson added a comment. This revision is now accepted and ready to land. I will try to get back to this soon, but it will probably not be this week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109611/new/

[PATCH] D109611: Fix CLANG_ENABLE_STATIC_ANALYZER=OFF building all analyzer source

2022-02-14 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson planned changes to this revision. arichardson added a comment. Have to fix `cmake -GNinja -DCLANG_ENABLE_STATIC_ANALYZER=OFF -DLLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra" -DCLANG_ENABLE_ARCMT=OFF ../llvm` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D130089: update-test-checks: safely handle tests with #if's

2022-07-19 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added inline comments. This revision is now accepted and ready to land. Comment at: llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/arm_function_name.ll:2 ; Check that we accept functions with '$' in the name. ; TO

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2019-12-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71499/new/ https://reviews.llvm.org/D71499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D72014: [PowerPC]: Add powerpcspe target triple subarch component

2019-12-30 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/test/Preprocessor/init.c:7628 +// PPC32-SPE-TGT:#define __SPE__ 1 // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -target-cpu 8548 < /dev/null | FileCheck -match-full-lines -check-prefix PPC85

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2019-12-31 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 235724. arichardson marked 9 inline comments as done. arichardson added a comment. - Address feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71499/new/ https://reviews.llvm.org/D71499 Files: clang

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 235764. arichardson marked an inline comment as done. arichardson added a comment. - Address remaining comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71499/new/ https://reviews.llvm.org/D71499 File

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 235798. arichardson added a comment. Address feedback: Avoid inttoptr by using ptrtoint + GEP instead. Using two GEPs for align_up seems to generate better code than select + a single GEP. See https://godbolt.org/z/UdPjZk Repository: rG LLVM Github M

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked an inline comment as done. arichardson added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14322 + if (SrcForMask->getType()->isPointerTy()) { +/// TODO: Use ptrmask instead of ptrtoint/inttoptr +// Result = Builder.CreateIntrinsic(

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 235799. arichardson added a comment. - Also update the other codegen test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71499/new/ https://reviews.llvm.org/D71499 Files: clang/docs/LanguageExtensions.rst

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 235848. arichardson marked an inline comment as done. arichardson added a comment. Improved code generation with a single GEP The pointer case of align_up is now generates the expected add+mask assembly even without the llvm.ptrmask intrinsic. Reposito

[PATCH] D71554: [llvm-ranlib] Handle -D and -U command line flag

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG535b3c6b2f1c: [llvm-ranlib] Handle -D and -U command line flag (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71554/new/ https://r

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D71499#1801104 , @lebedev.ri wrote: > Looks ok to me now in principle. > I have one more question about pointer variants though (see inline) I am not sure the GEP can be inbounds since I have seen some cases where aligni

[PATCH] D71554: [llvm-ranlib] Handle -D and -U command line flag

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D71554#1801203 , @thakis wrote: > The test fails on Windows: http://45.33.8.238/win/4948/step_11.txt > > Please take a look, and if takes a while to fix, revert in the meantime. I'll just relax the permissions check. We on

[PATCH] D71554: [llvm-ranlib] Handle -D and -U command line flag

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Should be fixed in https://github.com/llvm/llvm-project/commit/a4f3847f3d5742cfab7acdc614e7ca54643e0c85 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71554/new/ https://reviews.llvm.org/D71554 __

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a subscriber: brooks. arichardson added a comment. > What i'm asking is: > > - Are these builtins designed (as per `clang/docs/LanguageExtensions.rst`) to > only be passed pointers in-bounds to the allocated memory chunk (`Logical > pointer`*), or any random bag of bits casted

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 235899. arichardson marked 2 inline comments as done. arichardson added a comment. - Generate inbounds GEP. Also mention that values must point to the same allocation in the documentation. - Clarify that correctly aligned values do not change. Repositor

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D71499#1801421 , @lebedev.ri wrote: > (temporarily undoing my review since it looks like things may change) > > In D71499#1801302 , @arichardson > wrote: > > > ... > > > Aha! :) > >

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 235903. arichardson added a comment. - Fix typos caused by dodgy n key on my keyboard. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71499/new/ https://reviews.llvm.org/D71499 Files: clang/docs/LanguageE

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-05 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 236243. arichardson added a comment. - Add a test that the new alignment is propagated to e.g. llvm.memcpy To do this emit a llvm.assume for pointer types and mark the builtin as having an alloc_align attribute (although that does not seem to do anything)

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-08 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D71499#1810526 , @lebedev.ri wrote: > Land this? (branching is near..) I was planning to wait until Sunday for @erichkeane to comment whether the AST attribute is needed and if I don't hear back until then land I would co

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I was careful in the test to use `TZ=UTC` for all commands printing dates and it works fine for me in UTC+1 and in the UK which is currently UTC. Does the bot in question ignore the TZ variable? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72449/new/ http

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/test/tools/llvm-ranlib/D-flag.test:23 # RUN: cp %t-no-index.a %t.a && llvm-ranlib -UUD %t.a # RUN: env TZ=UTC llvm-ar tv %t.a | FileCheck %s --check-prefix=DETERMINISTIC-VALUES Wouldn't this line also have

[PATCH] D72449: [PATCH] [llvm-ranlib] Take in consideration UTC offset for D-flag.test

2020-01-09 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I'm fine with this workaround although I'm very surprised that the test is not working. Especially since `deterministic-archive.test` and `replace-update.test` also set TZ to get reproducible output Do you have access to any of the failing bots? If so what happens t

[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

2020-01-09 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c387cbea76b: Add builtins for aligning and checking alignment of pointers and integers (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D71499?vs=236243&id=237190#toc Repos

[PATCH] D87352: Fix typo

2020-09-16 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:778 - For example: __capability. - MyDeveloperDay wrote: > So this is an example of where someone has changed the .rst and not the > Format.h! @arichardson > > I recommend

[PATCH] D83004: [UpdateCCTestChecks] Include generated functions if asked

2020-09-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Maybe add another test that checks for the @__cxx_global_var_init() constructor function? E.g. something like this: int init_func(int arg) { return arg + 1; } int my_global = init_func(2); Comment at: llvm/utils/update_cc_test_check

[PATCH] D83004: [UpdateCCTestChecks] Include generated functions if asked

2020-09-17 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/utils/update_cc_test_checks.py:331 +# are ordered by prefix instead of by function as in "normal" +# mode. +if '-emit-llvm' in clang_args: jdoerfert wrote: > This is all unfor

[PATCH] D83004: [UpdateCCTestChecks] Include generated functions if asked

2020-09-18 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. I think this approach seems fine, just a few very minor comments inlines. In D83004#2280363 , @greened wrote: > In D83004#2278681 , @arichardson > wrote: > >> Maybe add another test th

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: JakeMerdichAMD, MyDeveloperDay, jrtc27. Herald added subscribers: cfe-commits, krytarowski, emaste. Herald added a project: clang. arichardson requested review of this revision. Some projects (e.g. FreeBSD) align pointers to the right

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2874-2889 + if (Left.is(TT_PointerOrReference)) { +if (Style.SpaceBeforePointerQualifiers && +Right.canBePointerOrReferenceQualifier()) + return true; return Right.Tok.isLite

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2874-2889 + if (Left.is(TT_PointerOrReference)) { +if (Style.SpaceBeforePointerQualifiers && +Right.canBePointerOrReferenceQualifier()) + return true; return Right.Tok.isLite

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 294049. arichardson marked 3 inline comments as done. arichardson added a comment. merge if with existing condition Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88227/new/ https://reviews.llvm.org/D88227

[PATCH] D88239: [clang-format] Fix spaces around */& in multi-variable declarations

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: JakeMerdichAMD, MyDeveloperDay. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. While writing tests for D88227 , I noticed that mu

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 294090. arichardson added a comment. - Add a multi-variable-decl test (depends on D88239 ) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88227/new/ https://reviews.llvm.org

[PATCH] D88239: [clang-format] Fix spaces around */& in multi-variable declarations

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:6636 + verifyFormat("a* a = aaa, * b = bb,\n" + " * b = bbb, * d = ;", Style); --

[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

2020-09-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/include/clang/Format/Format.h:2181 + /// \endcode + bool SpaceBeforePointerQualifiers; + MyDeveloperDay wrote: > I wonder if a request would ever say they wanted this Space before to be > Left/Middle/Right?

[PATCH] D86708: [clang-format] Parse volatile as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Before: void f() { MACRO(A * volatile a); } After: void f() {

[PATCH] D86710: [clang-format] Parse restrict as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Before: void f() { MACRO(A * restrict a); } After: void f() {

[PATCH] D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Before: void f() { MACRO(A * __attribute((foo)) a); } After:

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4297 + // address space of 1. + if (T.isAMDGPU() && !DL.contains("-G") && !DL.startswith("G")) { +return DL.empty() ? std::string("G1") : (DL + "-G1").str(); dylanmckay wrote: > dyla

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 288316. arichardson added a comment. - fix failing tests after datalayout change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84345/new/ https://reviews.llvm.org/D84345 Files: clang/lib/Basic/Targets/AM

[PATCH] D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1895 tok::kw_restrict, tok::kw_volatile, - tok::kw_noexcept) || + tok::kw___attribute, tok::kw_noexcept) ||

[PATCH] D86713: [clang-format] Parse nullability attributes as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Before: void f() { MACRO(A * _Nonnull a); } void f() { MACRO(A

[PATCH] D86716: [clang-format] Detect pointer qualifiers in cast expressions

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. When guessing whether a closing paren is then end of a cast ex

[PATCH] D86710: [clang-format] Parse restrict as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86710#2242197 , @JakeMerdichAMD wrote: > LGTM, assuming tests pass (automated checks failed to resolve your patch > since you based it off of your other one). Looks like enabling C99 should > have no other effects, right

[PATCH] D86713: [clang-format] Parse nullability attributes as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86713#2242253 , @JakeMerdichAMD wrote: > LGTM, again assuming tests pass locally (patch did not resolve). > > Out of curiosity, is _Atomic on your radar? I found some code in clang proper > that handled restrict and _Atom

[PATCH] D86721: [clang-format] Parse double-square attributes as pointer qualifiers

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius, aaron.ballman. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Before: x = (foo *[[clang::attr]] const) * v; A

[PATCH] D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1895 tok::kw_restrict, tok::kw_volatile, - tok::kw_noexcept) || + tok::kw___attribute, tok::kw_noexcept) ||

[PATCH] D86713: [clang-format] Parse nullability attributes as a pointer qualifier

2020-08-27 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86713#2242354 , @JakeMerdichAMD wrote: > In D86713#2242300 , @arichardson > wrote: > >> In D86713#2242253 , @JakeMerdichAMD >> wrote: >> >

[PATCH] D86716: [clang-format] Detect pointer qualifiers in cast expressions

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 288563. arichardson added a comment. drop unncessary const from test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86716/new/ https://reviews.llvm.org/D86716 Files: clang/lib/Format/FormatToken.h clang

[PATCH] D86721: [clang-format] Parse double-square attributes as pointer qualifiers

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 288564. arichardson added a comment. drop unnecesssary const Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86721/new/ https://reviews.llvm.org/D86721 Files: clang/lib/Format/TokenAnnotator.cpp clang/un

[PATCH] D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson marked 2 inline comments as done. arichardson added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:1895 tok::kw_restrict, tok::kw_volatile, - tok::kw_noexcept) || + tok::

[PATCH] D86708: [clang-format] Parse volatile as a pointer qualifier

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1908da2658fc: [clang-format] Parse volatile as a pointer qualifier (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86708/new/ https

[PATCH] D86710: [clang-format] Parse restrict as a pointer qualifier

2020-08-28 Thread Alexander Richardson 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 rG4f103695646b: [clang-format] Parse restrict as a pointer qualifier (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D86711: [clang-format] Parse __attribute((foo)) as a pointer qualifier

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. arichardson marked an inline comment as done. Closed by commit rG37cdabdb82e3: [clang-format] Parse __attribute((foo)) as a pointer qualifier (authored by arichardson).

[PATCH] D86716: [clang-format] Detect pointer qualifiers in cast expressions

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG96824abe7d80: [clang-format] Detect pointer qualifiers in cast expressions (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86716/new

[PATCH] D86713: [clang-format] Parse nullability attributes as a pointer qualifier

2020-08-28 Thread Alexander Richardson 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 rGd304360decef: [clang-format] Parse nullability attributes as a pointer qualifier (authored by arichardson). Repository: rG LLVM Github Monorepo C

[PATCH] D86775: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Before: x = (foo *__ptr32) * v; MACRO(A * __ptr32 a); x = (foo

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-08-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius, jrtc27. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. This adds a `AttributeMacros` configuration option tha

[PATCH] D86721: [clang-format] Parse double-square attributes as pointer qualifiers

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289118. arichardson added a comment. add test case with argument Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86721/new/ https://reviews.llvm.org/D86721 Files: clang/lib/Format/TokenAnnotator.cpp clan

[PATCH] D86926: FormatTest: Provide real line number in failure messages

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Currently a test failure always reports a line number inside v

[PATCH] D86775: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289120. arichardson added a comment. rebase and add one more testcase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86775/new/ https://reviews.llvm.org/D86775 Files: clang/lib/Format/FormatToken.h clan

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289122. arichardson added a comment. fix formatting and rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86782/new/ https://reviews.llvm.org/D86782 Files: clang/docs/ClangFormatStyleOptions.rst cla

[PATCH] D86930: [clang-format] Handle typename macros inside cast expressions

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Before: x = (STACK_OF(uint64_t)) & a; After: x = (STACK_OF(ui

[PATCH] D86926: FormatTest: Provide real line number in failure messages

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:69 - void verifyFormat(llvm::StringRef Expected, llvm::StringRef Code, -const FormatStyle &Style = getLLVMStyle()) { + void _verifyFormat(const char *File, int Line, llvm:

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86782#2249399 , @MyDeveloperDay wrote: > I'm wondering if this could be used to help the CUDA usages of clang-format Do you have any examples that are not formatted sensibly? I was also considering adding another list fo

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86782#2249408 , @jrtc27 wrote: > The documentation currently shows `__capability` being included, but from > looking at this patch does the configuration file not append (which I think > makes sense, at least for `__capab

[PATCH] D86941: [clang-format] Add a test showing the current config file list parsing

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius, jrtc27. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Currently clang-format starts overriding the default v

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289167. arichardson added a comment. - fix name of key in config file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86782/new/ https://reviews.llvm.org/D86782 Files: clang/docs/ClangFormatStyleOptions.rs

[PATCH] D86926: FormatTest: Provide real line number in failure messages

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23 using clang::tooling::toReplacements; +using testing::internal::ScopedTrace; This is an internal class in the current gtest.h, but upstream has now included it in the publ

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289180. arichardson added a comment. - Add test for config parsing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86782/new/ https://reviews.llvm.org/D86782 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D86926: FormatTest: Provide real line number in failure messages

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289181. arichardson added a comment. - fix missing argument Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86926/new/ https://reviews.llvm.org/D86926 Files: clang/unittests/Format/FormatTest.cpp Index:

[PATCH] D86950: [clang-format] Check that */& after typename macros are pointers/references

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. Depends on D86930 (Fix the a

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. arichardson requested review of this revision. Before: _Atomic(uint64_t) * a; After: _Atomic(uint64_t) *a

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. arichardson requested review of this revision. Before: MACRO(__underlying_type(A) * a); After: MACRO(__u

[PATCH] D86713: [clang-format] Parse nullability attributes as a pointer qualifier

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86713#2242381 , @arichardson wrote: > In D86713#2242354 , @JakeMerdichAMD > wrote: > >> In D86713#2242300 , @arichardson >> wrote: >> >>> I

[PATCH] D84345: [AMDGPU] Set the default globals address space to 1

2020-09-01 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289235. arichardson added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84345/new/ https://reviews.llvm.org/D84345 Files: clang/lib/Basic/Targets/AMDGPU.cpp clang/lib/CodeGen/CG

[PATCH] D86930: [clang-format] Handle typename macros inside cast expressions

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D86930#2251144 , @dougpuob wrote: > I am a beginner to compiler, interesting in how to write Unit Test case for > change so I ran it, but found difference with my expection. > > You mentioned > Before: x = (STACK_OF(uint64

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. This improves the debugging experience since LLDB will print t

[PATCH] D87007: [clang-format] Correctly parse function declarations with TypenameMacros

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added a project: clang. Herald added a subscriber: cfe-commits. arichardson requested review of this revision. When using the always break after return type setting: Before:

[PATCH] D87006: [clang-format][NFC] Store FormatToken::Type as an enum instead of bitfield

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289403. arichardson added a comment. - remove unncessary cast+check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87006/new/ https://reviews.llvm.org/D87006 Files: clang/lib/Format/FormatToken.h clang/

[PATCH] D87007: [clang-format] Correctly parse function declarations with TypenameMacros

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289404. arichardson added a comment. - fix formatting of test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87007/new/ https://reviews.llvm.org/D87007 Files: clang/lib/Format/TokenAnnotator.cpp cl

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289405. arichardson added a comment. - use valid C++ syntax in the test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86959/new/ https://reviews.llvm.org/D86959 Files: clang/lib/Format/FormatToken.c

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289406. arichardson added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86960/new/ https://reviews.llvm.org/D86960 Files: clang/lib/Format/FormatToken.h clang/lib/Format/TokenAnnotato

[PATCH] D87028: [clang-format] Improve heuristic for detecting function declarations

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: MyDeveloperDay, JakeMerdichAMD, sammccall, curdeius. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. arichardson requested review of this revision. This change also comma-separated identifiers inside parent

[PATCH] D87028: [clang-format] Improve heuristic for detecting function declarations

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289508. arichardson added a comment. fix tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87028/new/ https://reviews.llvm.org/D87028 Files: clang/lib/Format/TokenAnnotator.cpp clang/unittests/Format

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289509. arichardson added a comment. - fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86959/new/ https://reviews.llvm.org/D86959 Files: clang/lib/Format/FormatToken.cpp clang/lib/Format/FormatT

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289510. arichardson added a comment. rebase to keep dependent revisions happy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86960/new/ https://reviews.llvm.org/D86960 Files: clang/lib/Format/FormatToken.

[PATCH] D86721: [clang-format] Parse double-square attributes as pointer qualifiers

2020-09-02 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd70e05c9e36a: [clang-format] Parse double-square attributes as pointer qualifiers (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86

[PATCH] D86775: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier

2020-09-04 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c810acc94ed: [clang-format] Parse __ptr32/__ptr64 as a pointer qualifier (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86775/new/

[PATCH] D86926: FormatTest: Provide real line number in failure messages

2020-09-04 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2108bceceb5e: FormatTest: Provide real line number in failure messages (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86926/new/ h

[PATCH] D86941: [clang-format] Add a test showing the current config file list parsing

2020-09-04 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe0ff5a8410ea: [clang-format] Add a test showing the current config file list parsing (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D86941?vs=289166&id=289974#toc Reposito

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-04 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 289980. arichardson added a comment. fix configuration parsing test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86782/new/ https://reviews.llvm.org/D86782 Files: clang/docs/ClangFormatStyleOptions.rst

[PATCH] D87028: [clang-format] Improve heuristic for detecting function declarations

2020-09-07 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2427 + // inside a function this should always be treated as a variable. + return CouldBeTypeList && Line.Level == 0; } MyDeveloperDay wrote: > how hard would it be to do the TO

[PATCH] D86950: [clang-format] Check that */& after typename macros are pointers/references

2020-09-07 Thread Alexander Richardson 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 rGcd01eec14bc0: [clang-format] Check that */& after typename macros are pointers/references (authored by arichardson). Repository: rG LLVM Github Mo

[PATCH] D86959: [clang-format] Fix formatting of _Atomic() qualifier

2020-09-07 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG56fa7d1dc6a8: [clang-format] Fix formatting of _Atomic() qualifier (authored by arichardson). Changed prior to commit: https://reviews.llvm.org/D86959?vs=289509&id=290211#toc Repository: rG LLVM Gith

[PATCH] D86930: [clang-format] Handle typename macros inside cast expressions

2020-09-07 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8aa3b8da5db2: [clang-format] Handle typename macros inside cast expressions (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86930/ne

[PATCH] D86782: [clang-format] Allow configuring list of macros that map to attributes

2020-09-07 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe7bd058c7e2c: [clang-format] Allow configuring list of macros that map to attributes (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D86960: [clang-format] Parse __underlying_type(T) as a type

2020-09-07 Thread Alexander Richardson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9a22eba15091: [clang-format] Parse __underlying_type(T) as a type (authored by arichardson). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86960/new/ https:

<    1   2   3   4   >