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

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. In D86671#2920570 , @aeubanks wrote: > you can reopen the revision via "Add Action..." Hi @aeubanks , thank you for the suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86

[PATCH] D106614: [Clang] add btf_tag attribute

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6841 + if (auto *Rec = dyn_cast(D)) { +if (!Rec->isCompleteDefinition()) { + S.Diag(AL.getLoc(), diag::warn_btftag_attribute_fwd_decl_ignored) << Str; aaron.ballman wrote:

[PATCH] D105225: [clang] Add support for optional flag -fnew-infallible to restrict exception propagation

2021-08-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Sorry I'm late to the party here... is there any work ongoing to add this to GCC too? If not, would it make sense to send a quick note to the GCC development list pointing this out to reduce the chance that they add a similar feature with a different flag name? Reposit

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

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. In D86671#2921424 , @thakis wrote: > Any news here? This has been broken for over a day now. Hi @thakis, YES. I just create a new differential diff for it, https://reviews.llvm.org/D107325, could you help me to review it? Rep

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-03 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb updated this revision to Diff 363638. cjdb retitled this revision from "[clang] adds warning to suggest users replace symbols with alt tokens" to "[clang-tidy] adds warning to suggest users replace symbols with words". cjdb edited the summary of this revision. cjdb added a comment. Herald ad

[PATCH] D107267: [clang-format] don't break between function and function name in JS

2021-08-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107267/new/ https://reviews.llvm.org/D107267 ___ cfe-commits mailing list cfe-commits@lists.

[clang] ce49fd0 - [clang] [MinGW] Let the last of -mconsole/-mwindows have effect

2021-08-03 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2021-08-03T10:55:44+03:00 New Revision: ce49fd024b43bd76b149f984b8f0d16e92b9bb06 URL: https://github.com/llvm/llvm-project/commit/ce49fd024b43bd76b149f984b8f0d16e92b9bb06 DIFF: https://github.com/llvm/llvm-project/commit/ce49fd024b43bd76b149f984b8f0d16e92b9bb06.diff

[PATCH] D107261: [clang] [MinGW] Let the last of -mconsole/-mwindows have effect

2021-08-03 Thread Martin Storsjö 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 rGce49fd024b43: [clang] [MinGW] Let the last of -mconsole/-mwindows have effect (authored by mstorsjo). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D105003: [Analyzer] Improve report of "indeterminate file position" condition (alpha.unix.Stream).

2021-08-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske abandoned this revision. balazske added a comment. Adding this functionality is continued in D106262 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105003/new/ https://reviews.llvm.org/D105003 _

[PATCH] D75045: [analyzer] Improved check of `fgetc` in StreamChecker.

2021-08-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske abandoned this revision. balazske added a comment. Herald added subscribers: manas, steakhal. The idea of this change still applies but because checker and other code changes it is better to start again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I am not sure this is a good idea. Surely we can go with this approach and pretend to have the same GNUC version as the toolchain, but we are still using clang underneath as @joerg pointed out and we might not be able to parse language/compiler extensions supported by

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2485-2486 if (Next->Next && Next->Next->is(tok::identifier) && - !(Next->MatchingParen->Next && Next->MatchingParen->Next->is(tok::semi))) + (!Next->MatchingParen->Next || + Next->Ma

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/UseAlternativeTokensCheck.h:5-6 +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// This seems to be ve

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2921588 , @kadircet wrote: > I am not sure this is a good idea. Surely we can go with this approach and > pretend to have the same GNUC version as the toolchain, but we are still > using clang underneath as @joerg poi

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-08-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:682 + // here since editors won't properly render the symbol otherwise. + StringRef MaybeGroupName = Name; + if (MaybeGroupName.consume_front("-") && dgoldman wrote: > kadirce

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. > The most confusing thing for me that we already have this implicitly set > -fgnuc-version=4.2.1. So, we already have implicitly set __GNUC__ and other > GCC macros as a default behavior. It might be because clang actually supports all the GNU extensions up until 4.2

[clang] 4f4f278 - [clang-format] don't break between function and function name in JS

2021-08-03 Thread Krasimir Georgiev via cfe-commits
Author: Krasimir Georgiev Date: 2021-08-03T11:18:21+02:00 New Revision: 4f4f2783056fd01182740251b2ce8a77b12684b3 URL: https://github.com/llvm/llvm-project/commit/4f4f2783056fd01182740251b2ce8a77b12684b3 DIFF: https://github.com/llvm/llvm-project/commit/4f4f2783056fd01182740251b2ce8a77b12684b3.d

[PATCH] D107267: [clang-format] don't break between function and function name in JS

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f4f2783056f: [clang-format] don't break between function and function name in JS (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10726

[PATCH] D91950: [clang-format] Add BreakBeforeInlineASMColon configuration

2021-08-03 Thread Anastasiia Lukianenko via Phabricator via cfe-commits
anastasiia_lukianenko added inline comments. Comment at: clang/lib/Format/Format.cpp:1022 LLVMStyle.BreakBeforeConceptDeclarations = true; + LLVMStyle.BreakBeforeInlineASMColon = FormatStyle::BBIAS_OnlyMultiline; LLVMStyle.BreakBeforeTernaryOperators = true; --

[PATCH] D107318: [OpenCL] allow generic address and non-generic defs for CL3.0

2021-08-03 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added a comment. Yeah, this looks good. Thanks! Please notify when this is ready to land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107318/new/ https://reviews.llvm.org/D107318 ___ cfe-comm

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 363669. krasimir added a comment. - apply review suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107269/new/ https://reviews.llvm.org/D107269 Files: clang/lib/Format/TokenAnnotator.cpp clang/unit

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:2485-2486 if (Next->Next && Next->Next->is(tok::identifier) && - !(Next->MatchingParen->Next && Next->MatchingParen->Next->is(tok::semi))) + (!Next->MatchingParen->Next || + Next->M

[PATCH] D107145: clangd: Add new semantic token modifier "virtual"

2021-08-03 Thread Christian Kandeler via Phabricator via cfe-commits
ckandeler added a comment. Can someone please merge this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107145/new/ https://reviews.llvm.org/D107145 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] 08128fe - [clang] Make member var invalid when static initializer is invalid.

2021-08-03 Thread Adam Czachorowski via cfe-commits
Author: Adam Czachorowski Date: 2021-08-03T11:52:52+02:00 New Revision: 08128fe7059e20b3f97ae5abbdeff2e6f6c711ed URL: https://github.com/llvm/llvm-project/commit/08128fe7059e20b3f97ae5abbdeff2e6f6c711ed DIFF: https://github.com/llvm/llvm-project/commit/08128fe7059e20b3f97ae5abbdeff2e6f6c711ed.d

[PATCH] D105478: [clang] Make CXXRecrdDecl invalid if it contains any undeduced fields.

2021-08-03 Thread Adam Czachorowski via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG08128fe7059e: [clang] Make member var invalid when static initializer is invalid. (authored by adamcz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105478/

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX added a comment. In D107304#2921694 , @kadircet wrote: >> The most confusing thing for me that we already have this implicitly set >> -fgnuc-version=4.2.1. So, we already have implicitly set __GNUC__ and other >> GCC macros as a default behavior

[PATCH] D106152: [analyzer] Move test case to existing test file and remove duplicated test file.

2021-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @NoQ just a ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106152/new/ https://reviews.llvm.org/D106152 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[PATCH] D107073: [analyzer] Disable direct binding from list initialization for constant arrays of local storage duration.

2021-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 363677. ASDenysPetrov added a comment. Refined code a bit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107073/new/ https://reviews.llvm.org/D107073 Files: clang/lib/StaticAnalyzer/Core/RegionStore.cpp clang/test/Analysis/initialization.

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/test/CodeGenOpenCL/fp-atomics-optremarks-gfx90a.cl:25 +// GFX90A-HW-LABEL: test_atomic_add +// GFX90A-HW: global_atomic_add_f64 +float test_atomic_add(global atomic_double *d, double a) { Should check the operands

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. Should still have an IR only remark test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec requested changes to this revision. rampitec added a comment. This revision now requires changes to proceed. Needs an IR test, a test for different supported targets, and a negative test for unsupported features. Comment at: clang/include/clang/Basic/BuiltinsAMDGPU.de

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec requested changes to this revision. rampitec added a comment. This revision now requires changes to proceed. You cannot do it in a generic llvm code, it simply has no knowledge of what was the reason for BE's choice. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:5

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 363590. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. requested changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 Files: clan

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @rampitec should the unsafe check go in some pass later in the pipeline then? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 ___ c

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. In D106891#2921048 , @gandhi21299 wrote: > @rampitec should the unsafe check go in some pass later in the pipeline then? No. The only place which has all the knowledge is `SITargetLowering::shouldExpandAtomicRMWInIR()`. That i

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked 3 inline comments as done. gandhi21299 added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16212 + case AMDGPU::BI__builtin_amdgcn_flat_atomic_fmax_f64: { +Intrinsic::ID IID; +llvm::Type *ArgTy = llvm::Type::getDoubleTy(getLLVMContext())

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16212 + case AMDGPU::BI__builtin_amdgcn_flat_atomic_fmax_f64: { +Intrinsic::ID IID; +llvm::Type *ArgTy = llvm::Type::getDoubleTy(getLLVMContext()); gandhi21299 wrote: > rampitec

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16212 + case AMDGPU::BI__builtin_amdgcn_flat_atomic_fmax_f64: { +Intrinsic::ID IID; +llvm::Type *ArgTy = llvm::Type::getDoubleTy(getLLVMContext()); rampitec wrote: > gandhi21299 wr

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16212 + case AMDGPU::BI__builtin_amdgcn_flat_atomic_fmax_f64: { +Intrinsic::ID IID; +llvm::Type *ArgTy = llvm::Type::getDoubleTy(getLLVMContext()); arsenm wrote: > rampitec wrote

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16212 + case AMDGPU::BI__builtin_amdgcn_flat_atomic_fmax_f64: { +Intrinsic::ID IID; +llvm::Type *ArgTy = llvm::Type::getDoubleTy(getLLVMContext()); rampitec wrote: > arsenm wrote:

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16212 + case AMDGPU::BI__builtin_amdgcn_flat_atomic_fmax_f64: { +Intrinsic::ID IID; +llvm::Type *ArgTy = llvm::Type::getDoubleTy(getLLVMContext()); arsenm wrote: > rampitec wrote

[PATCH] D106909: [clang] Add clang builtins support for gfx90a

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:16270 +llvm::Function *F = CGM.getIntrinsic(IID, {ArgTy}); +return Builder.CreateCall(F, {Addr, Val, ZeroI32, ZeroI32, ZeroI1}); + } Should we map flags since we already have the

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @rampitec Since remarks cannot be emitted in SIISelLowering because it isn't a pass, in what form can I emit the diagnostics in SIISelLowering? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. In D106891#2921096 , @gandhi21299 wrote: > @rampitec Since remarks cannot be emitted in SIISelLowering because it isn't > a pass, in what form can I emit the diagnostics in SIISelLowering? You could pass ORE to the TLI. Repo

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:597 + OptimizationRemark Remark(DEBUG_TYPE, "Passed", RMW->getFunction()); + Remark << "A hardware instruction was generated"; + return Remark; This is too strong of a

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. How can I construct an ORE to start off with? I don't think its appropriate to construct it in `shouldExpandAtomicRMWInsts(RMW)` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D10689

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:597 + OptimizationRemark Remark(DEBUG_TYPE, "Passed", RMW->getFunction()); + Remark << "A hardware instruction was generated"; + return Remark; arsenm wrote: > Thi

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. In D106891#2921108 , @gandhi21299 wrote: > How can I construct an ORE to start off with? I don't think its appropriate > to construct it in `shouldExpandAtomicRMWInsts(RMW)` You have already constructed it. You can just pass i

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. If you insist on making this a target remark (which I don't think it should be, and don't think it should be too specific about why the expansion happened), you have to pass through the ORE to the callback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @rampitec That would mean changing the interfaces in TargetLowering(), AMDGPUISelLowering, and so on. Is that okay? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 __

[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

2021-08-03 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Callback sounds way nicer, I will do that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 ___ cfe-commits mailing list cfe-commits

[PATCH] D106394: [clang][pp] adds '#pragma include_instead'

2021-08-03 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Hi, sorry I'm late to the game. IWYU maintainer here. I saw this patch mentioned in the LLVM Weekly newsletter and immediately thought: "wow, great, I have to build support in IWYU for that!". I too prefer pragmas to magic comments, and I don't think `include_instead` ne

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks! Since the config file contents are fixed as far as I can tell, maybe we could instead just add a file with the right contents to `clang-tools-extra/test/clang-tidy/checkers/Inputs` and refer to that? (Use `%S/Inputs/myfile.txt`) (Alternatively you could use the

[PATCH] D107125: [Diagnostic] Split 'qualifier on reference type has no effect' out into a new flag

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D107125#2920989 , @lunasorcery wrote: > How does this look? I've got a 'control' test to demonstrate the diagnostic > as a child of ignored-qualifiers, as well as a test to demonstrate this > diagnostic can be disabled

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

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

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

2021-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. TODO: add regression tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107339/new/ https://reviews.llvm.org/D107339 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

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

2021-08-03 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. That looks interesting! Can you please add tests, though? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107339/new/ https://reviews.llvm.org/D107339 ___ cfe-commits mailing li

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

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D107292#2920637 , @dblaikie wrote: > Not a huge objection - but minor quandry: What's the motivation for this > patch? I don't know of any codebase that encourages/uses the alternative > tokens and I wonder if adding mo

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

2021-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D107339#2921896 , @vsavchenko wrote: > That looks interesting! > Can you please add tests, though? Yes, I'll add them soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D107292#2920774 , @dblaikie wrote: > In D107292#2920746 , @cjdb wrote: > >> In D107292#2920637 , @dblaikie >> wrote: >> >>> Not a huge o

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107269/new/ https://reviews.llvm.org/D107269 _

[clang] 977bdf6 - Make simple requirements starting with requires ill-formed in in requirement body

2021-08-03 Thread Aaron Ballman via cfe-commits
Author: Corentin Jabot Date: 2021-08-03T07:42:29-04:00 New Revision: 977bdf6f44edabb857bdff9ca249aa6eccb98e96 URL: https://github.com/llvm/llvm-project/commit/977bdf6f44edabb857bdff9ca249aa6eccb98e96 DIFF: https://github.com/llvm/llvm-project/commit/977bdf6f44edabb857bdff9ca249aa6eccb98e96.diff

[PATCH] D106252: Make simple requirements starting with requires ill-formed in in requirement body

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit on your behalf in 977bdf6f44edabb857bdff9ca249aa6eccb98e96 , thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob updated this revision to Diff 363698. dougpuob added a comment. Herald added a subscriber: aheejin. - Moved config content of regression test to `clang-tools-extra/test/clang-tidy/checkers/Inputs/readability-identifier-naming/hungarian-notation*/.clang-tidy`, then refer to those files i

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. In D107325#2921844 , @thakis wrote: > Thanks! > > Since the config file contents are fixed as far as I can tell, maybe we could > instead just add a file with the right contents to > `clang-tools-extra/test/clang-tidy/checkers/

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Thanks! Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/readability-identifier-naming/hungarian-notation1/.clang-tidy:3 +CheckOptions: + - { key: readability-

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In general, would it be possible to specify the configuration file as a custom path, and not use the hidden filename `.clang-tidy` in an otherwise empty directory? I think there's a `--config` flag on Tidy's interface for giving any file from any path for this. So it

[PATCH] D95588: [RISCV] Implement the MC layer support of P extension

2021-08-03 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. Kindly ping? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95588/new/ https://reviews.llvm.org/D95588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D106343: [OpenCL] Support cl_ext_float_atomics

2021-08-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Just to make sure you are aware Clang doesn't use this header by default, so the upstream users won't be able to call those functions unless you add them into `OpenCLBuiltins.td`: https://clang.llvm.org/docs/OpenCLSupport.html#opencl-builtins This header is only acces

[PATCH] D106614: [Clang] add btf_tag attribute

2021-08-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6841 + if (auto *Rec = dyn_cast(D)) { +if (!Rec->isCompleteDefinition()) { + S.Diag(AL.getLoc(), diag::warn_btftag_attribute_fwd_decl_ignored) << Str; yonghong-song wrote:

[clang] 80c17bb - This feature is not in Clang 13 and only has partial support

2021-08-03 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-08-03T08:21:15-04:00 New Revision: 80c17bb29838bee0d67a7bc2c775a8a91d69ac2d URL: https://github.com/llvm/llvm-project/commit/80c17bb29838bee0d67a7bc2c775a8a91d69ac2d DIFF: https://github.com/llvm/llvm-project/commit/80c17bb29838bee0d67a7bc2c775a8a91d69ac2d.diff

[PATCH] D107151: [OpenCL] Reduce duplicate defs by using multiclasses; NFC

2021-08-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Looks very neat! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107151/new/ https://reviews.llvm.org/D107151 ___

[PATCH] D107318: [OpenCL] allow generic address and non-generic defs for CL3.0

2021-08-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107318/new/ https://reviews.llvm.org/D107318 _

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

2021-08-03 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 363713. ASDenysPetrov added a comment. Added tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107339/new/ https://reviews.llvm.org/D107339 Files: clang/lib/StaticAnalyzer/Core/RegionStore.cpp clang/test/Analysis/initialization.cpp In

[PATCH] D106908: Improve UBSan documentation

2021-08-03 Thread Diane Meirowitz via Phabricator via cfe-commits
DianeMeirowitz added a comment. Mitch, OK and thanks for submitting it! Diane On 8/2/21, 5:55 PM, "Mitch Phillips via Phabricator" wrote: hctim added a comment. In D106908#2910131

[PATCH] D107304: [clangd][query-driver] Extract GCC version from the driver output

2021-08-03 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Yes, there are quite a number of small differences in builtin support and even certain macros that just invite even more trouble than this. This is IMO begging for hard to trace down errors. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob marked 3 inline comments as done. dougpuob added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/Inputs/readability-identifier-naming/hungarian-notation1/.clang-tidy:1 +Checks: readability-identifier-naming +CheckOptions: whisper

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob updated this revision to Diff 363717. dougpuob marked 3 inline comments as done. dougpuob added a comment. - Improved code review suggestions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107325/new/ https://reviews.llvm.org/D107325 File

[PATCH] D107347: [Sema] haveSameParameterTypes - fix repeated isNull() test

2021-08-03 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon created this revision. RKSimon added a reviewer: rsmith. RKSimon requested review of this revision. Herald added a project: clang. As reported on https://pvs-studio.com/en/blog/posts/cpp/0771/ (Snippet 2) - (and mentioned on rGdc4259d5a38409

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

2021-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, anemet, thegameg, erichkeane. Herald added subscribers: dexonsmith, jdoerfert, tschuett, hiraditya. fhahn requested review of this revision. Herald added projects: clang, LLVM. This patch adjusts the intrinsics definition of llvm.matrix

[PATCH] D107311: [clang] fix canonicalization of nested name specifiers

2021-08-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov edited the summary of this revision. mizvekov updated this revision to Diff 363710. mizvekov edited the summary of this revision. mizvekov added a comment. mizvekov updated this revision to Diff 363719. mizvekov updated this revision to Diff 363722. mizvekov

[PATCH] D107311: [clang] fix canonicalization of nested name specifiers

2021-08-03 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 363725. mizvekov edited the summary of this revision. mizvekov added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107311/new/ https://reviews.llvm.org/D107311 Files: clang/include/clang/Sema/S

[PATCH] D105904: [clangd] Support `#pragma mark` in the outline

2021-08-03 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked 2 inline comments as done. dgoldman added inline comments. Comment at: clang-tools-extra/clangd/FindSymbols.cpp:535 +/// by range. +std::vector mergePragmas(std::vector &Syms, + std::vector &Pragmas, kadirc

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

2021-08-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. This looks fine to me, and seems to fix my problem, thanks! I didn't spot anything obvious,and proof-read the LangRef and think it is all fine, but am not really the expert here, so p

[clang] f6bc614 - [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via cfe-commits
Author: Krasimir Georgiev Date: 2021-08-03T16:19:35+02:00 New Revision: f6bc614546e169bb1b17a29c422ebace038e6c62 URL: https://github.com/llvm/llvm-project/commit/f6bc614546e169bb1b17a29c422ebace038e6c62 DIFF: https://github.com/llvm/llvm-project/commit/f6bc614546e169bb1b17a29c422ebace038e6c62.d

[PATCH] D107269: [clan-format] detect function definitions more conservatively

2021-08-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf6bc614546e1: [clan-format] detect function definitions more conservatively (authored by krasimir). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107269/new/

[PATCH] D106343: [OpenCL] Support cl_ext_float_atomics

2021-08-03 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:24 #define cl_khr_subgroup_clustered_reduce 1 +#define cl_ext_float_atomics +#ifdef cl_khr_fp16 Should this be defined as `1`? Should this define be tested in `clang/test/Headers/opencl

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 363734. manas added a comment. Fix test comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.org/D103440 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp cla

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-08-03 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/utils/analyzer/Dockerfile:15-22 RUN apt-get update && apt-get install -y \ git=1:2.17.1* \ gettext=0.19.8.1* \ python3=3.6.7-1~18.04 \ python3-pip=9.0.1-2.3* \ -cmake=3.20.5* \ -ninja-build=1.8.2-1 +

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas added inline comments. Comment at: clang/utils/analyzer/Dockerfile:15-22 RUN apt-get update && apt-get install -y \ git=1:2.17.1* \ gettext=0.19.8.1* \ python3=3.6.7-1~18.04 \ python3-pip=9.0.1-2.3* \ -cmake=3.20.5* \ -ninja-build=1.8.2-1 +c

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas updated this revision to Diff 363742. manas added a comment. Fix unrelated commits mess up! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.org/D103440 Files: clang/lib/StaticAnalyzer/Core/RangeConstraintMana

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas marked an inline comment as done. manas added a comment. I have updated the proof for Add: https://gist.github.com/weirdsmiley/ad6a9dbf3370e96d29f9e90068931d25 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103440/new/ https://reviews.llvm.or

[PATCH] D74436: Change clang option -ffp-model=precise to select ffp-contract=on

2021-08-03 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. It looks like this patch is also causing mis-compares in both SPEC2006 and SPEC2017 on AArch64, e.g. in `External/SPEC/CFP2006/453.povray/`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74436/new/ https://reviews.llvm.org/D

[PATCH] D105273: [analyzer] Introduce range-based reasoning for subtraction operator

2021-08-03 Thread Manas Gupta via Phabricator via cfe-commits
manas added a comment. In D105273#2891921 , @manas wrote: > Here is the proof using Z3: > https://gist.github.com/weirdsmiley/8a35a0e1f55f310e3566cbd47555491a I have updated the proof for Sub. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D104647: [analyzer] Support SVal::getType for pointer-to-member values

2021-08-03 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:85 const NamedDecl *D; + QualType T; llvm::ImmutableList L; NoQ wrote: > What prevents you from obtaining the type from `D`? I guess `N

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob added a comment. Hi @thakis: I can't access the repo, could you please help me to land? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107325/new/ https://reviews.llvm.org/D107325 ___ cfe-commits

[PATCH] D107141: [Inline-asm] Add semacheck for unsupported constraint

2021-08-03 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 363746. pengfei added a comment. Implemented the handling for structure types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 Files: clang/lib/CodeGen/CGStmt.cpp

[PATCH] D106394: [clang][pp] adds '#pragma include_instead'

2021-08-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D106394#2921830 , @kimgr wrote: > Took me a while to get my head around it, but I see now that this is only > supported for system headers. I think that makes sense for the compiler, > otherwise it will be hard to guess whic

[PATCH] D106614: [Clang] add btf_tag attribute

2021-08-03 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added inline comments. Comment at: clang/test/Sema/attr-btf_tag.c:31 + +int __tag2 foo(struct t1 *arg); // expected-warning {{attribute 'btf_tag("tag2")' ignored as not in later redeclaration or definition}} +int __tag foo(struct t1 *arg); aaron.ba

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

2021-08-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D107292#2921901 , @aaron.ballman wrote: > In D107292#2920774 , @dblaikie > wrote: > >> In D107292#2920746 , @cjdb wrote: >> >>> In D107292#2

  1   2   >