[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

2021-11-26 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-container-contains.cpp:189 +// NO-WARNING. +// CHECK-FIXES: if (MyMap.count(0)) +return nullptr; whisperity wrote: > If a fix is not generated, wh

[PATCH] D114649: [libc++] Implement not-yet-voted LWG3436

2021-11-26 Thread Louis Dionne via Phabricator via cfe-commits
ldionne created this revision. ldionne added a reviewer: rsmith. ldionne requested review of this revision. Herald added projects: clang, libc++. Herald added subscribers: libcxx-commits, cfe-commits. Herald added a reviewer: libc++. LWG3436 adds support for array types in construct_at. That is ne

[PATCH] D114649: [libc++] Implement not-yet-voted LWG3436

2021-11-26 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. @rsmith I suspect that enabling array placement new properly will be more complicated than this, but this simple change solved my immediate issue. Please let me know if that's insufficient. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D114651: [clang-cl] Expose -Wall to clang-cl by unaliasing -Wall, keeping /Wall as alias to -Weverything

2021-11-26 Thread Sylvain Audi via Phabricator via cfe-commits
saudi created this revision. saudi added reviewers: rnk, hans. saudi added a project: clang. Herald added subscribers: jeroen.dobbelaere, dang. saudi requested review of this revision. Herald added a subscriber: cfe-commits. Currently, for clang-cl, `-Wall` is treated identically as `/Wall` and is

[PATCH] D113753: [Analyzer][Core] Better simplification in SimpleSValBuilder::evalBinOpNN

2021-11-26 Thread Bjorn Pettersson via Phabricator via cfe-commits
bjope added a comment. This seem to cause some weird results. Given this input: bar(short k) { k++; for (short f = 0; f < k; f++) ; (long)k << 16; } we get > clang --analyze --target=x86_64 'bbi-63538.c' bbi-63538.c:5:11: warning: The result of the left shift is unde

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-26 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 390093. gandhi21299 added a comment. addressed feedback including - correction of function signatures - checking for order combinations - correcting expected store atomic instruction - using predefined macros for memory order Repository: rG LLVM Githu

[PATCH] D88299: [clang-format] Add MacroUnexpander.

2021-11-26 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Noticed I should have waiting with the renaming of the file until the review is done :( Sorry for the extra confusion. Comment at: clang/lib/Format/MacroUnexpander.cpp:77 + // stream, we need to continue the unexpansion until we find the right token +

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-26 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 390094. gandhi21299 added a comment. applied clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 Files: clang/include/clang/AST/Expr.h clang/include/

[PATCH] D114653: [OPENMP]Fix error emission for dependent expressions in iterators for depend clauses.

2021-11-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: jdoerfert, mikerice. Herald added subscribers: guansong, yaxunl. ABataev requested review of this revision. Herald added a subscriber: sstefan1. Herald added a project: clang. Need to postpone analysis for addressable lvalue in a depend claus

[PATCH] D114251: [AST] Add a sugar type for types found via UsingDecl

2021-11-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 7 inline comments as done. sammccall added a comment. Thanks a lot for the comments, very helpful. The next revision is much narrower: it'll only sugar exactly the type associated with a UsingShadowDecl. It no longer wraps the underlying type. I've added fixes for all the clang-t

[PATCH] D114251: [AST] Add a sugar type for types found via UsingDecl

2021-11-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 390101. sammccall marked 6 inline comments as done. sammccall edited the summary of this revision. sammccall added a comment. Herald added a subscriber: carlosgalvezp. - Address review comments, make the type class much more concrete - upgrade clang-tools-ex

[PATCH] D114651: [clang-cl] Expose -Wall to clang-cl by unaliasing -Wall, keeping /Wall as alias to -Weverything

2021-11-26 Thread Markus Böck via Phabricator via cfe-commits
zero9178 added a comment. Is the deviation from MSVC behaviour here intentional? MSVC flags allow both using a `/` as well as `-` as prefix. That means Both `-Wall` and `/Wall` are accepted by MSVC as well as clang-cl and in both compilers currently lead to ALL warnings being emitted. So this p

[PATCH] D113753: [Analyzer][Core] Better simplification in SimpleSValBuilder::evalBinOpNN

2021-11-26 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D113753#3156270 , @bjope wrote: > This seem to cause some weird results. > > Given this input: > > bar(short k) { > k++; > for (short f = 0; f < k; f++) > ; > (long)k << 16; > } > > we get > > > clang

[PATCH] D114651: [clang-cl] Expose -Wall to clang-cl by unaliasing -Wall, keeping /Wall as alias to -Weverything

2021-11-26 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D114651#3156374 , @zero9178 wrote: > Is the deviation from MSVC behaviour here intentional? MSVC flags allow both > using a `/` as well as `-` as prefix. That means Both `-Wall` and `/Wall` are > accepted by MSVC as well as

[PATCH] D105869: [Driver] fix PowerPC SPE musl dynamic linker name

2021-11-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added a comment. This revision now requires changes to proceed. This needs a test like `clang/test/Driver/linux-ld.c` `CHECK-MUSL-PPC`. Use `ninja check-clang-driver` to test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D113795: Comment Sema: Eliminate or factor out DeclInfo inspection (NFC)

2021-11-26 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/AST/CommentSema.cpp:135-137 + if (const auto *VD = dyn_cast(ThisDeclInfo->CurrentDecl)) +if (VD->getType()->isFunctionPointerType()) + return; Something might be wrong here anyway: th

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-26 Thread Paul Altin via Phabricator via cfe-commits
paulaltin updated this revision to Diff 390126. paulaltin added a comment. Add a CHECK-MESSAGES-DISABLED test in an attempt to fix pre-merge checks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112881/new/ https://reviews.llvm.org/D112881 Files: clang-tools-extra/clang-tidy/cppcoreg

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-26 Thread Paul Altin via Phabricator via cfe-commits
paulaltin updated this revision to Diff 390127. paulaltin added a comment. Fixing bad diff formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112881/new/ https://reviews.llvm.org/D112881 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp clan

[PATCH] D105177: [clangd] Implemented indexing of standard library

2021-11-26 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. What is the status of this -- is it ready to be merged? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105177/new/ https://reviews.llvm.org/D105177 ___ cfe-commits mailing list cfe

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-26 Thread Paul Altin via Phabricator via cfe-commits
paulaltin updated this revision to Diff 390129. paulaltin added a comment. Fixing bad diff formatting. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112881/new/ https://reviews.llvm.org/D112881 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp clan

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-26 Thread Paul Altin via Phabricator via cfe-commits
paulaltin updated this revision to Diff 390131. paulaltin added a comment. Fixing syntax error. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112881/new/ https://reviews.llvm.org/D112881 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp clang-tools

[PATCH] D114660: [clang] Fix -Wreturn-type false positive in @try statements

2021-11-26 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. thakis requested review of this revision. After 04f30795f16638 , -Wreturn-type has an effect on functions that contain @try/@catch statements. CheckFallThrough() was

[PATCH] D112287: [clang] Implement CFG construction for @try and @catch

2021-11-26 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D112287#3146956 , @comanea wrote: > I believe there is an issue that this change introduced. It is described > here. https://bugs.llvm.org/show_bug.cgi?id=52473 > If anyone could provide some insight, it would be much appreciat

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-26 Thread Paul Altin via Phabricator via cfe-commits
paulaltin updated this revision to Diff 390136. paulaltin added a comment. Fixing column number. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112881/new/ https://reviews.llvm.org/D112881 Files: clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp clang-tool

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-26 Thread Paul Altin via Phabricator via cfe-commits
paulaltin added a comment. Thanks for your help @salman-javed-nz. > Build is failing because you don't have a CHECK-MESSAGES-DISABLED line > anywhere in the file. > You could change // DISABLED: to // CHECK-MESSAGES-DISABLED-NOT: and check > for the absence of the check warning. Instead of doi

[PATCH] D112881: [clang-tidy] Allow disabling integer to floating-point narrowing conversions for cppcoreguidelines-narrowing-conversions

2021-11-26 Thread Paul Altin via Phabricator via cfe-commits
paulaltin added a comment. In D112881#3155200 , @gchatelet wrote: > LGTM once tests are passing. Maybe wait a bit for a comment from > @aaron.ballman . Thanks @gchatelet. Happy to wait for @aaron.ballman to comment. CHANGES SINCE LAST ACTION https:/

[PATCH] D114621: [clangd] Show parameters for construct.

2021-11-26 Thread liu hui via Phabricator via cfe-commits
lh123 updated this revision to Diff 390143. lh123 added a comment. address comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114621/new/ https://reviews.llvm.org/D114621 Files: clang-tools-extra/clangd/Hover.cpp clang-tools-extra/clangd/u

[PATCH] D114621: [clangd] Show parameters for construct.

2021-11-26 Thread liu hui via Phabricator via cfe-commits
lh123 marked an inline comment as done. lh123 added inline comments. Comment at: clang-tools-extra/clangd/Hover.cpp:1065 + if (Parameters && !Parameters->empty()) { +Output.addParagraph().appendText("Parameters: "); kadircet wrote: > it's a subtle invarian

<    1   2