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

2021-03-21 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD added a comment. @NoQ, why does the following trigger a null-dereference warning? (https://godbolt.org/z/Kxox8qd16) void g(std::unique_ptr a) { A *aptr = a.get(); if (!aptr) {} a->foo(); } When `a->foo()` is called, the constraint `!aptr` is no longer valid and so

[clang] 874bdc8 - [Driver] Clean up Debian multiarch /usr/include/ madness

2021-03-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-21T22:40:38-07:00 New Revision: 874bdc8e61662b5f39a9626b9132e0979fae556f URL: https://github.com/llvm/llvm-project/commit/874bdc8e61662b5f39a9626b9132e0979fae556f DIFF: https://github.com/llvm/llvm-project/commit/874bdc8e61662b5f39a9626b9132e0979fae556f.diff

[PATCH] D98923: [Driver] Pass -fexperimental-strict-floating-point to cc1 if it is specified

2021-03-21 Thread Jim Lin via Phabricator via cfe-commits
Jim abandoned this revision. Jim added a comment. In D98923#2638061 , @craig.topper wrote: > Isn't OPT_fexperimental_strict_floating_point marked as a CC1Option in > Options.td. Can the driver even recognize it? > > Can you use -Xclang

[PATCH] D96110: [X86] Pass to transform tdpbf16ps intrinsics to scalar operation.

2021-03-21 Thread Bing Yu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG113f077f808f: [X86] Pass to transform tdpbf16ps intrinsics to scalar operation. (authored by yubing). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-03-21 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 332193. RedDocMD added a comment. Added some more tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 Files: clang/lib/StaticAnalyzer/Checkers/SmartPtrChecker.cpp

[PATCH] D96110: [X86] Pass to transform tdpbf16ps intrinsics to scalar operation.

2021-03-21 Thread Bing Yu via Phabricator via cfe-commits
yubing updated this revision to Diff 332190. yubing added a comment. Rebase after https://reviews.llvm.org/D98773 is merged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96110/new/ https://reviews.llvm.org/D96110 Files:

[PATCH] D66038: [Support] heavyweight_hardware_concurrency uses affinity when counting cores fails, and never returns 0

2021-03-21 Thread Lupe Serrano via Phabricator via cfe-commits
serranolupe091 accepted this revision. serranolupe091 added a comment. This revision is now accepted and ready to land. Herald added a subscriber: dexonsmith. hardware_concurrency Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66038/new/

[PATCH] D96316: [ASTMatcher] Add AST Matcher support for C++20 coroutine keywords

2021-03-21 Thread Chuanqi Xu 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 rG55486161fa0b: [ASTMatcher] Add AST Matcher support for C++20 coroutine keywords (authored by ChuanqiXu). Herald added a project: clang. Herald added

[clang] 5548616 - [ASTMatcher] Add AST Matcher support for C++20 coroutine keywords

2021-03-21 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2021-03-22T10:27:46+08:00 New Revision: 55486161fa0bc29519bf53f0e6302b14d8de5578 URL: https://github.com/llvm/llvm-project/commit/55486161fa0bc29519bf53f0e6302b14d8de5578 DIFF: https://github.com/llvm/llvm-project/commit/55486161fa0bc29519bf53f0e6302b14d8de5578.diff

[PATCH] D98902: [Clang][OpenMP][NVPTX] Fixed failure in openmp-offload-gpu.c if the system has CUDA

2021-03-21 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D98902#2636308 , @jdoerfert wrote: > @tra, so you think we should not do this? The user will see a link error late > I assume, might be better. I think @tra 's point is we should not do that for CUDA code. This change

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 332187. mizvekov added a comment. small cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/lib/Sema/Sema.cpp clang/lib/Sema/SemaCoroutine.cpp

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 332186. mizvekov added a comment. small cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/Sema.cpp

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 Thread Nikita Kniazev via Phabricator via cfe-commits
nick added inline comments. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3812-3821 AST_POLYMORPHIC_MATCHER_P_OVERLOAD( hasType, AST_POLYMORPHIC_SUPPORTED_TYPES(Expr, FriendDecl, TypedefNameDecl, -ValueDecl), +

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 332184. mizvekov added a comment. Changed: - Implemented co_return as per Aaron's suggestion. - Imported coroutine tests from D68845 . - Test tags shortened: cxxYY_cxxZZ means every version from YY to ZZ, instead of

[PATCH] D97699: [analyzer] Add InvalidPtrChecker

2021-03-21 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze added inline comments. Comment at: clang/docs/analyzer/checkers.rst:2103-2104 +puts(envp[i]); +// envp may no longer point to the current environment +// this program has unanticipated behavior. + } zukatsinadze wrote: >

[clang] 74933ef - [Driver] Detect Debian hack g++-multiarch-incdir.diff to simplify addLibStdCXXIncludePaths call sites

2021-03-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-21T17:33:31-07:00 New Revision: 74933efeb6ba78804602d62954618ab1836d7df8 URL: https://github.com/llvm/llvm-project/commit/74933efeb6ba78804602d62954618ab1836d7df8 DIFF: https://github.com/llvm/llvm-project/commit/74933efeb6ba78804602d62954618ab1836d7df8.diff

[PATCH] D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set

2021-03-21 Thread Ahmed Mahdy via Phabricator via cfe-commits
aybassiouny added a comment. > How about verifyFormat? Would that fail without your patch? @HazardyKnusperkeks sorry, but not sure that I understand your point. Are you suggesting to use verifyFormat in my UT instead of EXPECT_EQ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D97699: [analyzer] Add InvalidPtrChecker

2021-03-21 Thread Zurab Tsinadze via Phabricator via cfe-commits
zukatsinadze added inline comments. Comment at: clang/docs/analyzer/checkers.rst:2103-2104 +puts(envp[i]); +// envp may no longer point to the current environment +// this program has unanticipated behavior. + } Charusso wrote: > NoQ

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 Thread Nathan James via Phabricator via cfe-commits
njames93 requested changes to this revision. njames93 added inline comments. This revision now requires changes to proceed. Comment at: clang/include/clang/ASTMatchers/ASTMatchers.h:3812-3821 AST_POLYMORPHIC_MATCHER_P_OVERLOAD( hasType,

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In D99005#2640415 , @mizvekov wrote: > We should expect the test above to work, by binding value to the rvalue > reference in task's promise, right? Precisely, we don't want to do any initialization at all. (There will be

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2640121 , @aaronpuchert wrote: > With my previous comment I meant that it's better if you leave out the > `co_return` bits for now because it's wrong anyway. We can't use > `PerformMoveOrCopyInitialization`. It would

[clang] 6a4fbf1 - [test] Add test for cross compiling on Linux

2021-03-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-21T15:37:35-07:00 New Revision: 6a4fbf14ef1027be79703c0ca415eaedd4e1c7c7 URL: https://github.com/llvm/llvm-project/commit/6a4fbf14ef1027be79703c0ca415eaedd4e1c7c7 DIFF: https://github.com/llvm/llvm-project/commit/6a4fbf14ef1027be79703c0ca415eaedd4e1c7c7.diff

[clang] 72ac988 - [test] Delete obsoleted debian_multiarch_tree and ubuntu_13.04_multiarch_tree

2021-03-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-21T15:37:34-07:00 New Revision: 72ac988dc73a99f4b6647bdf3432134afdc3af43 URL: https://github.com/llvm/llvm-project/commit/72ac988dc73a99f4b6647bdf3432134afdc3af43 DIFF: https://github.com/llvm/llvm-project/commit/72ac988dc73a99f4b6647bdf3432134afdc3af43.diff

[PATCH] D97699: [analyzer] Add InvalidPtrChecker

2021-03-21 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. In D97699#2601804 , @NoQ wrote: > Why are you even tracking `reg_$0`? It's obvious from the structure of > the symbol that it's an environment pointer, there's no need to keep it in > maps. `envp` is confusable with `argv`:

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-03-21 Thread Florian Hahn via Phabricator via cfe-commits
fhahn requested changes to this revision. fhahn added reviewers: rjmccall, rsmith, erichkeane. fhahn added a comment. This revision now requires changes to proceed. Thanks for the patch! I think this also needs changes in code-gen & code-gen tests. Comment at:

[PATCH] D97107: Replace func name with regex for update test scripts

2021-03-21 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. Looks like this has broken update_analyze_test_checks.py. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97107/new/ https://reviews.llvm.org/D97107 ___ cfe-commits mailing list

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov added a comment. In D99005#2639977 , @Quuxplusone wrote: > Conspicuously missing: tests for `decltype(auto)` return types, tests for > `co_return`. Though the first comment warns you that this is a work in progress and I just didn't get around

[clang] be87321 - [clang][Codegen] EmitBranchOnBoolExpr(): emit prof branch counts even at -O0

2021-03-21 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2021-03-21T23:24:27+03:00 New Revision: be8732128029530a0b8671af3a47ce6085039fa2 URL: https://github.com/llvm/llvm-project/commit/be8732128029530a0b8671af3a47ce6085039fa2 DIFF: https://github.com/llvm/llvm-project/commit/be8732128029530a0b8671af3a47ce6085039fa2.diff

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 Thread Nikita Kniazev via Phabricator via cfe-commits
nick added a comment. Could you please commit the patch for me? I do not have commit rights. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] e3a4701 - [clang][CodeGen] Lower Likelihood attributes to @llvm.expect intrin instead of branch weights

2021-03-21 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2021-03-21T22:50:21+03:00 New Revision: e3a470162738871bba982416748ae5f5e3572947 URL: https://github.com/llvm/llvm-project/commit/e3a470162738871bba982416748ae5f5e3572947 DIFF: https://github.com/llvm/llvm-project/commit/e3a470162738871bba982416748ae5f5e3572947.diff

[clang] 37d6be9 - Revert "[BranchProbability] move options for 'likely' and 'unlikely'"

2021-03-21 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2021-03-21T22:50:21+03:00 New Revision: 37d6be90524ca1659521ab879aaae5e5501f1e97 URL: https://github.com/llvm/llvm-project/commit/37d6be90524ca1659521ab879aaae5e5501f1e97 DIFF: https://github.com/llvm/llvm-project/commit/37d6be90524ca1659521ab879aaae5e5501f1e97.diff

[clang] bcaca36 - [Driver] Gnu.cpp: fix libstdc++ search path for multilib

2021-03-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-21T12:01:44-07:00 New Revision: bcaca360f8b64d267c787a5f3088e73420e78f53 URL: https://github.com/llvm/llvm-project/commit/bcaca360f8b64d267c787a5f3088e73420e78f53 DIFF: https://github.com/llvm/llvm-project/commit/bcaca360f8b64d267c787a5f3088e73420e78f53.diff

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-21 Thread Xun Li via Phabricator via cfe-commits
lxfind added a comment. @bruno Thanks for the review! Comment at: clang/lib/CodeGen/CGCoroutine.cpp:221 CGF.EmitBlock(RealSuspendBlock); + } else if (ForcestackStart) { +Builder.CreateCall( bruno wrote: > ChuanqiXu wrote: > > lxfind wrote: > > >

[PATCH] D55212: Handle alloc_size attribute on function pointers

2021-03-21 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. Herald added a subscriber: jdoerfert. I completely forgot about this patch. @aaron.ballman are you still happy for me to commit this? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212

[PATCH] D99037: [Matrix] Implement explicit type conversions for matrix types

2021-03-21 Thread Saurabh Jha via Phabricator via cfe-commits
SaurabhJha created this revision. SaurabhJha added a reviewer: fhahn. Herald added a subscriber: tschuett. SaurabhJha requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. [Matrix] Implement explicit type conversions for MatrixType. Bugzilla

[PATCH] D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set

2021-03-21 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. Looks good. How about `verifyFormat`? Would that fail without your patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99031/new/ https://reviews.llvm.org/D99031

[PATCH] D99031: [clang-format] Fix CompactNamespaces corner case when AllowShortLambdasOnASingleLine/BraceWrapping.BeforeLambdaBody are set

2021-03-21 Thread Francois JEAN via Phabricator via cfe-commits
Wawha accepted this revision. Wawha added a comment. This revision is now accepted and ready to land. Thank you for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99031/new/ https://reviews.llvm.org/D99031

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

2021-03-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 332160. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98775/new/ https://reviews.llvm.org/D98775 Files: clang/include/clang/Tooling/NodeIntrospection.h

[PATCH] D98146: OpaquePtr: Turn inalloca into a type attribute

2021-03-21 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/IR/Attributes.cpp:490 if (Type *Ty = getValueAsType()) { - raw_string_ostream OS(Result); + // FIXME: This should never be null Result += '('; dblaikie wrote: > arsenm wrote: > > dblaikie

[PATCH] D98814: [CUDA][HIP] Mark device var used by host only

2021-03-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 332157. yaxunl marked an inline comment as done. yaxunl added a comment. revised by Artem's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98814/new/ https://reviews.llvm.org/D98814 Files: clang/lib/CodeGen/CGCUDANV.cpp

[PATCH] D98814: [CUDA][HIP] Mark device var used by host only

2021-03-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:1102 + Info.D->isUsed() && !Info.D->hasAttr()) { +CGM.addCompilerUsedGlobal(Info.Var); + } tra wrote: > Do we want to limit it

[PATCH] D99005: [clang] WIP: Implement P2266

2021-03-21 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. With my previous comment I meant that it's better if you leave out the `co_return` bits for now because it's wrong anyway. We can't use `PerformMoveOrCopyInitialization`. It would just generate merge conflicts. I'll probably just update my change once the

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 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, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 ___ cfe-commits

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 Thread Nikita Kniazev via Phabricator via cfe-commits
nick updated this revision to Diff 332151. nick added a comment. Lint fixes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69218/new/ https://reviews.llvm.org/D69218 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatchers/ASTMatchers.h

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:329 + EXPECT_TRUE(matches("class X {}; class Y : X {};", ClassHasBaseClassX)); + EXPECT_TRUE(notMatches("class Z {}; class Y : Z {};", ClassHasBaseClassX)); +}

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 Thread Nikita Kniazev via Phabricator via cfe-commits
nick added inline comments. Comment at: clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp:329 + EXPECT_TRUE(matches("class X {}; class Y : X {};", ClassHasBaseClassX)); + EXPECT_TRUE(notMatches("class Z {}; class Y : Z {};", ClassHasBaseClassX)); +}

[PATCH] D69218: [ASTMatchers] Add `cxxBaseSpecifier` matcher (non-top-level)

2021-03-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/ASTMatchers/Dynamic/Registry.cpp:182 REGISTER_MATCHER(cxxConversionDecl); + REGISTER_MATCHER(cxxBaseSpecifier); REGISTER_MATCHER(cxxCtorInitializer); Please keep this list sorted alphabetically.

[PATCH] D99018: [clang][flang] Moke the definition of `-module-dir` restricted to Flang

2021-03-21 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a subscriber: protze.joachim. awarzynski added a comment. Thank you for reviewing! In D99018#2639680 , @MaskRay wrote: > Thanks. I do not know why `FlangOption and FC1 Options` needs be in > `clang/include/clang/Driver/Options.td` but

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

2021-03-21 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 332148. RedDocMD marked an inline comment as done. RedDocMD added a comment. Re-formatted file Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 Files:

[clang] 2288a75 - [Driver] Linux.cpp: add -internal-isystem lib/../$triple/include

2021-03-21 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-03-21T00:56:03-07:00 New Revision: 2288a75d9eceeabdffcd72789d97386ee10962fb URL: https://github.com/llvm/llvm-project/commit/2288a75d9eceeabdffcd72789d97386ee10962fb DIFF: https://github.com/llvm/llvm-project/commit/2288a75d9eceeabdffcd72789d97386ee10962fb.diff

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

2021-03-21 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD marked an inline comment as done. RedDocMD added inline comments. Comment at: clang/test/Analysis/smart-ptr-text-output.cpp:317 void getShouldNotAlwaysLeaveANote() { std::unique_ptr P; // expected-note {{Default constructed smart pointer 'P' is null}}

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

2021-03-21 Thread Deep Majumder via Phabricator via cfe-commits
RedDocMD updated this revision to Diff 332147. RedDocMD added a comment. Fixed up the git history Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97183/new/ https://reviews.llvm.org/D97183 Files: