[PATCH] D102122: Support warn_unused_result on typedefs

2021-05-08 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 343885. dblaikie added a comment. Herald added a subscriber: jdoerfert. Fixes for a few other test cases (though I wonder if these tests are overconstrained - do we need to be testing the list of things this attribute can be applied to in so many places?)

[PATCH] D102122: Support warn_unused_result on typedefs

2021-05-08 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Oh, one question: If we do move forward with this patch, how would we detect that the compiler supports this new use of warn_unused_result? (so that the feature detection macros in LLVM properly make the attribute a no-op unless we have a version of clang that supports

[PATCH] D102122: Support warn_unused_result on typedefs

2021-05-08 Thread David Blaikie via Phabricator via cfe-commits
dblaikie created this revision. dblaikie added a reviewer: aaron.ballman. dblaikie requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. While it's not as robust as using the attribute on enums/classes (the type information may be lost through a

[PATCH] D102118: [BPF] add support for 32 bit registers in inline asm

2021-05-08 Thread Alessandro Decina via Phabricator via cfe-commits
alessandrod created this revision. Herald added a subscriber: hiraditya. alessandrod requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Add "w" constraint type which allows selecting 32 bit registers. 32 bit registers were a

[PATCH] D101239: [clang-tidy] Enable the use of IgnoreArray flag in pro-type-member-init rule

2021-05-08 Thread Hana Joo via Phabricator via cfe-commits
h-joo added a comment. In D101239#2746147 , @njames93 wrote: > Whats the expected behaviour of sugar types. Can tests be added that > demonstrate the behaviour. > I'd argue these cases shouldn't be warned on if `IgnoreArrays` is enabled and > If that be

[PATCH] D101239: [clang-tidy] Enable the use of IgnoreArray flag in pro-type-member-init rule

2021-05-08 Thread Hana Joo via Phabricator via cfe-commits
h-joo updated this revision to Diff 343864. h-joo added a comment. Extended the test case to confirm the fix also works for alias types(`typedef`, `using`). CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101239/new/ https://reviews.llvm.org/D101239 Files: clang-tools-extra/clang-tidy

[PATCH] D95745: Support unwinding from inline assembly

2021-05-08 Thread Paul via Phabricator via cfe-commits
cynecx added a comment. Sorry about the delay. I've updated and rebased the patchset (which also includes tests for different exception models like seh/sjlj). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95745/new/ https://reviews.llvm.org/D95745

[PATCH] D95745: Support unwinding from inline assembly

2021-05-08 Thread Paul via Phabricator via cfe-commits
cynecx added inline comments. Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2446 +if (!IA->canThrow()) { + // Fast path without emitting EH_LABELs. + Amanieu wrote: > Is this fast path actually useful? The frontend will almost never emit an >

[PATCH] D95745: Support unwinding from inline assembly

2021-05-08 Thread Paul via Phabricator via cfe-commits
cynecx updated this revision to Diff 343853. cynecx marked 4 inline comments as done. cynecx added a comment. Address review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95745/new/ https://reviews.llvm.org/D95745 Files: clang/include/clang/Basi

[PATCH] D101239: [clang-tidy] Enable the use of IgnoreArray flag in pro-type-member-init rule

2021-05-08 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Whats the expected behaviour of sugar types. Can tests be added that demonstrate the behaviour. I'd argue these cases shouldn't be warned on if `IgnoreArrays` is enabled and If that behaviour isn't observed currently it should be addressed. typedef int TypedefArray[4

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-08 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. In D101868#2745942 , @HazardyKnusperkeks wrote: > Something which just came to my mind. Since you wrote your own LineFormatter, > you have to add test cases for all kinds of indention and wrapping. It seems > that the string wra

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2021-05-08 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. Hi @njames93 I tried to create a class, `HungarianNotation`, and put all related functions into the class. Then I can call `configurationDiag()` in `HungarianNotation::checkOptionValid()` function. How about this way? The new class. struct HungarianNotation { pub

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-08 Thread Fred Grim via Phabricator via cfe-commits
feg208 added a comment. I still need to handle the 20 character case appropriately Comment at: clang/unittests/Format/FormatTest.cpp:16465 + "test demo[] = {\n" + "{56, 23,\"hello world i am a very long line that really, in any " + "just world, ought to

[PATCH] D102107: [OpenMP] Codegen aggregate for outlined function captures

2021-05-08 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis created this revision. Herald added subscribers: guansong, yaxunl. ggeorgakoudis requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://revie

[PATCH] D102105: [OpenMP][NFC] Refactor cc tests for implicit simd check

2021-05-08 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis created this revision. Herald added subscribers: jfb, guansong, yaxunl. ggeorgakoudis requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://

[PATCH] D101974: [Utils][WIP] Refactor script for cc tests

2021-05-08 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 343839. ggeorgakoudis added a comment. Update fopenmp-simd handling to avoid duplicate implicit checks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101974/new/ https://reviews.llvm.org/D101974 Files:

[PATCH] D100630: [Debug-Info][DBX] DW_TAG_rvalue_reference_type should not be generated when dwarf version is smaller than 4

2021-05-08 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Mixed feelings - is this the only place where we're changing behavior for strict-DWARF in the frontend/clang? (maybe it'd be better to do it all in the same place, down in the backend when the IR is mapped to actual DWARF) @aprantl @probinson - you two have any thought

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-08 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. > FileCheck error: '' is empty. It fails again on the build bot, another dead end. Maybe I need a Debian server to reproduce the problem encountered in the test case. In D101763#2745918 , @steakhal wrote: > In D101763#27458

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-08 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Something which just came to my mind. Since you wrote your own LineFormatter, you have to add test cases for all kinds of indention and wrapping. It seems that the string wrapping does not happen, how about comments? Are classes, namespaces, functions, etc. c

[PATCH] D102102: [clang] Instantiate the initializer of variable templates eagerly

2021-05-08 Thread Natsu via Phabricator via cfe-commits
akemimadoka created this revision. akemimadoka added a project: clang. akemimadoka requested review of this revision. Herald added a subscriber: cfe-commits. This patch fixes the bug shown in https://godbolt.org/z/d4a1Kz7r8 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D102102

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-08 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D101763#2745802 , @OikawaKirie wrote: > I do not know why the test case always fails on the build server, it runs > perfectly on my computer. : ( I've locally run your patch and seemed good to me, I regret not having a look

[PATCH] D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration

2021-05-08 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. I'd like @curdeius input, my concern is its too simplistic and won't cover all the uses cases if (FormatTok->Tok.is(tok::equal) && Style.BraceWrapping.BeforeStructInitialization) { nextToken(); addUnwrappedLine(); } else if (FormatTok->To

[PATCH] D101763: [analyzer][ctu] Avoid parsing invocation list again and again during on-demand parsing of CTU

2021-05-08 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie updated this revision to Diff 343818. OikawaKirie added a comment. Monitor function `open` together with `openat` to fix the failure in the test case. As some distros actually call function `open` rather than forward to function `openat`, both functions should be monitored by `strace

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-08 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks requested changes to this revision. HazardyKnusperkeks added inline comments. This revision now requires changes to proceed. Comment at: clang/unittests/Format/FormatTest.cpp:16465 + "test demo[] = {\n" + "{56, 23,\"hello world i am a very lon