[PATCH] D98688: [-Wcalled-once-parameter] Harden analysis in terms of block use

2021-03-17 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1729 + handleBlockThatIsGuaranteedToBeCalledOnce(const BlockDecl *Block) override { +Data.flushWarnings(Block, S); + } NoQ wrote: > Do i understand correctly that you're

[PATCH] D98692: [clang-tidy] Add cppcoreguidelines-comparison-operator

2021-03-17 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 331170. nullptr.cpp marked 6 inline comments as done. nullptr.cpp edited the summary of this revision. nullptr.cpp added a comment. Modify according to suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. I strongly suggest you bring up this ongoing creep of `if (DestTy->isX86_AMXTy()) return false;` on llvm-dev. I strongly suggest you are covering up bugs in you backend/pass w

[PATCH] D98726: [analyzer] Remove unnecessary TODO

2021-03-17 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. @NoQ, regarding https://godbolt.org/z/1EczEW, I don't think there should be a warning since the original pointer may be needed in the caller. But thanks for pointing out the possible leaks due to release! :) In the line that you have pointed out, I have thought about the

[PATCH] D97183: [analyzer] Add NoteTag for smart-ptr get()

2021-03-17 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. @NoQ, could you please have a look at this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2630942 , @lebedev.ri wrote: > I strongly suggest you bring up this ongoing creep of `if > (DestTy->isX86_AMXTy()) return false;` on llvm-dev. > I strongly supsect you are covering up bugs in you backend/pass with

[PATCH] D96976: [analyzer] Fix reinterpret_cast handling for pointer-to-member

2021-03-17 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. @steakhal, being picky with code from beginners is a good way to train them to write code I think, and so I must thank you for you scrutiny! As for the test you pointed out, it is a wrong test. It is wrong now that I have a better understanding of the problem. There are

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D98757#2630961 , @xiangzhangllvm wrote: > In D98757#2630942 , @lebedev.ri > wrote: > >> I strongly suggest you bring up this ongoing creep of `if >> (DestTy->isX86_AMXTy()) return f

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Ally Tiritoglu via Phabricator via cfe-commits
atirit updated this revision to Diff 331172. atirit added a comment. Removed `strlen` call and added tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93938/new/ https://reviews.llvm.org/D93938 Files: clang/lib/Format/TokenAnnotator.cpp clan

[PATCH] D80464: [CUDA] Missing __syncthreads intrinsic in __clang_cuda_device_functions.h

2021-03-17 Thread Tommy Chiang via Phabricator via cfe-commits
oToToT added a comment. I found this patch occasionally, I think D98128 is what you need to solve this problem. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80464/new/ https://reviews.llvm.org/D80464 ___

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

2021-03-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. >> I'm nervous in general about the looming idea of declaration unloading, but >> the fact that it's been working in Cling for a long time gives me some >> confidence that we can do that in a way that's not prohibitively expensive >> and invasive. > > I don't reall

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2630968 , @lebedev.ri wrote: > I think that is a traditional backend problem that the pass will just have to > be updated to deal with. Hi @lebedev.ri , seems there is some mistakes, let me first point out the p

[clang] c86dacd - [-Wcalled-once-parameter] Let escapes overwrite MaybeCalled states

2021-03-17 Thread Valeriy Savchenko via cfe-commits
Author: Valeriy Savchenko Date: 2021-03-17T11:12:55+03:00 New Revision: c86dacd1a4489572721dec3135506d31da96c679 URL: https://github.com/llvm/llvm-project/commit/c86dacd1a4489572721dec3135506d31da96c679 DIFF: https://github.com/llvm/llvm-project/commit/c86dacd1a4489572721dec3135506d31da96c679.d

[PATCH] D98622: [-Wcalled-once-parameter] Let escapes overwrite MaybeCalled states

2021-03-17 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc86dacd1a448: [-Wcalled-once-parameter] Let escapes overwrite MaybeCalled states (authored by vsavchenko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9862

[PATCH] D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC).

2021-03-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:343 + if (!DRV.isEmpty()) { +Out << Sep << "Mutex destroys with unknown result:" << NL; +for (auto I : DRV) { NoQ wrote: > I think this should be passive

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Once again, i suggest to bring this up on llvm-dev. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98757/new/ https://reviews.llvm.org/D98757 ___ cfe-commits mailing list cfe-c

[PATCH] D97361: [clang-tidy] Add cppcoreguidelines-comparison-operator

2021-03-17 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 331178. nullptr.cpp retitled this revision from "[clang-tidy] Add readability-redundant-using check" to "[clang-tidy] Add cppcoreguidelines-comparison-operator". nullptr.cpp edited the summary of this revision. nullptr.cpp added a comment. Herald added su

[PATCH] D98692: [clang-tidy] Add cppcoreguidelines-comparison-operator

2021-03-17 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 331179. nullptr.cpp edited the summary of this revision. nullptr.cpp added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98692/new/ https://reviews.llvm.org/D98692 Files: clang-tools-ex

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added a comment. In D98757#2631019 , @lebedev.ri wrote: > Once again, i suggest to bring this up on llvm-dev. That is obvious, Discuss what, can you point it out clearly ? The topic is do it in mid-end or back-end ? Repository: rG LLVM

[PATCH] D98757: [AMX] Not fold constant bitcast into amx intrisic

2021-03-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D98757#2631036 , @xiangzhangllvm wrote: > In D98757#2631019 , @lebedev.ri > wrote: > >> Once again, i suggest to bring this up on llvm-dev. > > That is obvious, > Discuss what, can y

[PATCH] D98433: [clang] [C++2b] [P1102] Accept lambdas without parameter list ().

2021-03-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius planned changes to this revision. curdeius added a comment. I've checked and GCC accepts lambdas without parens (but with specifiers) in all standard modes, giving a warning pre-C++2b. I guess it's reasonable to align the behaviour. Cf. https://github.com/gcc-mirror/gcc/commit/0f161cc84

[PATCH] D98741: [analyzer] Introduce common bug category "Unused code".

2021-03-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. `Unused code` seems to be broader and probably a better fit for a generic //bug category//. Comment at: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp:263-264 -BR.EmitBasicReport(AC->getDecl(), Checker,

[clang] 0cb7e7c - Make iteration over the DeclContext::lookup_result safe.

2021-03-17 Thread Vassil Vassilev via cfe-commits
Author: Vassil Vassilev Date: 2021-03-17T08:59:04Z New Revision: 0cb7e7ca0c864e052bf49978f3bcd667c9e16930 URL: https://github.com/llvm/llvm-project/commit/0cb7e7ca0c864e052bf49978f3bcd667c9e16930 DIFF: https://github.com/llvm/llvm-project/commit/0cb7e7ca0c864e052bf49978f3bcd667c9e16930.diff LO

[PATCH] D91524: Make iteration over the DeclContext::lookup_result safe.

2021-03-17 Thread Vassil Vassilev 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 rG0cb7e7ca0c86: Make iteration over the DeclContext::lookup_result safe. (authored by v.g.vassilev). Herald added projects: clang, LLDB. Herald added s

[PATCH] D98502: [clang][Checkers] Extend PthreadLockChecker state dump (NFC).

2021-03-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp:343 + if (!DRV.isEmpty()) { +Out << Sep << "Mutex destroys with unknown result:" << NL; +for (auto I : DRV) { balazske wrote: > NoQ wrote: > > I think this sh

[PATCH] D98688: [-Wcalled-once-parameter] Harden analysis in terms of block use

2021-03-17 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 331186. vsavchenko added a comment. Replace manual memory management of IPData with std::unique_ptr Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98688/new/ https://reviews.llvm.org/D98688 Files: clang/in

[PATCH] D91524: Make iteration over the DeclContext::lookup_result safe.

2021-03-17 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Herald added a subscriber: JDevlieghere. argh... I only now see the pre-merge suggestions -- almost all of them seem not super essential -- let me know if I should address them in a subsequent commit... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D98622: [-Wcalled-once-parameter] Let escapes overwrite MaybeCalled states

2021-03-17 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D98622#2630012 , @NoQ wrote: > LGTM! Do any of the high-level comments at the beginning of the file need to > be updated to reflect this change? No, they don't. This commit doesn't affect the join semantics (the main focus

[PATCH] D97361: [clang-tidy] Add readability-redundant-using check

2021-03-17 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 331188. nullptr.cpp retitled this revision from "[clang-tidy] Add cppcoreguidelines-comparison-operator" to "[clang-tidy] Add readability-redundant-using check". nullptr.cpp edited the summary of this revision. nullptr.cpp added a comment. Rebase Repos

[PATCH] D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec

2021-03-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 331191. steakhal added a comment. Moved to line 3481, changed the test logic accordingly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98707/new/ https://reviews.llvm.org/D98707 Files: clang/lib/AST/ASTImp

[clang] 967b64b - [AMDGPU] Split dot2-insts feature

2021-03-17 Thread Jay Foad via cfe-commits
Author: Jay Foad Date: 2021-03-17T09:42:21Z New Revision: 967b64beb4bf953f452a2866716065e8bbcb5d2f URL: https://github.com/llvm/llvm-project/commit/967b64beb4bf953f452a2866716065e8bbcb5d2f DIFF: https://github.com/llvm/llvm-project/commit/967b64beb4bf953f452a2866716065e8bbcb5d2f.diff LOG: [AMD

[PATCH] D98717: [AMDGPU] Split dot2-insts feature

2021-03-17 Thread Jay Foad 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 rG967b64beb4bf: [AMDGPU] Split dot2-insts feature (authored by foad). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331193. whisperity marked 4 inline comments as done. whisperity added a comment. **[NFC]** Fixed nits and code formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98635/new/ https://reviews.llvm.org/D9

[PATCH] D97717: [SYCL] Rework the SYCL driver options

2021-03-17 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/unittests/Frontend/CompilerInvocationTest.cpp:547 TEST_F(CommandLineTest, ConditionalParsingIfTrueFlagNotPresent) { const char *Args[] = {"-fsycl"}; This test originally checked that enabling SYCL withou

[PATCH] D98692: [clang-tidy] Add cppcoreguidelines-comparison-operator

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. While we're here, I'm not sure if there is a cppcoreguideline for it, but parameters to comparison functions should be passed by const ref usually, or by value if they are cheap to copy. Maybe there's precedent to extend this to flag parameters that take non const refe

[PATCH] D98574: [Sparc] Define the same macros for -mcpu=v9 as GCC on Linux

2021-03-17 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added inline comments. Comment at: clang/lib/Basic/Targets/Sparc.cpp:160-164 + // Linux doesn't need these variants, but the BSDs do. + if (getTriple().getOS() != llvm::Triple::Linux) { +Builder.defineMacro("__sparcv9"); +Builder.defineMacro("__

[PATCH] D98574: [Sparc] Define the same macros for -mcpu=v9 as GCC on Linux

2021-03-17 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D98574#2624558 , @brad wrote: > I do not immediately see why the other tests are failing, but at a bare > minimum the following test from > clang/test/Preprocessor/predefined-arch-macros.c will have to be updated.. > > // R

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/TokenAnnotator.cpp:3679-3680 +if (remainingFile[whileIndex] != '\n' && +(remainingFile[whileIndex] == ' ' &

[PATCH] D93594: [X86] Pass to transform amx intrinsics to scalar operation.

2021-03-17 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added a comment. The fix is uploaded at https://reviews.llvm.org/D98773. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93594/new/ https://reviews.llvm.org/D93594 ___ cfe-commits mailing list cf

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added reviewers: thakis, njames93. Herald added a subscriber: mgorny. steveire requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This way we can add support for other nodes without du

[PATCH] D98487: [AArch64][SVE/NEON] Add support for FROUNDEVEN for both NEON and fixed length SVE

2021-03-17 Thread Bradley Smith 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 rGcf0da91ba5e1: [AArch64][SVE/NEON] Add support for FROUNDEVEN for both NEON and fixed length… (authored by bsmith). Repository: rG LLVM Github Mono

[clang] cf0da91 - [AArch64][SVE/NEON] Add support for FROUNDEVEN for both NEON and fixed length SVE

2021-03-17 Thread Bradley Smith via cfe-commits
Author: Bradley Smith Date: 2021-03-17T11:41:22Z New Revision: cf0da91ba5e192920809e30dbb359042c2f2112a URL: https://github.com/llvm/llvm-project/commit/cf0da91ba5e192920809e30dbb359042c2f2112a DIFF: https://github.com/llvm/llvm-project/commit/cf0da91ba5e192920809e30dbb359042c2f2112a.diff LOG:

[PATCH] D98433: [clang] [C++2b] [P1102] Accept lambdas without parameter list ().

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D98433#2631037 , @curdeius wrote: > I've checked and GCC accepts lambdas without parens (but with specifiers) in > all standard modes, giving a warning pre-C++2b. > I guess it's reasonable to align the behaviour. > Cf. >

[PATCH] D97717: [SYCL] Rework the SYCL driver options

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 331227. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Updating the unit tests based on review feedback. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97717/new/ https://reviews.llvm.org/D97717 Files: clang/i

[PATCH] D97717: [SYCL] Rework the SYCL driver options

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked an inline comment as done. aaron.ballman added inline comments. Comment at: clang/unittests/Frontend/CompilerInvocationTest.cpp:547 TEST_F(CommandLineTest, ConditionalParsingIfTrueFlagNotPresent) { const char *Args[] = {"-fsycl"}; jansv

[clang] ecfa874 - Update diagnostic groups for pre-compat warnings

2021-03-17 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-03-17T07:52:34-04:00 New Revision: ecfa87453113dad6bd9430606a06f7ab728cc21b URL: https://github.com/llvm/llvm-project/commit/ecfa87453113dad6bd9430606a06f7ab728cc21b DIFF: https://github.com/llvm/llvm-project/commit/ecfa87453113dad6bd9430606a06f7ab728cc21b.diff

[PATCH] D97871: Update diagnostic groups for pre-compat warnings

2021-03-17 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. I feel comfortable accepting this one on my own authority given that it follows the pattern we talked about, so I'm accepting the review (so I can close it) and I've committed in

[PATCH] D97871: Update diagnostic groups for pre-compat warnings

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. Committed in ecfa87453113dad6bd9430606a06f7ab728cc21b Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97871/new/

[PATCH] D98775: [AST] Add introspection support for Decls

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The test code has lots of interesting locations which are not yet introspected, but those will come later: http:/

[PATCH] D98692: [clang-tidy] Add cppcoreguidelines-comparison-operator

2021-03-17 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. In D98692#2631182 , @njames93 wrote: > While we're here, I'm not sure if there is a cppcoreguideline for it, but > parameters to comparison functions should be passed by const ref usually, or > by value if they are cheap to c

[clang] b90e7bf - NFC: Use a simple macro to test AST node introspection

2021-03-17 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-03-17T12:08:55Z New Revision: b90e7bf25dc3cc056331dfe5fca21b3ea1713299 URL: https://github.com/llvm/llvm-project/commit/b90e7bf25dc3cc056331dfe5fca21b3ea1713299 DIFF: https://github.com/llvm/llvm-project/commit/b90e7bf25dc3cc056331dfe5fca21b3ea1713299.diff LOG:

[PATCH] D97717: [SYCL] Rework the SYCL driver options

2021-03-17 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. Thanks for addressing this! LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97717/new/ https://reviews.llvm.org/D97717 ___

[clang] c165a99 - [SYCL] Rework the SYCL driver options

2021-03-17 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-03-17T08:27:19-04:00 New Revision: c165a99a1b8861af87e0509a2e14debf2764804b URL: https://github.com/llvm/llvm-project/commit/c165a99a1b8861af87e0509a2e14debf2764804b DIFF: https://github.com/llvm/llvm-project/commit/c165a99a1b8861af87e0509a2e14debf2764804b.diff

[PATCH] D97717: [SYCL] Rework the SYCL driver options

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman marked an inline comment as done. aaron.ballman added a comment. In D97717#2631515 , @jansvoboda11 wrote: > Thanks for addressing this! LGTM Thank you for the review! I've commit in c165a99a1b8861af87e05

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331241. whisperity marked 6 inline comments as done. whisperity added a subscriber: Szelethus. whisperity added a comment. - Add `const reverse iterator` to the default-ignored typename list. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331242. whisperity marked 4 inline comments as done. whisperity added a comment. - Made the diagnostic message about "binding power" easier to understand. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95736/new/ https://reviews.llvm.org/D95736 F

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:363 +/// Returns the diagnostic-friendly name of the node, or empty string. +static SmallString<64> getName(const NamedDecl *ND) { + SmallString<64> Name;

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331243. whisperity marked 6 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm.org/D96355 Files: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp clang-tools-extra/cla

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331244. whisperity marked 4 inline comments as done. whisperity added a comment. - Added some test cases to ensure edge cases won't crash. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78652/new/ https://reviews.llvm.org/D78652 Files: clang-to

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:481 + + assert(TargetIdx.hasValue() && "Matched, but didn't find index?"); + TargetParams[PassedParamOfThisFn].insert( whisperity wro

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 331245. whisperity marked 5 inline comments as done. whisperity added a comment. - Made a precondition check explicit, and added an early `return` to not evaluate a case where it would return `false` anyways... CHANGES SINCE LAST ACTION https://reviews

[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD

2021-03-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Including `CMakeDetermineSystem` gives me: loading initial cache file ../clang/cmake/caches/3-stage.cmake CMake Error: Could not open file for write in copy operation /CMakeSystem.cmake.tmp CMake Error: : System Error: Permission denied CMake Error at /usr/share/

[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD

2021-03-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 331246. tbaeder added a comment. Here's a version that shells out to `uname -m` to get the arch. Setting both the `_LLD` and `_LTO` variable that often looks a bit odd but I didn't want to use other variables. Can change that of course. CHANGES SINCE LAST

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:363 +/// Returns the diagnostic-friendly name of the node, or empty string. +static SmallString<64> getName(const NamedDecl *ND) { + SmallString<64> Name; -

[clang] 7bafe33 - Fixing a test case that was missed in c165a99a1b8861af87e0509a2e14debf2764804b

2021-03-17 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-03-17T08:46:04-04:00 New Revision: 7bafe336a1d8e6f4b7ac3da5066225eff1d12880 URL: https://github.com/llvm/llvm-project/commit/7bafe336a1d8e6f4b7ac3da5066225eff1d12880 DIFF: https://github.com/llvm/llvm-project/commit/7bafe336a1d8e6f4b7ac3da5066225eff1d12880.diff

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-03-17 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm.org/D96355 ___ cfe-commits mailing list

[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD

2021-03-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. LGTM. The `*_LTO` and `*_LLD` variables are usable independently of each other even on non-Apple platforms, so it makes sense to need to set them both. LLVM’s LTO is supported in Gold, and I believe our build system supports MSVC’s LTCG (whi

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. (but please wait for "accept" from an owner). Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return ll

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; Question: would it make sense to

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 2 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; ---

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} ymandel wrote: > nit: while this change is not

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them from the function. +class Returned { + llvm::SmallVector ReturnedParams; whisperity wrote: > aaron.ballman w

[clang] d9ef6bc - [clang] Disable LTO and LLD on SystemZ for stage3 builds

2021-03-17 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2021-03-17T15:15:41+01:00 New Revision: d9ef6bc42643ae4feab3f9eca97864d72034f2ce URL: https://github.com/llvm/llvm-project/commit/d9ef6bc42643ae4feab3f9eca97864d72034f2ce DIFF: https://github.com/llvm/llvm-project/commit/d9ef6bc42643ae4feab3f9eca97864d72034f2ce.diff LO

[PATCH] D89942: Disable LTO and LLD for bootstrap builds on systems unsupported by LLD

2021-03-17 Thread Timm Bäder 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 rGd9ef6bc42643: [clang] Disable LTO and LLD on SystemZ for stage3 builds (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D8

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} flx wrote: > ymandel wrote: > > nit: while

[PATCH] D96843: [Clang][RISCV] Add vsetvl and vsetvlmax.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen updated this revision to Diff 331267. khchen marked 2 inline comments as done. khchen added a comment. 1. address Craig's comments. 2. update test by using 2>&1 instead of 2>%t Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96843/new/ https:/

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Ally Tiritoglu via Phabricator via cfe-commits
atirit added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3679-3680 +if (remainingFile[whileIndex] != '\n' && +(remainingFile[whileIndex] == ' ' && + remainingFile[whileIndex - 1] == ' ')) { + remainingLineCharCount++;

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. yaxunl requested review of this revision. In device compilation, clang emit global variables in device or constant address space then cast them to default address space. If global variables are not used, there are invisible addre

[PATCH] D98692: [clang-tidy] Add cppcoreguidelines-comparison-operator

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D98692#2631504 , @nullptr.cpp wrote: > The relevant rule is F.16: For "in" parameters, pass cheaply-copied types by > value and others by reference to const >

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Felix Berger via Phabricator via cfe-commits
flx added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} ymandel wrote: > flx wrote: > > ymandel wrote:

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Why were there two copies in the first place? What was the copy in the cmake file good for, why wasn't the one written by generate_cxx_src_locs.py sufficient? But pulling it into its own file seems nicer than having it inline in python or cmake code. Another observation

[PATCH] D98388: [RISCV][Clang] Add RVV vle/vse intrinsic functions.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/utils/TableGen/RISCVVEmitter.cpp:687 + +unsigned Skew = 0; +if (HasMaskedOffOperand) craig.topper wrote: > ``` > unsigned Skew = HasMaskedOffOperand ? 1 : 0; > ``` > > unless this needs to get more complica

[PATCH] D96843: [Clang][RISCV] Add vsetvl and vsetvlmax.

2021-03-17 Thread Zakk Chen via Phabricator via cfe-commits
khchen marked an inline comment as done. khchen added inline comments. Comment at: clang/lib/Basic/Targets/RISCV.cpp:169 +Builder.defineMacro("__rvv_e64", "3"); +Builder.defineMacro("__rvv_e128", "4"); + craig.topper wrote: > Are intending to support e128

[PATCH] D97371: [clang][parser] Remove questionable ProhibitAttributes() call in objc parsing

2021-03-17 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. John, do you have any more comments on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97371/new/ https://reviews.llvm.org/D97371 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D98738: [clang-tidy] performance-* checks: Match AllowedTypes against qualified type names when they contain "::".

2021-03-17 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.h:56 +if (Name.find("::") != std::string::npos) { + return llvm::Regex(Name).match(Node.getQualifiedNameAsString()); +} flx wrote: > ymandel wrote: > > flx wrote:

[PATCH] D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec

2021-03-17 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. I did not notice that `ImportVariables` is different than `ImportDecl`, I like the first version of the test better (with `ImportDecl`) (but the current is not wrong), can you change it back only at a different position (line 738 can be good, before test "ImportRecordT

[clang] 410f09a - [OPENMP51]Initial support for the interop directive.

2021-03-17 Thread Mike Rice via cfe-commits
Author: Mike Rice Date: 2021-03-17T09:42:07-07:00 New Revision: 410f09af09b9261f51663773bee01ec7b37e8fd4 URL: https://github.com/llvm/llvm-project/commit/410f09af09b9261f51663773bee01ec7b37e8fd4 DIFF: https://github.com/llvm/llvm-project/commit/410f09af09b9261f51663773bee01ec7b37e8fd4.diff LOG

[PATCH] D98558: [OPENMP51]Initial support for the interop directive

2021-03-17 Thread Mike Rice 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 rG410f09af09b9: [OPENMP51]Initial support for the interop directive. (authored by mikerice). Herald added a project: clang. Herald added a subscriber:

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-03-17 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 once the optional bits are fixed up. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:529 +/// ReturnStmts return them

[PATCH] D98792: [ASTMatchers][NFC] Use move semantics when passing matchers around.

2021-03-17 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: klimek, aaron.ballman, steveire. Herald added a subscriber: pengfei. njames93 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Changing matchers to use non-const members and adding r-

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:3679-3680 +if (remainingFile[whileIndex] != '\n' && +(remainingFile[whileIndex] == ' ' && + remainingFile[whileIndex - 1] == ' ')) { + remainingLineCharCount++

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 331300. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98774/new/ https://reviews.llvm.org/D98774 Files: clang/lib/Tooling/CMakeLists.txt clang/lib/Tooling/DumpTool/generat

[PATCH] D98707: [clang][ASTImporter] Fix import of VarDecl regarding thread local storage spec

2021-03-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 331302. steakhal added a comment. Revert to the previous version and move to line 738 just before "ImportRecordTypeInFunc". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98707/new/ https://reviews.llvm.org/D9

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Shouldn't the unused ASCs be eliminated by DCE? We seem to be cleaning up the consequences of a problem that happened somewhere else. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98783/new/ https://reviews.llvm.org/D98783 _

[PATCH] D98774: [AST] De-duplicate empty node introspection

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked 4 inline comments as done. steveire added a comment. In D98774#2631898 , @thakis wrote: > Why were there two copies in the first place? What was the copy in the cmake > file good for, why wasn't the one written by generate_cxx_src_locs.py

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I do not see any hanging ASCs in the generated IR with clang@HEAD: https://godbolt.org/z/TE4Yhr What do I miss? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98783/new/ https://reviews.llvm.org/D98783 ___ cfe-commits ma

[PATCH] D93938: [clang-format] Fixed AfterEnum handling

2021-03-17 Thread Ally Tiritoglu via Phabricator via cfe-commits
atirit added a comment. I've found yet another bug. When `AllowShortEnumsOnASingleLine` is `true` and a multiline enum is forced (by line length, trailing comma, etc.), multiple names for the enum are placed on separate lines. Example: enum { A, B, C, } ShortEnum1, ShortEnum2; Is refactored

[PATCH] D69218: [clang][AST] Add `CXXBaseSpecifier` matcher support

2021-03-17 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added reviewers: steveire, njames93. steveire added a comment. Could you rebase this? Parts of it were common with another patch which was merged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 _

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D98783#2632153 , @tra wrote: > I do not see any hanging ASCs in the generated IR with clang@HEAD: > https://godbolt.org/z/TE4Yhr > > What do I miss? The unused casts are invisible since they are not used by any visible IR's. To

[PATCH] D98783: [CUDA][HIP] Remove unused addr space casts

2021-03-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D98783#2632143 , @tra wrote: > Shouldn't the unused ASCs be eliminated by DCE? We seem to be cleaning up the > consequences of a problem that happened somewhere else. DCE does not eliminate these unused ASCs because normally th

  1   2   >