[PATCH] D75529: [analyzer] Limit UCharMax to min of max uchar or max int

2020-03-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Aha, ok, i appreciate making life easier for downstream users. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:519 + // architectures, but not for others. + const RangeInt UCharMax = + std::min(BVF.getMaxValue(ACtx.Unsig

[PATCH] D75723: [X86] Enable intrinsics _BitScan*

2020-03-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan updated this revision to Diff 249282. skan added a comment. Enable _BitScan* as intrinsics rather than builtin on linux Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75723/new/ https://reviews.llvm.org/D75723 Files: clang/lib/Headers/ia32in

[PATCH] D75894: [X86] Support intrinsics _bextr2*

2020-03-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan created this revision. skan added reviewers: LuoYuanke, craig.topper, RKSimon, pengfei. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75894 Files: clang/lib/Headers/bmiintrin.h clang/test/CodeGen/bm

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D75698#1909541 , @martong wrote: > > While invalidation is a fundamental part of static analysis, it is > > unfortunately not an under-approximation (resulting in fewer but more > > precise paths of execution) > > +1 for saying th

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/test/Analysis/suppress-invalidation-related-reports.cpp:18 + if (flag) // Assume flag is true. +*x = 5; // non-suppressed-warning{{Dereference of null pointer}} +} In particular, i believe this is a true positive.

[clang] 5aa5c94 - Reland "[DebugInfo] Enable the debug entry values feature by default"

2020-03-10 Thread Djordje Todorovic via cfe-commits
Author: Djordje Todorovic Date: 2020-03-10T09:15:06+01:00 New Revision: 5aa5c943f7da155b95564058cd5d50a93eabfc89 URL: https://github.com/llvm/llvm-project/commit/5aa5c943f7da155b95564058cd5d50a93eabfc89 DIFF: https://github.com/llvm/llvm-project/commit/5aa5c943f7da155b95564058cd5d50a93eabfc89.d

[PATCH] D75896: [X86] Support intrinsic _mm_cldemote

2020-03-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan created this revision. skan added reviewers: LuoYuanke, craig.topper, RKSimon, pengfei. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75896 Files: clang/lib/Headers/cldemoteintrin.h clang/test/CodeG

[PATCH] D75897: [X86] Support intrinsic _mm_broadcastsi128_si256

2020-03-10 Thread Kan Shengchen via Phabricator via cfe-commits
skan created this revision. skan added reviewers: LuoYuanke, craig.topper, RKSimon, pengfei. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75897 Files: clang/lib/Headers/avx2intrin.h clang/test/CodeGen/a

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-03-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8132 + return VisitTypeSpecTypeLoc(FTS); +llvm_unreachable("Unimplemented TypeLoc visitor function"); + } This assert is new related to the old code. Are really all TypeLoc's are

[clang] 5a101f3 - Revert "[clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers"

2020-03-10 Thread Jonathan Coe via cfe-commits
Author: Jonathan Coe Date: 2020-03-10T09:30:34Z New Revision: 5a101f377315c0c0c58e8df842fe5eb5d8c7611d URL: https://github.com/llvm/llvm-project/commit/5a101f377315c0c0c58e8df842fe5eb5d8c7611d DIFF: https://github.com/llvm/llvm-project/commit/5a101f377315c0c0c58e8df842fe5eb5d8c7611d.diff LOG:

[clang] 0c28a09 - [clang-format] Correct indentation for `[key] = value,` entries in C# object initialisers

2020-03-10 Thread Jonathan Coe via cfe-commits
Author: Jonathan Coe Date: 2020-03-10T09:36:52Z New Revision: 0c28a0938c55ad34587fe88ac54ff2c85e79fa70 URL: https://github.com/llvm/llvm-project/commit/0c28a0938c55ad34587fe88ac54ff2c85e79fa70 DIFF: https://github.com/llvm/llvm-project/commit/0c28a0938c55ad34587fe88ac54ff2c85e79fa70.diff LOG:

[PATCH] D75898: [Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport

2020-03-10 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, Szelethus. baloghadamsoftware added a project: clang. Herald added subscribers: martong, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity. Lambd

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-10 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Test falls in Windows: http://45.33.8.238/win/10088/step_8.txt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669 ___ cfe-commits mailing l

[PATCH] D75898: [Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport

2020-03-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Thanks!! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75898/new/ https://reviews.llvm.org/D75898 ___ c

[clang] 20a3d64 - [Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport

2020-03-10 Thread Adam Balogh via cfe-commits
Author: Adam Balogh Date: 2020-03-10T11:30:28+01:00 New Revision: 20a3d64c8883c8be550f0759525b1550b7c2d35f URL: https://github.com/llvm/llvm-project/commit/20a3d64c8883c8be550f0759525b1550b7c2d35f DIFF: https://github.com/llvm/llvm-project/commit/20a3d64c8883c8be550f0759525b1550b7c2d35f.diff L

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-03-10 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:8132 + return VisitTypeSpecTypeLoc(FTS); +llvm_unreachable("Unimplemented TypeLoc visitor function"); + } balazske wrote: > This assert is

[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

2020-03-10 Thread Alex Cameron via Phabricator via cfe-commits
tetsuo-cpp created this revision. tetsuo-cpp added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. tetsuo-cpp added reviewers: njames93, MaskRay. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=27702 I wasn't sure how this type of thin

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-10 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > P.S. So, like, we could try to emit the warning only if we covered enough > execution paths to prove that there's either dead code or the warning is > true. Then we would no longer care about invalidation problems. > Unfortunately, i don't have any specific suggestion

[PATCH] D75898: [Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport

2020-03-10 Thread Balogh, Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG20a3d64c8883: [Analyzer][NFC] Change parameter of NoteTag lambdas to PathSensitiveBugReport (authored by baloghadamsoftware). Changed prior to commit: https://reviews.llvm.org/D75898?vs=249289&id=249302

[PATCH] D75903: [AArch64][CodeGen] Fixing stack alignment of HFA arguments on AArch64 PCS

2020-03-10 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas created this revision. Herald added subscribers: llvm-commits, cfe-commits, danielkiss, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. pratlucas added a child revision: D75904: [ARM][CodeGen] Fixing stack alignment of HFA arguments on AArch32 PCS. pratlucas added reviewer

[PATCH] D75904: [ARM][CodeGen] Fixing stack alignment of HFA arguments on AArch32 PCS

2020-03-10 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas created this revision. Herald added subscribers: llvm-commits, cfe-commits, danielkiss, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. pratlucas added a parent revision: D75903: [AArch64][CodeGen] Fixing stack alignment of HFA arguments on AArch64 PCS. pratlucas added rev

[PATCH] D75529: [analyzer] Limit UCharMax to min of max uchar or max int

2020-03-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. I have nothing else to add :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75529/new/ https://reviews.llvm.org/D75529 ___ cfe-commits maili

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249307. njames93 added a comment. Herald added subscribers: arphaman, kbarton, nemanjai. - Add usages, removed optional on arrayrefs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75714/new/ https://reviews.llv

[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2020-03-10 Thread Sam Elliott via Phabricator via cfe-commits
lenary added a comment. Two nits, then I'd be happy for this to land. It would be useful if @jrtc27 would also re-review, as he has blocking comments (which I believe are now addressed). Comment at: clang/docs/ClangCommandLineReference.rst:2958 + +Put global and static data s

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 249312. sdesmalen added a comment. s/NeonIntrinsicInfo/ARMVectorIntrinsicInfo/ s/findNeonIntrinsicInMap/findARMVectorIntrinsicInMap/ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75470/new/ https://reviews.llvm.org/D75470 Files: clang/include/c

[PATCH] D75842: [Analyzer] Bugfix for CheckerRegistry

2020-03-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp:85 +//===--===// +// Unfulfilled dependency +//===---

[PATCH] D75858: [AArch64][SVE] Add SVE intrinsics for address calculations

2020-03-10 Thread Kerry McLaughlin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0bba37a32024: [AArch64][SVE] Add SVE intrinsics for address calculations (authored by kmclaughlin). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75858/new/

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:5292 + { #NameBase, SVE::BI__builtin_sve_##NameBase, 0, 0, TypeModifier } +static const NeonIntrinsicInfo AArch64SVEIntrinsicMap[] = { +#define GET_SVE_LLVM_I

[PATCH] D75171: [Analyzer] Fix for incorrect use of container and iterator checkers

2020-03-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Yay, this is very nice! Comment at: clang/test/Analysis/container-modeling-no-aggressive-binary-operation-simplification-warn.cpp:1-10 +// RUN: %clang_analyze_cc1 -std=c++11\ +// RUN: -analyzer-checker=core,cplusplus,alpha.cplusplus.ContainerModeling

[PATCH] D75740: [ASTImporter] Corrected import of repeated friend declarations.

2020-03-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 249317. balazske marked an inline comment as done. balazske added a comment. Removed code repetition. Using `const char *` instead of `auto`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75740/new/ https://re

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of the affected container

2020-03-10 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 249319. baloghadamsoftware marked an inline comment as done. baloghadamsoftware added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75514/new/ https://reviews.llvm.org/D75514 Files: clang/lib/StaticAnalyzer/Checkers

[PATCH] D75901: [clang-tidy] misc-unconventional-assign-operator suggest to use rvalue references in C++03 mode

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Please add a test case for this Comment at: clang-tools-extra/clang-tidy/misc/UnconventionalAssignOperatorCheck.cpp:76-77 } else { +const ASTContext *ASTCtx = Result.Context; +const LangOptions &Opts = ASTCtx->getLangOpts(); static con

[PATCH] D75842: [Analyzer] Bugfix for CheckerRegistry

2020-03-10 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp:143 + std::string Diags; + EXPECT_TRUE(runCheckerOnCode("void f() {;}", Diags)); +} Szelethu

[PATCH] D75740: [ASTImporter] Corrected import of repeated friend declarations.

2020-03-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 3 inline comments as done. balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:3638 + /// Number of similar looking friends. + unsigned int TotalCount; + /// Index of the specific FriendDecl. shafik wrote: > `uint32_t` >

[PATCH] D75677: [Analyzer] Only add iterator note tags to the operations of the affected iterators

2020-03-10 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 249320. baloghadamsoftware added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75677/new/ https://reviews.llvm.org/D75677 Files: clang/lib/StaticAnalyzer/Checkers/DebugIteratorModeling.cpp clang/lib/StaticAnalyzer

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2956 + + mangleArtificialTagType(TTK_Struct, TemplateMangling, {"__clang"}); } We don't seem to add namespace for other OpenCL types, although I am not against it as I find it actua

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Simon Moll via Phabricator via cfe-commits
simoll added a comment. Herald added a reviewer: aartbik. ping. Is this good to go? (merge bot failures are due to the `m_UnOp` syntax, which goes against the coding standard). Repository: rG LLVM Github Mon

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: aaron.ballman, gribozavr2, alexfh, Eugene.Zelenko. Herald added subscribers: cfe-commits, kbarton, xazax.hun, mgorny, nemanjai. Herald added a project: clang. Adds a utils matcher called `hasAnyListedName` to alleviate all the hackery usin

[PATCH] D71314: Warn of uninitialized variables on asm goto's indirect branch

2020-03-10 Thread Bill Wendling via Phabricator via cfe-commits
void added a comment. Friendly ping. :-) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71314/new/ https://reviews.llvm.org/D71314 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[PATCH] D75850: [ARM, CDE] Generalize MVE intrinsics infrastructure to support CDE

2020-03-10 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham accepted this revision. simon_tatham added a comment. This revision is now accepted and ready to land. LGTM with a couple of tiny spelling nitpicks. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:642 def err_arm_invalid_specialreg : Error<"invalid sp

[clang-tools-extra] 1fc5be0 - [NFC] Tweak OptionsUtils

2020-03-10 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2020-03-10T12:50:58Z New Revision: 1fc5be06694fe3cbe9d2b60179c93a74d7083764 URL: https://github.com/llvm/llvm-project/commit/1fc5be06694fe3cbe9d2b60179c93a74d7083764 DIFF: https://github.com/llvm/llvm-project/commit/1fc5be06694fe3cbe9d2b60179c93a74d7083764.diff LOG:

[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2020-03-10 Thread Shiva Chen via Phabricator via cfe-commits
shiva0217 updated this revision to Diff 249336. shiva0217 added a comment. Update patch to address @lenary's comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57497/new/ https://reviews.llvm.org/D57497 Files: clang/docs/ClangCommandLineRef

[PATCH] D74766: [ARM] Fixing range checks for Neon's vqdmulhq_lane and vqrdmulhq_lane intrinsics

2020-03-10 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas updated this revision to Diff 249346. pratlucas added a comment. Adding check for valid range on tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74766/new/ https://reviews.llvm.org/D74766 Files: clang/include/clang/Basic/arm_neon.

[PATCH] D74973: [analyzer] StdLibraryFunctionsChecker refactor w/ inheritance

2020-03-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Ah, okay I think I got why you chose this direction. Summaries are little more then a collection of constraints, and at select points in the execution we check and apply them one-by-one. If we want to preserve this architecture (and it seems great, why not?), inherita

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-10 Thread Saiyedul Islam via Phabricator via cfe-commits
saiislam created this revision. saiislam added reviewers: JonChesterfield, sameerds, yaxunl, gregrodgers, b-sumner. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. "__buitlin_memory_fence(, )" in clang gets mapped to "fence [syncscope("")] ; yields void" in IR. Reposi

[PATCH] D71018: [ASTImporter] Improved import of TypeSourceInfo (TypeLoc)

2020-03-10 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 249350. martong marked an inline comment as done. martong added a comment. - Handle AttributedTypeLoc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71018/new/ https://reviews.llvm.org/D71018 Files: clang/lib

[PATCH] D75698: [analyzer][WIP] Suppress bug reports where a tracked expression's latest value change was a result of an invalidation

2020-03-10 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D75698#1914102 , @martong wrote: > > P.S. So, like, we could try to emit the warning only if we covered enough > > execution paths to prove that there's either dead code or the warning is > > true. Then we would no longer care abo

[PATCH] D75570: [AST][SVE] Add new Type queries for sizeless types

2020-03-10 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Herald added a subscriber: danielkiss. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75570/new/ https://reviews.llvm.org/D75570 ___ cfe-commits mailing list cfe-commi

[PATCH] D75470: [SVE] Auto-generate builtins and header for svld1.

2020-03-10 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer accepted this revision. SjoerdMeijer added a comment. This revision is now accepted and ready to land. Cheers, I think this looks very reasonable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75470/new/ https://reviews.llvm.org/D75470 ___

[PATCH] D75171: [Analyzer] Fix for incorrect use of container and iterator checkers

2020-03-10 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 249352. baloghadamsoftware added a comment. Tests reduced. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75171/new/ https://reviews.llvm.org/D75171 Files: clang/include/clang/Basic/DiagnosticDriverKinds.td clang/lib/StaticAnalyzer/Ch

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Basic/Diagnostic.h:1298 + return DB; +}; + s/;// (and in functions below as well) Repository: rG LLVM Github

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249356. njames93 added a comment. - Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75911/new/ https://reviews.llvm.org/D75911 Files: clang-tools-extra/clang-tidy/abseil/StringFindStartswithChe

[PATCH] D75714: Add Optional overload to DiagnosticBuilder operator <

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 249361. njames93 marked 2 inline comments as done. njames93 added a comment. - remove unnecessary semi colons Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75714/new/ https://reviews.llvm.org/D75714 Files:

[PATCH] D75903: [AArch64][CodeGen] Fixing stack alignment of HFA arguments on AArch64 PCS

2020-03-10 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas updated this revision to Diff 249360. pratlucas added a comment. Clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75903/new/ https://reviews.llvm.org/D75903 Files: clang/include/clang/CodeGen/CGFunctionInfo.h clang/lib/Cod

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.cpp:17 + +Matcher hasAnyListedName(std::vector Names) { + return Matcher(new HasNameMatcher(std::move(Names))); This matcher sounds generally useful. I think it would be be

[PATCH] D75850: [ARM, CDE] Generalize MVE intrinsics infrastructure to support CDE

2020-03-10 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki updated this revision to Diff 249362. miyuki added a comment. Address review comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75850/new/ https://reviews.llvm.org/D75850 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/AttrDocs.td clang/include/clang

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-03-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Can we see more test cases for when after a call to `feof` we indeed can tell the stream is in an `EOF` state? Same for `ferror`. I feel like there is a lot of code we don't yet cover. Also, I see now that I didn't get in earlier revisions that `OtherError` actually

[clang] 47edf5b - [ARM, CDE] Generalize MVE intrinsics infrastructure to support CDE

2020-03-10 Thread Mikhail Maltsev via cfe-commits
Author: Mikhail Maltsev Date: 2020-03-10T14:03:16Z New Revision: 47edf5bafb8ede52dca836eac770efffbf657d30 URL: https://github.com/llvm/llvm-project/commit/47edf5bafb8ede52dca836eac770efffbf657d30 DIFF: https://github.com/llvm/llvm-project/commit/47edf5bafb8ede52dca836eac770efffbf657d30.diff LO

[clang-tools-extra] 714466b - Revert "[clang-tidy] New check: bugprone-suspicious-include"

2020-03-10 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2020-03-10T10:28:20-04:00 New Revision: 714466bf367dfd5062e1850179d27c37a9ec6b46 URL: https://github.com/llvm/llvm-project/commit/714466bf367dfd5062e1850179d27c37a9ec6b46 DIFF: https://github.com/llvm/llvm-project/commit/714466bf367dfd5062e1850179d27c37a9ec6b46.diff LO

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.cpp:17 + +Matcher hasAnyListedName(std::vector Names) { + return Matcher(new HasNameMatcher(std::move(Names))); gribozavr2 wrote: > This matcher sounds generally useful. I th

[PATCH] D75922: [ASTImporter] Compare the DC of the underlying type of a FriendDecl

2020-03-10 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: a_sidorin, shafik. Herald added subscribers: cfe-commits, teemperor, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. Currently, we do not check the scope of friend classes. This can

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-10 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3713 + switch (ord) { + case 0: // memory_order_relaxed + default: // invalid order Interesting, fence can't be relaxed > ‘fence’ instructions take an ordering arg

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-10 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1516 +// Builtin to expose llvm fence instruction +BUILTIN(__builtin_memory_fence, "vUiUi", "t") `BUILTIN(__builtin_memory_fence, "vii", "n")`? The other fence intrinsics

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. Sorry, forgot to submit my nit... Comment at: llvm/include/llvm/IR/PatternMatch.h:75 +/// Match an arbitrary binary operation and ignore it. +inline class_match m_UnOp() { + return class_match(); Nit: Comment needs updating.

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 3 inline comments as done. erichkeane added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2956 + + mangleArtificialTagType(TTK_Struct, TemplateMangling, {"__clang"}); } Anastasia wrote: > We don't seem to add namespace for oth

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-10 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 249367. erichkeane added a comment. Thanks @Anastasia for the review! Comments inline. Moved the test as requested, and added OpenCL tests for both OSes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75685/new/ https://reviews.llvm.org/D75685

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally accepted this revision. cameron.mcinally added a comment. This revision is now accepted and ready to land. LGTM. Thanks, Simon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75467/new/ https://reviews.llvm.org/D75467 ___

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: llvm/include/llvm/IR/PatternMatch.h:622 inline bind_ty m_Instruction(Instruction *&I) { return I; } /// Match a binary operator, capturing it if we match. +inline bind_ty m_UnOp(UnaryOperator *&I) { return I; } Match a

[PATCH] D75850: [ARM, CDE] Generalize MVE intrinsics infrastructure to support CDE

2020-03-10 Thread Mikhail Maltsev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG47edf5bafb8e: [ARM,CDE] Generalize MVE intrinsics infrastructure to support CDE (authored by miyuki). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75850/new

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-10 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Reverted for now in 714466bf367dfd5062e1850179d27c37a9ec6b46 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74669/new/ https://reviews.llvm.org/D74669

[PATCH] D75861: [SVE] Generate overloaded functions for ACLE intrinsics.

2020-03-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 249370. sdesmalen edited the summary of this revision. sdesmalen added a comment. - Rebased patch on top of D75850 . - Removed `__clang_arm_sve_alias` in favour of `__clang_arm_builtin_alias` CHANGES SINCE LAST ACTION htt

[PATCH] D74669: [clang-tidy] New check: bugprone-suspicious-include

2020-03-10 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs updated this revision to Diff 249377. jroelofs added a comment. Don't fire on `#import`s. The error on Windows suggests it would normally do the "right" thing anyway: http://45.33.8.238/win/10088/step_8.txt C:\src\llvm-project\out\gn\obj\clang-tools-extra\test\clang-tidy\checkers\Ou

[PATCH] D75851: [Analyzer][StreamChecker] Added evaluation of fseek.

2020-03-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus requested changes to this revision. Szelethus added a comment. This revision now requires changes to proceed. We should totally dedicate an error kind of `fseek`, see (and please respond, if you could to) D75356#inline-689287 .

[PATCH] D74973: [analyzer] StdLibraryFunctionsChecker refactor w/ inheritance

2020-03-10 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 2 inline comments as done. martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp:151 + + using ValueConstraintPtr = std::shared_ptr; + /// The complete list of constraints that defines a single branch. ---

[PATCH] D75861: [SVE] Generate overloaded functions for ACLE intrinsics.

2020-03-10 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:5002 if (!ArmMveAliasValid(BuiltinID, AliasName) && + !ArmCdeAliasValid(BuiltinID, AliasName) && I would suggest splitting the check into Arm-specific and AArch64-specific checks

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 249378. serge-sans-paille added a comment. Cleaned up code, using a few macros to avoid duplication. No longer a WIP Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75579/new/ https://reviews.llvm.org/

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 249380. DmitryPolukhin added a comment. Handle global options Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files: clang-tools-extra/clang-tidy/ClangTidyOpti

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. In D75184#1912650 , @njames93 wrote: > How are local and global options handled. > From what I can gather it will read the value as `1` as the local option is > checked first no matter which file it was defined in. You

[PATCH] D75579: [WIP] Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by libraries

2020-03-10 Thread serge via Phabricator via cfe-commits
serge-sans-paille added a comment. @MaskRay > because that will cause duplicate registration of llvm::cl::opt flags. Not with this setup, if I'm not mistaken: the static registration is triggered by the static variables inside the constructor call, and if I'm not mistaken, initialization of

[PATCH] D75903: [AArch64][CodeGen] Fixing stack alignment of HFA arguments on AArch64 PCS

2020-03-10 Thread Oliver Stannard (Linaro) via Phabricator via cfe-commits
ostannard added a comment. I've not looked at the code in detail yet, but I think this still gets the ABI wrong for this example: typedef struct { __attribute__ ((__aligned__(32))) double v[4]; } TYPE1; double func(double d0, double d1, double d2, double d3, double d4,

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-03-10 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. In D75184#1914705 , @DmitryPolukhin wrote: > You are absolutely right about current behaviour. Thank you for catching this > odd behaviour. I'm not 100% confident what is the right behaviour but my > guess is that overriding lo

[PATCH] D75911: [clang-tidy] Added hasAnyListedName matcher

2020-03-10 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/Matchers.cpp:17 + +Matcher hasAnyListedName(std::vector Names) { + return Matcher(new HasNameMatcher(std::move(Names))); njames93 wrote: > gribozavr2 wrote: > > This matcher sounds

[PATCH] D74766: [ARM] Fixing range checks for Neon's vqdmulhq_lane and vqrdmulhq_lane intrinsics

2020-03-10 Thread Lucas Prates via Phabricator via cfe-commits
pratlucas updated this revision to Diff 249392. pratlucas added a comment. Clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74766/new/ https://reviews.llvm.org/D74766 Files: clang/include/clang/Basic/arm_neon.td clang/lib/CodeGen/CG

[PATCH] D75682: [Analyzer][StreamChecker] Introduction of stream error handling.

2020-03-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 6 inline comments as done. balazske added a comment. The problem here with tests is that there is no function to call that sets the error flags `FEof` or `FError`. So it is only possible to check if these are not set after opening the file. Comment at: clang/l

[PATCH] D74618: [ARM] Creating 'call_mangled' for Neon intrinsics definitions

2020-03-10 Thread Diogo N. Sampaio via Phabricator via cfe-commits
dnsampaio accepted this revision. dnsampaio added a comment. This revision is now accepted and ready to land. LGTM, after a nit inline. Comment at: clang/include/clang/Basic/arm_neon_incl.td:66 +//that has the variation and takes the given types, an error +//

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Simon Moll via Phabricator via cfe-commits
simoll updated this revision to Diff 249396. simoll marked 5 inline comments as done. simoll added a comment. - NFC - Fixed code comments - Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75467/new/ https://reviews.llvm.org/D75467 Files: c

[clang] d871ef4 - [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Simon Moll via cfe-commits
Author: Simon Moll Date: 2020-03-10T16:57:02+01:00 New Revision: d871ef4e6ade3797c73cbc54d9214513ee6c7468 URL: https://github.com/llvm/llvm-project/commit/d871ef4e6ade3797c73cbc54d9214513ee6c7468 DIFF: https://github.com/llvm/llvm-project/commit/d871ef4e6ade3797c73cbc54d9214513ee6c7468.diff LO

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-10 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a subscriber: jdoerfert. JonChesterfield added a comment. @jdoerfert this is one of the two intrinsics needed to drop the .ll source from the amdgcn deviceRTL. The other is atomic_inc. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75917/new/

[PATCH] D75851: [Analyzer][StreamChecker] Added evaluation of fseek.

2020-03-10 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added a comment. I do not like to make difference between error from `fseek` and error from any other function that may fail. `AnyError` can be used to handle every case. After a failed file operation we do not know if it was `feof` or `ferror`

[PATCH] D75861: [SVE] Generate overloaded functions for ACLE intrinsics.

2020-03-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 249404. sdesmalen added a comment. - Refactored condition to check for valid builtins (split up checks for Arm and AArch64) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75861/new/ https://reviews.llvm.org/D75861 Files: clang/include/clang/Bas

[PATCH] D75927: [clangd] Use a separate RunningTask flag instead of leaving a broken request on top of the queue

2020-03-10 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, javed.absar, ilya-biryukov. Herald added a project: clang. sammccall added inline comments. Comment at: clang-tools-extra/clangd/TU

[PATCH] D75927: [clangd] Use a separate RunningTask flag instead of leaving a broken request on top of the queue

2020-03-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:279 std::deque Requests; /* GUARDED_BY(Mutex) */ + bool RunningTask = false; /* GUARDED_BY(Mutex) */ mutable std::condition_variable RequestsCV; I'd consider making t

[PATCH] D75842: [Analyzer] Bugfix for CheckerRegistry

2020-03-10 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/unittests/StaticAnalyzer/RegisterCustomCheckersTest.cpp:143 + std::string Diags; + EXPECT_TRUE(runCheckerOnCode("void f() {;}", Diags)); +} baloghadamsoftware wrote: > Szelethus wrote: > > I don't think this is

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Sanjay Patel via Phabricator via cfe-commits
spatel accepted this revision. spatel added a comment. LGTM - see inline for 1 more comment nit. Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:2132 // Subtraction from -0.0 is the canonical form of fneg. + // fsub -0.0, X ==> fneg X Th

[PATCH] D75467: [instcombine] remove fsub to fneg hacks; only emit fneg

2020-03-10 Thread Simon Moll via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd871ef4e6ade: [instcombine] remove fsub to fneg hacks; only emit fneg (authored by simoll). Changed prior to commit: https://reviews.llvm.org/D75467?vs=249396&id=249409#toc Repository: rG LLVM Github

[clang] 71ffac2 - [OPENMP]Fix PR45132: OpenMP doacross loop nest with a decreasing

2020-03-10 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-03-10T12:13:58-04:00 New Revision: 71ffac21f7463465c369ba12dc496f9f5338e6b4 URL: https://github.com/llvm/llvm-project/commit/71ffac21f7463465c369ba12dc496f9f5338e6b4 DIFF: https://github.com/llvm/llvm-project/commit/71ffac21f7463465c369ba12dc496f9f5338e6b4.diff

[PATCH] D75917: Expose llvm fence instruction as clang intrinsic

2020-03-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:1880 +// Check if Order is an unsigned +if (!Ty->isIntegerType()) { + Diag(ArgExpr->getExprLoc(), diag::err_typecheck_expect_uint) << Ty; JonChesterfield wrote: > isIntegerT

[PATCH] D75861: [SVE] Generate overloaded functions for ACLE intrinsics.

2020-03-10 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added a comment. The clang attribute part LGTM, but I want someone else to check the rest. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75861/new/ https://reviews.llvm.org/D75861 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D75563: [clang][Parse] properly parse asm-qualifiers, asm inline

2020-03-10 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 249412. nickdesaulniers added a comment. This revision is now accepted and ready to land. - small refactorings Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75563/new/ https://reviews.llvm.org/D75563 F

[PATCH] D75827: Add new `attribute push` matcher `function(is_definition)`

2020-03-10 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert abandoned this revision. jdoerfert added a comment. Not needed anymore. Anyone should feel free to pick this up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75827/new/ https://reviews.llvm.org/D75827 _

  1   2   3   >