[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Did the original change make it into the 13 branch? I'm seeing some unexpected behavior. bool foo(int a, Bar) override; bool foo(int a, Bar) override; // comment becomes bool foo(int a, Bar) override; bool foo(int a, Bar) override; // comment CHANG

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Logged as https://bugs.llvm.org/show_bug.cgi?id=51470 @krasimir fix resolves this CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107961/new/ https://reviews.llvm.org/D107961 ___ cfe-commits mailing list cfe-co

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. FWIW with this additional fix is also still ok and doesn't revert the behaviour, but we'd have to land this in order for @tstellar to move it to the branch (and I think he said that needed to be done by Friday 13th) bool foo(int a, Bar) override; bool foo(in

[PATCH] D106509: [OpenMP][OpenACC] Implement `ompx_hold` map type modifier extension in Clang (1/2)

2021-08-13 Thread Joachim Protze via Phabricator via cfe-commits
protze.joachim added a comment. I was wondering about the connection to OpenACC, so I had a quick look into the OpenACC spec to try and understand the background. OpenACC uses two separate reference counters for structured and unstructured map. If one of them is >0, the data is present. If both

[PATCH] D104285: [analyzer][AST] Retrieve value by direct index from list initialization of constant array declaration.

2021-08-13 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 366209. ASDenysPetrov added a comment. Fixed //smell// code: from `isa'n'cast` to `dyn-cast`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104285/new/ https://reviews.llvm.org/D104285 Files: clang/include/clang/AST/Expr.h clang/include/c

[clang] 60e07a9 - [AMDGPU][OpenMP] Use llvm-link to link ocml libraries

2021-08-13 Thread Pushpinder Singh via cfe-commits
Author: Pushpinder Singh Date: 2021-08-13T13:36:57+05:30 New Revision: 60e07a9568625a196f1ed8ed9e502c8c4d56da7f URL: https://github.com/llvm/llvm-project/commit/60e07a9568625a196f1ed8ed9e502c8c4d56da7f DIFF: https://github.com/llvm/llvm-project/commit/60e07a9568625a196f1ed8ed9e502c8c4d56da7f.di

[PATCH] D107952: [AMDGPU][OpenMP] Use llvm-link to link ocml libraries

2021-08-13 Thread 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 rG60e07a956862: [AMDGPU][OpenMP] Use llvm-link to link ocml libraries (authored by Pushpinder Singh ). Repository: r

[PATCH] D107900: Add a new clang-tidy check for trivially copyable types passed by const reference

2021-08-13 Thread Julien Marrec via Phabricator via cfe-commits
jmarrec added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-pod-const-ref-to-value.rst:21 + + If set to `true`, this check will limit itself to the `builtinType()` types. Default is `false`. cjdb wrote: > jmarrec wrote: > > Quuxpl

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. The following doesn't feel consistent bool foo(a, Bar) final; // comment bool foo(a, Bar) final; Bar foo(a, Bar) final; // comment Bar foo(a, Bar) fina

[PATCH] D107349: [Matrix] Overload stride arg in matrix.columnwise.load/store.

2021-08-13 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. In D107349#2941385 , @erichkeane wrote: > In D107349#2941257 , @mehdi_amini > wrote: > >> Revert to unbreak bots (like this one : >> https://lab.llvm.org/buildbot/#/builders/13/builds/109

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D107961#2943223 , @MyDeveloperDay wrote: > Did the original change make it into the 13 branch? What's //the 13 branch//? > I'm seeing some unexpected behavior. > > bool foo(int a, Bar) override; > bool foo(int a, Bar) ov

[clang-tools-extra] 7d65cc9 - [clangd] Guard against null Attrs in the AST

2021-08-13 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2021-08-13T10:38:52+02:00 New Revision: 7d65cc98f3508750fcf12240cab625c6e1d5c4ed URL: https://github.com/llvm/llvm-project/commit/7d65cc98f3508750fcf12240cab625c6e1d5c4ed DIFF: https://github.com/llvm/llvm-project/commit/7d65cc98f3508750fcf12240cab625c6e1d5c4ed.diff LO

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D107961#2943225 , @MyDeveloperDay wrote: > Logged as https://bugs.llvm.org/show_bug.cgi?id=51470 @krasimir fix resolves > this. > > I've marked this bug as a 13.0 release blocker ((@tstellar), we can take > @krasimir fix or

[PATCH] D107703: [AST][clangd] Expose documentation of Attrs on hover.

2021-08-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D107703#2942853 , @thakis wrote: > The docs are in rST format. Is that the format LSP wants? Not really :-) LSP's favorite would be markdown. But we're used to ingesting comments in unknown formats and trying to make sense

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D107961#2943266 , @owenpan wrote: > In D107961#2943223 , > @MyDeveloperDay wrote: > >> Did the original change make it into the 13 branch? > > ~~What's //the 13 branch//?~~ > >>

[clang] c064ba3 - [NFC] Add commas in code comments.

2021-08-13 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2021-08-13T08:59:47+03:00 New Revision: c064ba34c7d867c1180279fe3dca8817d835cb28 URL: https://github.com/llvm/llvm-project/commit/c064ba34c7d867c1180279fe3dca8817d835cb28 DIFF: https://github.com/llvm/llvm-project/commit/c064ba34c7d867c1180279fe3dca8817d835cb28.diff

[PATCH] D108020: [NFC] Drop idle compiler option from the test.

2021-08-13 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added a reviewer: erichkeane. Herald added a subscriber: ebevhan. bader requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D108020 Files: cla

[PATCH] D108021: [dllexport] Instantiate default ctor default args

2021-08-13 Thread Peter Jiachen via Phabricator via cfe-commits
peterjc123 created this revision. peterjc123 added a reviewer: rnk. peterjc123 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes https://bugs.llvm.org/show_bug.cgi?id=51414. Repository: rG LLVM Github Monorepo https://reviews.llvm.

[PATCH] D106509: [OpenMP][OpenACC] Implement `ompx_hold` map type modifier extension in Clang (1/2)

2021-08-13 Thread George Rokos via Phabricator via cfe-commits
grokos added a comment. In D106509#2943239 , @protze.joachim wrote: > I was wondering about the connection to OpenACC, so I had a quick look into > the OpenACC spec to try and understand the background. > OpenACC uses two separate reference counters for

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-08-13 Thread gehry via Phabricator via cfe-commits
Sockke updated this revision to Diff 366225. Sockke retitled this revision from "[clang-tidy] Fix wrong and missing warnings in performance-move-const-arg" to "[clang-tidy] Fix wrong FIxIt in performance-move-const-arg". Sockke edited the summary of this revision. Sockke added a comment. Fix the

[PATCH] D106509: [OpenMP][OpenACC] Implement `ompx_hold` map type modifier extension in Clang (1/2)

2021-08-13 Thread Joachim Protze via Phabricator via cfe-commits
protze.joachim added a comment. In D106509#2943316 , @grokos wrote: > The next patch in this series (D106510 ) > modifies libomptarget and introduces a second reference count for ompx_hold. > There won't be a singe RefC

[PATCH] D106277: [SVE] Remove the interface for getMaxVScale in favour of the IR attributes

2021-08-13 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added a comment. Please remember to create a more representative commit message as the patch no longer removes getMaxVScale. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106277/new/ https://reviews.llvm.org/D106277 ___

[PATCH] D107292: [clang] adds warning to alert user when they use alternative tokens in declarations

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D107292#2943101 , @cjdb wrote: > In D107292#2939521 , @aaron.ballman > wrote: > >> One question I have about both declarations and expressions are whether we >> have an appetite

[clang] 10c8f78 - [clang][deps] Move `SingleCommandCompilationDatabase` to a header

2021-08-13 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2021-08-13T12:48:14+02:00 New Revision: 10c8f78ab831dca8d7166c86a863d9bcfe626060 URL: https://github.com/llvm/llvm-project/commit/10c8f78ab831dca8d7166c86a863d9bcfe626060 DIFF: https://github.com/llvm/llvm-project/commit/10c8f78ab831dca8d7166c86a863d9bcfe626060.diff L

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D107961#2943291 , @MyDeveloperDay wrote: >> The above C++ declarations should be inside a class definition, no? > > Not really, we don't have to have any context of where we are (in class or > struct). if you had for example

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 366234. owenpan added a comment. Add checking for `final` and `override`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107961/new/ https://reviews.llvm.org/D107961 Files: clang/lib/Format/UnwrappedLineParser.cpp clang/unittests/Format/FormatTe

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This is better as it will catch more cases but there can still be cases we could fall foul. Bar foo(a, Bar) LLVM_OVERRIDE; Bar foo(a, Bar) LLVM_FINAL; Bar foo(a, Bar) LLVM_NOEXCEPT; Is there any way this K&R stuff can be put behind an option, I just f

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D107961#2943445 , @MyDeveloperDay wrote: > This is better as it will catch more cases but there can still be cases we > could fall foul. > > Bar foo(a, Bar) > LLVM_OVERRIDE; > Bar foo(a, Bar) > LLVM_FINAL; > Bar foo

[PATCH] D104285: [analyzer][AST] Retrieve value by direct index from list initialization of constant array declaration.

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. One thing I think is worth asking in this thread is whether what you're analyzing is undefined behavior? Array subscripting is defined in terms of pointer addition per: http://eel.is/c++draft/expr.sub#1 Pointer addition has a special behavior for arrays: http://e

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan updated this revision to Diff 366237. owenpan added a comment. Check for `tok::semi` (in addition to `tok::l_paren`) after the first token of a potential K&R C parameter declaration. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107961/new/ https://reviews.llvm.org/D107961 Fil

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. bool foo(int a, Bar) override; bool foo(int a, Bar) override; // comment bool foo(int a, Bar) final; bool foo(int a, Bar) final; // comment bool foo(a, Bar) final;

[PATCH] D106030: [Clang] add support for error+warning fn attrs

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenAction.cpp:783 +: diag::warn_fe_backend_warning_attr) +<< FD->getDeclName() << EA->getUserDiagnostic(); + } The diagnostics engine knows

[clang] de763c4 - [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread via cfe-commits
Author: Owen Date: 2021-08-13T05:28:19-07:00 New Revision: de763c4037157e60551ba227ccd0ed02e109c317 URL: https://github.com/llvm/llvm-project/commit/de763c4037157e60551ba227ccd0ed02e109c317 DIFF: https://github.com/llvm/llvm-project/commit/de763c4037157e60551ba227ccd0ed02e109c317.diff LOG: [cl

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Owen Pan 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 rGde763c403715: [clang-format] Distinguish K&R C function definition and attribute (authored by Owen , committed by o

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: eugenis, melver, browneee, dvyukov. Herald added subscribers: ormris, dexonsmith, jdoerfert, steven_wu, hiraditya. Herald added a reviewer: aaron.ballman. glider requested review of this revision. Herald added projects: clang, LLVM. Herald added

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 366256. glider added a comment. Added a comment to clang/lib/CodeGen/CodeGenFunction.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108029/new/ https://reviews.llvm.org/D108029 Files: clang/include/clang/Bas

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Marco Elver via Phabricator via cfe-commits
melver accepted this revision. melver added inline comments. This revision is now accepted and ready to land. Comment at: llvm/include/llvm/AsmParser/LLToken.h:222 kw_nosanitize_coverage, + kw_no_sanitizer_instrumentation, kw_null_pointer_is_valid, LLVM se

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests: http://45.33.8.238/linux/53600/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107961/new/ https://reviews.llvm.org/D1

[clang] cfdfb75 - [OpenCL] Clang diagnostics allow reporting C++ for OpenCL version.

2021-08-13 Thread Justas Janickas via cfe-commits
Author: Justas Janickas Date: 2021-08-13T13:55:22+01:00 New Revision: cfdfb75c1ff354471bcea5fad872e40e345016ae URL: https://github.com/llvm/llvm-project/commit/cfdfb75c1ff354471bcea5fad872e40e345016ae DIFF: https://github.com/llvm/llvm-project/commit/cfdfb75c1ff354471bcea5fad872e40e345016ae.dif

[PATCH] D107648: [OpenCL] Clang diagnostics allow reporting C++ for OpenCL version.

2021-08-13 Thread Justas Janickas 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 rGcfdfb75c1ff3: [OpenCL] Clang diagnostics allow reporting C++ for OpenCL version. (authored by Topotuna). Changed prior to commit: https://reviews.

[PATCH] D107843: [X86] Add parentheses around casts in some of the X86 intrinsic headers.

2021-08-13 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Probably want to address the other cleanups in another patch; the parens fixes and test LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107843/new/ https://reviews.llvm.org/D107843 _

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I think that C and C++ should behave the same here; at least, I don't see any reason why they should have different capabilities. The paper said that there is no expected code breakage from this change, but have you tried building a diverse corpus of code (like a

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D106215#2943611 , @aaron.ballman wrote: > I think that C and C++ should behave the same here; at least, I don't see any > reason why they should have different capabilities. I agree but as WG14 hasn't weighted in I didn't w

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106577#2906542 , @rsmith wrote: > If Aaron's checked with WG14 and the intent is for this to only constrain how > literals are represented, and not the complete implementation, then I'm > entirely fine with us defining

[PATCH] D108032: [analyzer] Retrieve a character from CompoundLiteralExpr as an initializer for constant arrays.

2021-08-13 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: NoQ, vsavchenko, steakhal, martong. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. ASDenysPetrov r

[clang] d754b97 - [NFC] Drop idle compiler option from the test.

2021-08-13 Thread Alexey Bader via cfe-commits
Author: Alexey Bader Date: 2021-08-13T13:20:11+03:00 New Revision: d754b970eddb83b1c68346a36b067391d93166b0 URL: https://github.com/llvm/llvm-project/commit/d754b970eddb83b1c68346a36b067391d93166b0 DIFF: https://github.com/llvm/llvm-project/commit/d754b970eddb83b1c68346a36b067391d93166b0.diff

[PATCH] D108020: [NFC] Drop idle compiler option from the test.

2021-08-13 Thread Alexey Bader 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 rGd754b970eddb: [NFC] Drop idle compiler option from the test. (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106215#2943631 , @cor3ntin wrote: > In D106215#2943611 , @aaron.ballman > wrote: > >> I think that C and C++ should behave the same here; at least, I don't see >> any reason wh

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 366265. cor3ntin added a comment. Improve tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106215/new/ https://reviews.llvm.org/D106215 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang/lib/

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/test/CodeGen/string-literal-short-wstring.c:17 // MSABI: linkonce_odr dso_local unnamed_addr constant [3 x i16] [i16 65, i16 66, i16 0] - const wchar_t *foo = L"AB"; + const unsigne

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added a comment. In D106215#2943653 , @aaron.ballman wrote: > In D106215#2943631 , @cor3ntin > wrote: > >> In D106215#2943611

[PATCH] D107893: [clang] [MinGW] Consider the per-target libc++ include directory too

2021-08-13 Thread Markus Böck via Phabricator via cfe-commits
zero9178 added a comment. Any chance this patch could be backported onto the LLVM 13 branch? I have been using a per target runtime builds for a few versions now but the functionality has regressed in LLVM 13, which would force me back into a normal single target layout. Repository: rG LLVM

[PATCH] D105819: [analyzer] MallocChecker: Add a visitor to leave a note on functions that could have, but did not change ownership on leaked memory

2021-08-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus updated this revision to Diff 366269. Szelethus set the repository for this revision to rG LLVM Github Monorepo. Szelethus added a comment. - Add the new feature behind a new, off-by-default alpha checker option. - Restore `test/Analysis/self-assign.cpp` (to be formatted in a standalone

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Dmitry Vyukov via Phabricator via cfe-commits
dvyukov accepted this revision. dvyukov added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:524 +bool CodeGenFunction::ShouldSkipSanitizerInstrumentation() { + if (!CurFuncDecl) +return false; When is CurFuncDecl nullptr? Maybe we should

[PATCH] D104975: Implement P1949

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:1444 +static const llvm::sys::UnicodeCharSet XIDContinueChars(XIDContinueRanges); +return C == '_' || XIDStartChars.contains(C) || + XIDContinueChars.contains(C); Is lookin

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D106215#2943675 , @cor3ntin wrote: > In D106215#2943653 , @aaron.ballman > wrote: > >> In D106215#2943631 , @cor3ntin >> wrote: >> >>>

[PATCH] D107960: [clang][analyzer] Make ReturnPtrRange checker warn at negative index.

2021-08-13 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. `assumeInBound` should check if `0<=Idxhttps://reviews.llvm.org/D107960/new/ https://reviews.llvm.org/D107960 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 027c5a6 - [analyzer][NFC] Make test/Analysis/self-assign.cpp readable

2021-08-13 Thread Kristóf Umann via cfe-commits
Author: Kristóf Umann Date: 2021-08-13T16:14:54+02:00 New Revision: 027c5a6adcb3a41c29533680a650fae7262f2b31 URL: https://github.com/llvm/llvm-project/commit/027c5a6adcb3a41c29533680a650fae7262f2b31 DIFF: https://github.com/llvm/llvm-project/commit/027c5a6adcb3a41c29533680a650fae7262f2b31.diff

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/Basic/AttrDocs.td:2601-2602 + +This is not the same as ``__attribute__((no_sanitize(...)))``, which depending +on

[PATCH] D104975: Implement P1949

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:1444 +static const llvm::sys::UnicodeCharSet XIDContinueChars(XIDContinueRanges); +return C == '_' || XIDStartChars.contains(C) || + XIDContinueChars.contains(C); aaron.ballman

[PATCH] D77670: [CUDA] Add partial support for recent CUDA versions.

2021-08-13 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld added a comment. Herald added a subscriber: dexonsmith. Herald added a project: LLVM. @tra The split between `LATEST` and `LATEST_SUPPORTED` leads to very weird warning and error messages: clang-14: warning: unknown CUDA version: cuda.h: CUDA_VERSION=11040.; assuming the latest suppo

[PATCH] D104975: Implement P1949

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a subscriber: rsmith. aaron.ballman added inline comments. Comment at: clang/lib/Lex/Lexer.cpp:1444 +static const llvm::sys::UnicodeCharSet XIDContinueChars(XIDContinueRanges); +return C == '_' || XIDStartChars.contains(C) || + XIDContinueCha

[PATCH] D104975: Implement P1949

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a comment. Adding @rsmith to hopefully answer the question about how to handle the dr status page for these changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104975/new/ https://revi

[PATCH] D106215: Make wide multi-character character literals ill-formed in C++ mode

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 366279. cor3ntin added a comment. Make wide multi char ill-formed regardless of language mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106215/new/ https://reviews.llvm.org/D106215 Files: clang/include/

[PATCH] D104854: Introduce intrinsic llvm.isnan

2021-08-13 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Patch D108037 must make lowering of `llvm.isnan` more close to the code produced by `__builtin_isnan` earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104854/new/ https://reviews.

[PATCH] D108038: [C++4OpenCL] C++ for OpenCL version 2021 introduced to command line

2021-08-13 Thread Justas Janickas via Phabricator via cfe-commits
Topotuna created this revision. Topotuna added a reviewer: Anastasia. Herald added subscribers: ldrumm, dexonsmith, dang, yaxunl. Topotuna requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Introduces language standard `lang_openclcpp2021` and

[PATCH] D104975: Implement P1949

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 366286. cor3ntin added a comment. Update dr_cxx_status and add comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104975/new/ https://reviews.llvm.org/D104975 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D106889: [examples] Fix the clang-interpreter example for changes in 2487db1f2862

2021-08-13 Thread Ryan Mansfield via Phabricator via cfe-commits
rmansfield abandoned this revision. rmansfield added a comment. This got fixed by b4c0307d598004cfd96c770d2a4a84a37c838ba9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106889/ne

[PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-08-13 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In D106577#2904960 , @rsmith wrote: >> One specific example I'd like to be considered: >> Suppose the C standard library implementation's mbstowcs converts a certain >> multi-byte character C to somewhere in the Unicode private

[PATCH] D108021: [dllexport] Instantiate default ctor default args

2021-08-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I think it looks good, but it needs a test. I worry that we might have the same bug for copy closures, but the fix will be different, since those are used in exception handling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10

[clang] 98eb348 - Revert "[clang-format] Distinguish K&R C function definition and attribute"

2021-08-13 Thread David Spickett via cfe-commits
Author: David Spickett Date: 2021-08-13T16:25:32+01:00 New Revision: 98eb348eb38aaba63aa149000c97d27a7e5190c3 URL: https://github.com/llvm/llvm-project/commit/98eb348eb38aaba63aa149000c97d27a7e5190c3 DIFF: https://github.com/llvm/llvm-project/commit/98eb348eb38aaba63aa149000c97d27a7e5190c3.diff

[PATCH] D107900: Add a new clang-tidy check for trivially copyable types passed by const reference

2021-08-13 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/misc-pod-const-ref-to-value.rst:21 + + If set to `true`, this check will limit itself to the `builtinType()` types. Default is `false`. jmarrec wrote: > cjdb wrote: > > jmarrec w

[PATCH] D108021: [dllexport] Instantiate default ctor default args

2021-08-13 Thread Peter Jiachen via Phabricator via cfe-commits
peterjc123 added a comment. In D108021#2943842 , @rnk wrote: > I think it looks good, but it needs a test. > > I worry that we might have the same bug for copy closures, but the fix will > be different, since those are used in exception handling. Thanks

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:2601-2602 + +This is not the same as ``__attribute__((no_sanitize(...)))``, which depending +on the tool may still insert instrumentation to prevent false positive reports. + }]; aar

[PATCH] D108013: [NFC] Rename AttributeList::has/getAttribute() -> has/getAttributeImpl()

2021-08-13 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. There's a related change here: https://reviews.llvm.org/D105485 Honestly, I like this approach better. Adding a strongly-typed integer wrapper is a pretty heavyweight solution for a problem that seems solvable with better named methods. As a practical matter, consider spli

[PATCH] D108003: [Clang] Extend -Wbool-operation to warn about bitwise and of bools with side effects

2021-08-13 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. With several Linux kernel `defconfig` builds, I see the following instances of the warning: drivers/net/wireless/intel/iwlwifi/mvm/scan.c:835:3: warning: bitwise and of boolean expressions; did you mean logical and? [-Wbool-operation-and] drivers/staging/rtl819

[clang] 4190d99 - [X86] Add parentheses around casts in some of the X86 intrinsic headers.

2021-08-13 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2021-08-13T09:36:16-07:00 New Revision: 4190d99dfcab45cd67c32030d363f391c35570f2 URL: https://github.com/llvm/llvm-project/commit/4190d99dfcab45cd67c32030d363f391c35570f2 DIFF: https://github.com/llvm/llvm-project/commit/4190d99dfcab45cd67c32030d363f391c35570f2.diff

[clang] 606735c - [Clang] Add an explicit makeArrayRef to appease gcc 5.4.

2021-08-13 Thread Craig Topper via cfe-commits
Author: Craig Topper Date: 2021-08-13T09:42:28-07:00 New Revision: 606735c045b93cafe17bacbad10352b5a1c35cc0 URL: https://github.com/llvm/llvm-project/commit/606735c045b93cafe17bacbad10352b5a1c35cc0 DIFF: https://github.com/llvm/llvm-project/commit/606735c045b93cafe17bacbad10352b5a1c35cc0.diff

[PATCH] D107843: [X86] Add parentheses around casts in some of the X86 intrinsic headers.

2021-08-13 Thread Craig Topper 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 rG4190d99dfcab: [X86] Add parentheses around casts in some of the X86 intrinsic headers. (authored by craig.topper). Repository: rG LLVM Github Mono

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1388 break; - if (!Line->Tokens.begin()->Tok->is(tok::kw_typedef) && - isC78ParameterDecl(FormatTok)) { + const FormatToken *Next = AllTokens[Tokens->getPosition

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:8258 + verifyFormat("bool f(int a, int) override;\n" + "Bar g(int a, Bar) final; // comment", + Style); can you check with out the comment and wit

[PATCH] D107961: [clang-format] Distinguish K&R C function definition and attribute

2021-08-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @owenpan If its been reverted is it OK to just reopen the review? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107961/new/ https://reviews.llvm.org/D107961 ___ cfe-commit

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-08-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg.cpp:263 + forwardToShowInt(std::move(a)); + // CHECK-MESSAGES: :[[@LINE-1]]:20: warning: std::move of the variable 'a' of the trivially-copyable type 'int' has

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366112. gandhi21299 added a comment. requested changes from reviewer - added memory scope tests and updated remarks and tests accordingly - still working on clang/test/CodeGenCUDA/fp-atomics-optremarks.cu and clang/test/CodeGenOpenCL/atomics-remarks-gfx9

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:618 expandAtomicRMWToCmpXchg(AI, createCmpXchgInstFun); + Ctx.getSyncScopeNames(SSNs); + auto MemScope = SSNs[AI->getSyncScopeID()].empty() Only if SSNs.empty().

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic_add_casPf rampitec wrote: >

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic_add_casPf gandhi21299 wrote: >

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:618 expandAtomicRMWToCmpXchg(AI, createCmpXchgInstFun); + Ctx.getSyncScopeNames(SSNs); + auto MemScope = SSNs[AI->getSyncScopeID()].empty() rampitec wrote: > Onl

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic_add_casPf rampitec wrote: >

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic_add_casPf gandhi21299 wrote: >

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked 4 inline comments as done. gandhi21299 added inline comments. Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366131. gandhi21299 added a comment. - corrected atomics-remarks-gfx90a.cl test to emit remark as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 Files: cl

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic_add_casPf gandhi21299 wrote: >

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366127. gandhi21299 added a comment. - corrected remarks by replacing the operation name and updated tests accordingly - code format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://review

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366132. gandhi21299 marked 3 inline comments as done. gandhi21299 added a comment. no way to pass memory_scope in `__atomic_fetch_add(...)`, discarded the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked an inline comment as done. gandhi21299 added inline comments. Comment at: clang/test/CodeGenCUDA/fp-atomics-optremarks.cu:10 + +// GFX90A-CAS: A compare and swap loop was generated for an atomic operation at system memory scope +// GFX90A-CAS-LABEL: _Z14atomic

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked an inline comment as done. gandhi21299 added inline comments. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:585 + TLI->shouldExpandAtomicRMWInIR(AI, ORE); + OptimizationRemark Remark(DEBUG_TYPE, "Passed", AI->getFunction()); + switch (Kind) { ---

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366294. gandhi21299 added a comment. - added clang/test/CodeGenCUDA/fp-atomics-optremarks.cu back - moved `Remark` declaration into the `else` block Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366301. gandhi21299 added a comment. - rebased against main branch - cleaned up code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 Files: clang/test/CodeGenCU

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. Please retitle it without AMDGPU and remove the changes to pass ORE to targets. It is not a part of this change, it is a part of the folloup target specific change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new

  1   2   >