[clang] 29e11a1 - Revert "[Remarks] Emit optimization remarks for atomics generating CAS loop"

2021-08-13 Thread Anshil Gandhi via cfe-commits
Author: Anshil Gandhi Date: 2021-08-13T23:58:04-06:00 New Revision: 29e11a1aa303cf81b81fdbab74fad4f31e5018d3 URL: https://github.com/llvm/llvm-project/commit/29e11a1aa303cf81b81fdbab74fad4f31e5018d3 DIFF: https://github.com/llvm/llvm-project/commit/29e11a1aa303cf81b81fdbab74fad4f31e5018d3.diff

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

2021-08-13 Thread Peter Jiachen via Phabricator via cfe-commits
peterjc123 added a comment. @rnk @hans Test added. Please take some time to review the changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108021/new/ https://reviews.llvm.org/D108021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2021-08-13 Thread Peter Jiachen via Phabricator via cfe-commits
peterjc123 updated this revision to Diff 366399. peterjc123 added a comment. Add test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108021/new/ https://reviews.llvm.org/D108021 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp Index

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

2021-08-13 Thread Peter Jiachen via Phabricator via cfe-commits
peterjc123 updated this revision to Diff 366394. peterjc123 added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108021/new/ https://reviews.llvm.org/D108021 Files: clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp Ind

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

2021-08-13 Thread Peter Jiachen via Phabricator via cfe-commits
peterjc123 updated this revision to Diff 366393. peterjc123 added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108021/new/ https://reviews.llvm.org/D108021 Files: clang/test/CodeGenCXX/dllexport-ctor-closure-nested.cpp Ind

[clang] c4e5425 - [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-13 Thread Anshil Gandhi via cfe-commits
Author: Anshil Gandhi Date: 2021-08-13T22:44:08-06:00 New Revision: c4e5425aa579d21530ef1766d7144b38a347f247 URL: https://github.com/llvm/llvm-project/commit/c4e5425aa579d21530ef1766d7144b38a347f247 DIFF: https://github.com/llvm/llvm-project/commit/c4e5425aa579d21530ef1766d7144b38a347f247.diff

[PATCH] D107641: [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init

2021-08-13 Thread liushuai wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1f2d40c47f5f: [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init (authored by Sockke, committed by MTC). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[clang-tools-extra] 1f2d40c - [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init

2021-08-13 Thread via cfe-commits
Author: liuke Date: 2021-08-14T10:48:04+08:00 New Revision: 1f2d40c47f5f8fd01d91d73a1f52044fe1c83225 URL: https://github.com/llvm/llvm-project/commit/1f2d40c47f5f8fd01d91d73a1f52044fe1c83225 DIFF: https://github.com/llvm/llvm-project/commit/1f2d40c47f5f8fd01d91d73a1f52044fe1c83225.diff LOG: [c

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

2021-08-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 366381. aeubanks added a comment. one more place Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108013/new/ https://reviews.llvm.org/D108013 Files: llvm/include/llvm/IR/Attributes.h llvm/include/llvm/IR/Fu

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

2021-08-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks updated this revision to Diff 366380. aeubanks added a comment. rebase past cleanups Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108013/new/ https://reviews.llvm.org/D108013 Files: llvm/include/llvm/IR/Attributes.h llvm/include/llvm

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

2021-08-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D108003#2944178 , @aeubanks wrote: > I ran this over Chrome and ran into a use case that looks legitimate. It > seems like the pattern in LLVM where we want to run a bunch of > transformations and get if any of them changed

[PATCH] D104975: Implement P1949

2021-08-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Basic/DiagnosticLexKinds.td:117 +def err_character_not_allowed : Error< + "character not allowed in identifiers">; def ext_unicode_whitespace : ExtWarn< The old diagnostic text here was bad in the c

[PATCH] D107690: [Modules] Do not remove failed modules after the control block phase

2021-08-13 Thread Ben Barham via Phabricator via cfe-commits
bnbarham updated this revision to Diff 366378. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107690/new/ https://reviews.llvm.org/D107690 Files: clang/lib/Serialization/ASTReader.cpp clang/test/VFS/Inputs/UsesFoo.framework/Headers/UsesFoo.h cl

[PATCH] D104975: Implement P1949

2021-08-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D104975#2944313 , @cor3ntin wrote: > @rsmith: I modified the script locally to support dxx: dup P - let me > know if you think that's a good solution Not sure if that's a typo: did you mean "sup" rather than "dup"? In this

[PATCH] D104975: Implement P1949

2021-08-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/test/CXX/drs/dr2xx.cpp:600 -namespace dr248 { // dr248: yes c++11 - // FIXME: Should this also apply to c++98 mode? This was a DR against C++98. aaron.ballman wrote: > cor3ntin wrote: > > aaron.ballman wrote: > >

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2021-08-13 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Using the checker now in our production BuildBot - no crashes and no false positives. Can't say if there are false negatives, but at any rate the checker is better than most colleagues at finding what should be declared const. Repository: rG LLVM Github Monorepo

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-08-13 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D96033#298 , @leonardchan wrote: > We're still hitting the OOMs when building clang-repl with LTO even with > `-DLLVM_PARALLEL_LINK_JOBS=32`. While we don't build this target explicitly > in our toolchain, it is built when

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-13 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance marked an inline comment as done. nathanchance added inline comments. Comment at: clang/test/SemaCXX/switch-implicit-fallthrough.cpp:211-214 +case 224: + n += 400; +case 225: // expected-warning{{unannotated fall-through between switch labels}} expected

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-13 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance updated this revision to Diff 366363. nathanchance added a comment. - -Wimplicit-fallthrough-unreachable -> -Wunreachable-code-fallthrough, enabled under -Wunreachable-code (Dávid, Aaron). - Drop "case 225" from new test, as it does not add to test coverage (Nick). - Add -Wunreacha

[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. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107961/new/ https://reviews.llvm.org/D107961 ___ cfe-commits mailing li

[PATCH] D108045: [clangd] Fix clangd crash when including a header

2021-08-13 Thread Queen Dela Cruz via Phabricator via cfe-commits
qdelacru updated this revision to Diff 366358. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108045/new/ https://reviews.llvm.org/D108045 Files: clang-tools-extra/clangd/CodeComplete.cpp clang-tools-extra/clangd/Preamble.cpp clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-13 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D107933#2944204 , @aaron.ballman wrote: > In D107933#2944135 , @nathanchance > wrote: > >> In D107933#2942430 , @xbolva00 >> wrote: >> >>>

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

2021-08-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 366356. nickdesaulniers added a comment. - remove unnecessary parens Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106030/new/ https://reviews.llvm.org/D106030 Files: clang/docs/ReleaseNotes.rst cl

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

2021-08-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:3368 + Diag(Old->getLocation(), diag::note_previous_declaration); + New->dropAttr(); +} Should be dropping `ErrorAttr`. Comment at: clang/test/Sema/att

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

2021-08-13 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 366355. nickdesaulniers marked 4 inline comments as done. nickdesaulniers added a comment. - fix tests on windows, let diag eng format decl, drop correct attr, refactor to handle merging as InheritableAttr Repository: rG LLVM Github Monorepo CHAN

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

2021-08-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D77670#292 , @Hahnfeld wrote: >> It's also time to bump the default GPU target to something that's supported >> by the CUDA versions we reasonably expect to see. That should probably be >> sm_35 as that's probably the oldest G

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-08-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. We're still hitting the OOMs when building clang-repl with LTO even with `-DLLVM_PARALLEL_LINK_JOBS=32`. While we don't build this target explicitly in our toolchain, it is built when running tests via `stage2-check-clang`. Is there perhaps a simple cmake flag that

[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. In D77670#2944192 , @tra wrote: > In D77670#2943753 , @Hahnfeld wrote: > >> @tra The split between `LATEST` and `LATEST_SUPPORTED` leads to very weird >> warning and error messages: > > Ag

[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. In D108003#2944413 , @Quuxplusone wrote: > FWIW, all three of @nathanchance's detected lines look like good true > positives to me: even if they're not //bugs//, they all look like places the > programmer //meant// to writ

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

2021-08-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:7428-7430 +def warn_bitwise_and_bool : Warning< + "bitwise and of boolean expressions; did you mean logical and?">, + InGroup; xbolva00 wrote: > Quuxplusone wrote: >

[PATCH] D107921: [Modules] Fix bug where header resolution in modules doesn't work when compiling with relative paths.

2021-08-13 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 366344. akhuang added a comment. undo previous change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107921/new/ https://reviews.llvm.org/D107921 Files: clang/lib/Lex/HeaderSearch.cpp Index: clang/lib/Lex/H

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

2021-08-13 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. FWIW, all three of @nathanchance's detected lines look like good true positives to me: even if they're not //bugs//, they all look like places the programmer //meant// to write `&&` and only wrote `&` by accident. The third one might even be a bug bug, since it's do

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

2021-08-13 Thread Owen Pan via Phabricator via cfe-commits
owenpan marked 3 inline comments as done. owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:17 #include "FormatToken.h" -#include "clang/Basic/TokenKinds.h" #include "llvm/ADT/STLExtras.h" HazardyKnusperkeks wrote: > owenpan wr

[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 366342. owenpan added a comment. This revision is now accepted and ready to land. Fix the assertion failure and add more test cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107961/new/ https://reviews.llvm.org/D107961 Files: clang/lib/Forma

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

2021-08-13 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:17 #include "FormatToken.h" -#include "clang/Basic/TokenKinds.h" #include "llvm/ADT/STLExtras.h" owenpan wrote: > HazardyKnusperkeks wrote: > > Why is this not needed

[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 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() + 1]

[PATCH] D106891: [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 restore opencl test. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:622 +return OptimizationRemark(DEBUG_TYPE, "Passed", AI->getFunction()) + << "A compare and swap loop was generated for an " + << AI->getO

[PATCH] D104975: Implement P1949

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @rsmith: I modified the script to support dxx: dup P - let me know if you think that's a good solution Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104975/new/ https://reviews.llvm.org/D104975 __

[clang] 8e9ffa1 - [NFC] Cleanup callers of AttributeList::hasAttributes()

2021-08-13 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2021-08-13T12:16:52-07:00 New Revision: 8e9ffa1dc6988367c8e3d688044859c5aa7cf485 URL: https://github.com/llvm/llvm-project/commit/8e9ffa1dc6988367c8e3d688044859c5aa7cf485 DIFF: https://github.com/llvm/llvm-project/commit/8e9ffa1dc6988367c8e3d688044859c5aa7cf485.diff

[PATCH] D107430: [OMPIRBuilder] Add ordered without depend and simd clause to OMPBuilder

2021-08-13 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. While manually editing `ordered_codegen.cpp` gives nicer results, re-running `update_cc_test_checks.py` would be less work. Your manual changes would be also be dropped the next time somebody runs update_cc_test_checks.py and commits. The code seems derived from @fg

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

2021-08-13 Thread Evgenii Stepanov via Phabricator via cfe-commits
eugenis added a comment. The new attribute should be very rare, and not something that a typical end user should even know about. That's why I'd prefer if the name reflected how the attribute affects code generation rather than user-visible behavior: disable_sanitizer_instrumentation sounds per

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

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman 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. + }]; -

[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. In D107893#2944193 , @mstorsjo wrote: > In D107893#2943679 , @zero9178 > wrote: > >> Any chance this patch could be backported onto the LLVM 13 branch? I have >> been using a per target

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

2021-08-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D107893#2944193 , @mstorsjo wrote: > In D107893#2943679 , @zero9178 > wrote: > >> Any chance this patch could be backported onto the LLVM 13 branch? I have >> been using a per target

[PATCH] D104975: Implement P1949

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/www/cxx_dr_status.html:3 "http://www.w3.org/TR/html4/strict.dtd";> aaron.ballman wrote: > You might have missed this at the top of the file -- this one is a generated > file, and that's why I was t

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D107933#2944135 , @nathanchance wrote: > In D107933#2942430 , @xbolva00 > wrote: > >> Yes, something like that, plus I think you want put >> UnreachableCodeFallthrough into gro

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

2021-08-13 Thread Marco Elver via Phabricator via cfe-commits
melver 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] D107893: [clang] [MinGW] Consider the per-target libc++ include directory too

2021-08-13 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a subscriber: tstellar. mstorsjo added a comment. In D107893#2943679 , @zero9178 wrote: > 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 >

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

2021-08-13 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D77670#2943753 , @Hahnfeld wrote: > @tra The split between `LATEST` and `LATEST_SUPPORTED` leads to very weird > warning and error messages: Agreed, it's far from ideal. There's also more than one issue involved. > clang-14: warn

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

2021-08-13 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. I ran this over Chrome and ran into a use case that looks legitimate. It seems like the pattern in LLVM where we want to run a bunch of transformations and get if any of them changed anything. https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/

[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 accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but going to wait a bit to land it in case @rsmith has opinions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106215/new/ h

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

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman 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. + }]; -

[clang] 80ea2bb - [NFC] Rename AttributeList::getParam/Ret/FnAttributes() -> get*Attributes()

2021-08-13 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2021-08-13T11:16:52-07:00 New Revision: 80ea2bb57450a65cc724565ecfc9971ad93a3f15 URL: https://github.com/llvm/llvm-project/commit/80ea2bb57450a65cc724565ecfc9971ad93a3f15 DIFF: https://github.com/llvm/llvm-project/commit/80ea2bb57450a65cc724565ecfc9971ad93a3f15.diff

[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 366317. cor3ntin added a comment. Describe this change in the changelog. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106215/new/ https://reviews.llvm.org/D106215 Files: clang/docs/ReleaseNotes.rst clang

[PATCH] D104975: Implement P1949

2021-08-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/www/cxx_dr_status.html:3 "http://www.w3.org/TR/html4/strict.dtd";> You might have missed this at the top of the file -- this one is a generated file, and that's why I was trying to figure out

Re: [PATCH] D106577: [clang] Define __STDC_ISO_10646__

2021-08-13 Thread Corentin via cfe-commits
On Fri, Aug 13, 2021 at 7:42 PM Aaron Ballman via Phabricator < revi...@reviews.llvm.org> wrote: > aaron.ballman added a comment. > > In D106577#2943837 , @jyknight > wrote: > > > In D106577#2904960 , @rsmith > wro

[PATCH] D106891: [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 366311. gandhi21299 added a comment. - eliminated irrelevant changes to this patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 Files: llvm/lib/CodeGen/Atomi

[PATCH] D106891: [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:622 +return OptimizationRemark(DEBUG_TYPE, "Passed", AI->getFunction()) + << "A compare and swap loop was generated for an " + << AI->getOperationName(AI->getO

[PATCH] D107933: [clang] Expose unreachable fallthrough annotation warning

2021-08-13 Thread Nathan Chancellor via Phabricator via cfe-commits
nathanchance added a comment. In D107933#2942430 , @xbolva00 wrote: > Yes, something like that, plus I think you want put > UnreachableCodeFallthrough into group UnreachableCode as well. So you would recommend adding it to `UnreachableCode` rather than

[clang] 92ce6db - [NFC] Rename AttributeList::hasFnAttribute() -> hasFnAttr()

2021-08-13 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2021-08-13T11:09:18-07:00 New Revision: 92ce6db9ee7666a347fccf0f72ba3225b199d6d1 URL: https://github.com/llvm/llvm-project/commit/92ce6db9ee7666a347fccf0f72ba3225b199d6d1 DIFF: https://github.com/llvm/llvm-project/commit/92ce6db9ee7666a347fccf0f72ba3225b199d6d1.diff

[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 366316. cor3ntin added a comment. Rebasing 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/Lex/L

[PATCH] D104975: Implement P1949

2021-08-13 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 366315. cor3ntin added a comment. Rebasing 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/DiagnosticLexKinds.td clang/lib/Lex/L

[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'm okay with the changes, but I think we should call this out in the release notes as there's technically the potential for this to be a breaking change (in both C and C++). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D108045: [clangd] Fix clangd crash when including a header

2021-08-13 Thread Queen Dela Cruz via Phabricator via cfe-commits
qdelacru created this revision. qdelacru added a reviewer: kadircet. Herald added subscribers: usaxena95, arphaman. qdelacru requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Fixes https://github.com/clangd/

[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#2943837 , @jyknight wrote: > In D106577#2904960 , @rsmith wrote: > >>> One specific example I'd like to be considered: >>> Suppose the C standard library implementation's

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

2021-08-13 Thread Joel E. Denny via Phabricator via cfe-commits
jdenny added a comment. Thanks! I'll wait for the D106510 review before trying to land. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106509/new/ https://reviews.llvm.org/D106509 ___ cfe-commits mailing li

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

2021-08-13 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Thanks! Well, for those cases, && instead of & looks like a better choice. WDYT? Or is it a very noisy? Restrict more so both sides must have side effects? Maybe we could suggest to use cast - (int)boolRHS - as a way how to silence this warning.. Or any better suggest

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

2021-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106509/new/ https://reviews.llvm.org/D106509 ___ cfe-commits mailing list cfe-commits@l

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

2021-08-13 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:622 +return OptimizationRemark(DEBUG_TYPE, "Passed", AI->getFunction()) + << "A compare and swap loop was generated for an " + << AI->getOperationName(AI->getOperat

[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

[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 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 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 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 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 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 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 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 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: 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 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 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 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 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] 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] 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] 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 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] 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

[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

[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

[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

[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] 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] 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] 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

[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] 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

  1   2   >