[PATCH] D72114: [MS] Overhaul how clang passes overaligned args on x86_32

2020-01-06 Thread Anton Yudintsev via Phabricator via cfe-commits
AntonYudintsev added inline comments. Comment at: clang/test/CodeGen/x86_32-arguments-win32.c:77 +// CHECK-LABEL: define dso_local void @receive_vec_256(<8 x float> inreg %x, <8 x float> inreg %y, <8 x float> inreg %z, <8 x float>* %0, <8 x float>* %1) +// CHECK-LABEL: define ds

[PATCH] D70764: build: reduce CMake handling for zlib

2020-01-06 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. In D70764#1803559 , @raj.khem wrote: > this is now in master, and I am seeing build failures in cross-building > clang, e.g. when building clang for arm on a x86_64 host. its resorting to > finding, libz from buildhost instead of

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-06 Thread annita.zhang via Phabricator via cfe-commits
annita.zhang added inline comments. Comment at: clang/include/clang/Driver/Options.td:2198 + "should be a power of 2 and no less than 32. Branches will be " + "aligned within the boundary of specified size. " + "-x86-align-branch-boundary

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-06 Thread annita.zhang via Phabricator via cfe-commits
annita.zhang added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:2052 +CmdArgs.push_back("-mllvm"); +CmdArgs.push_back(Args.MakeArgString("-x86-align-branch-prefix-size=4")); + } CmdArgs.push_back(Args.MakeArgString("-x86-align-branc

[PATCH] D72227: Add options for clang to align branches within 32B boundary

2020-01-06 Thread annita.zhang via Phabricator via cfe-commits
annita.zhang requested changes to this revision. annita.zhang added a comment. This revision now requires changes to proceed. A general comment. All the tests have been done with -malign-branch-prefix-size=5. I don't see any explicit reason to change the default prefix size from 5 to 4. CHANGE

[PATCH] D72304: Summary: Add OpenMP Directives (master and critical) to OMPBuilder, and use them in clang.

2020-01-06 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Some initial comments. Can we split it in two patches (master/critical)? Comment at: llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h:250 + llvm::ArrayType *KmpCriticalNameTy; + llvm::PointerType *KmpCriticalNamePtrTy; + I

[PATCH] D72233: Add a new AST matcher 'optionally'.

2020-01-06 Thread Rihan Yang via Phabricator via cfe-commits
air20 updated this revision to Diff 236514. air20 marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72233/new/ https://reviews.llvm.org/D72233 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMatchers/ASTMatchers.h clang/include/cl

[PATCH] D72233: Add a new AST matcher 'optionally'.

2020-01-06 Thread Rihan Yang via Phabricator via cfe-commits
air20 updated this revision to Diff 236513. air20 added a comment. Included base commits that was missing in the previous diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72233/new/ https://reviews.llvm.org/D72233 Files: clang/docs/LibASTMatchersReference.html clang/include/clan

[PATCH] D71365: expand printf when compiling HIP to AMDGPU

2020-01-06 Thread Sameer Sahasrabuddhe via Phabricator via cfe-commits
sameerds added inline comments. Comment at: clang/test/CodeGenHIP/printf.cpp:18 +} + +// CHECK: [[BEGIN:%.*]] = call i64 @__ockl_printf_begin(i64 0) arsenm wrote: > This could use a lot more testcases. Can you add some half, float, and double > as well as poin

[PATCH] D72233: Add a new AST matcher 'optionally'.

2020-01-06 Thread Rihan Yang via Phabricator via cfe-commits
air20 updated this revision to Diff 236510. air20 added a comment. Fixed Registry.cpp and documentation as per comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72233/new/ https://reviews.llvm.org/D72233 Files: clang/docs/LibASTMatchersReference.html clang/include/clang/ASTMa

[PATCH] D68101: [MC][ELF] Prevent globals with an explicit section from being mergeable

2020-01-06 Thread ben via Phabricator via cfe-commits
bd1976llvm added a comment. Thanks for the feedback. I'm sorry that I am being slow on this... v.busy at the moment. Will try to finish the patch in the next few days. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68101/new/ https://reviews.llvm.org/D68101 __

[PATCH] D72217: [clang-tidy] Added readability-qualified-auto check

2020-01-06 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 236486. njames93 added a comment. I have tried to make the code more robust against macro decls. Also target the actual type specifier rather than everything before the name when doing the replacements. This should leave any other qualifiers or attributes i

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-06 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 2 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-member-decl-usage.cpp:137 +} +}; // namespace CtorInits aaron.ballman wrote: > I think this is one mor

[PATCH] D72212: [Sema] Improve -Wrange-loop-analysis warnings

2020-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Thanks for the patch. Will take some time to review. Without this, adding -Wrange-loop-analysis to -Wall will make lots of projects fail to build if they have -Werror. For example, `for (const absl::string_review : ...)` or `const std::string_view` is common. Reposito

[clang] 907cefe - Always deduce the lengths of contained parameter packs when deducing a

2020-01-06 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-01-06T17:24:29-08:00 New Revision: 907cefe721437fa8950c1b6c1c028038b175f921 URL: https://github.com/llvm/llvm-project/commit/907cefe721437fa8950c1b6c1c028038b175f921 DIFF: https://github.com/llvm/llvm-project/commit/907cefe721437fa8950c1b6c1c028038b175f921.diff

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 updated this revision to Diff 236483. logan-5 marked 3 inline comments as done. logan-5 added a comment. Consistent-ified single-statement-body control flow statements to not use braces. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72284/n

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-06 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 236482. void marked 2 inline comments as done. void added a comment. Reword the extension explanation to be more readable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69876/new/ https://reviews.llvm.org/D69876

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-06 Thread Bill Wendling via Phabricator via cfe-commits
void added inline comments. Comment at: clang/lib/AST/Stmt.cpp:646-648 + // Labels are placed after "InOut" operands. Adjust accordingly. + if (IsLabel) +N += getNumPlusOperands(); jyknight wrote: > I'm confused about this part. Why isn't the "N

[PATCH] D72306: [PowerPC] FreeBSD >= 13 default ABI is ELFv2

2020-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Are you still using -target powerpc64-unknown-freebsd12.0-elfv2 or -target powerpc64-unknown-freebsd12.0-elfv1 added in https://reviews.llvm.org/rL361355 ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72306/new/ https://r

[PATCH] D72306: [PowerPC] FreeBSD >= 13 default ABI is ELFv2

2020-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:389 +if (Triple.getEnvironment() != llvm::Triple::UnknownEnvironment) { + switch (Triple.getEnvironment()){ +case llvm::Triple::ELFv1: Which ABI does `powerpc64le-linux-gnu`

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:272 + if (const auto *Typedef = + Value->getReturnType().getTypePtr()->getAs()) { +addUsage(NamingCheckFailures, Typedef->getDecl(), ---

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 updated this revision to Diff 236478. logan-5 marked 3 inline comments as done. logan-5 added a comment. More nits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72284/new/ https://reviews.llvm.org/D72284 Files: clang-tools-extra/clang-t

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:272 + if (const auto *Typedef = + Value->getReturnType().getTypePtr()->getAs()) { +addUsage(NamingCheckFailures, Typedef->getDecl(),

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-01-06 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#1805439 , @JonasToth wrote: > > This last version too builds with RelWithDebInfo and fails with Debug > > configuration (both clean builds). > > So it only fails in debug-build? Correct; I can build 'Release' or 'R

[clang] 20f005d - [CodeGen][ObjC] Push the properties of a protocol before pushing the

2020-01-06 Thread Akira Hatanaka via cfe-commits
Author: Akira Hatanaka Date: 2020-01-06T16:16:02-08:00 New Revision: 20f005d25f488fa1dc69d6792700e014c6a5d165 URL: https://github.com/llvm/llvm-project/commit/20f005d25f488fa1dc69d6792700e014c6a5d165 DIFF: https://github.com/llvm/llvm-project/commit/20f005d25f488fa1dc69d6792700e014c6a5d165.diff

[PATCH] D72247: Add Triple::isX86()

2020-01-06 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6904cd948674: Add Triple::isX86() (authored by MaskRay). Herald added subscribers: fedor.sergeev, emaste. Changed prior to commit: https://reviews.llvm.org/D72247?vs=236300&id=236477#toc Repository: r

[clang] c6fd16a - Use FileCheck instead of grep

2020-01-06 Thread Akira Hatanaka via cfe-commits
Author: Akira Hatanaka Date: 2020-01-06T15:50:23-08:00 New Revision: c6fd16af2be98b49d663285e3808ecde61bec614 URL: https://github.com/llvm/llvm-project/commit/c6fd16af2be98b49d663285e3808ecde61bec614 DIFF: https://github.com/llvm/llvm-project/commit/c6fd16af2be98b49d663285e3808ecde61bec614.diff

[clang] 6904cd9 - Add Triple::isX86()

2020-01-06 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2020-01-06T15:51:02-08:00 New Revision: 6904cd948674df7f55843519695dbc95157a9429 URL: https://github.com/llvm/llvm-project/commit/6904cd948674df7f55843519695dbc95157a9429 DIFF: https://github.com/llvm/llvm-project/commit/6904cd948674df7f55843519695dbc95157a9429.diff

Re: [clang] 24ab9b5 - Generalize the pass registration mechanism used by Polly to any third-party tool

2020-01-06 Thread Eric Christopher via cfe-commits
Hi Serge, I have a few questions here about this: In general this appears to be a lot more complex than the existing plugin solutions and requires quite a lot of custom cmake rules that are difficult to maintain. Why do we want this in general for the project? I understand the desire to make poll

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-06 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 61271 tests passed, 1 failed and 736 were skipped. failed: Clang.CodeGen/patchable-function-entry.c {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D72247: Add Triple::isX86()

2020-01-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72247/new/ https://reviews.llvm.org/D72247 ___ cfe-commits mailing list cfe-commits

[PATCH] D72247: Add Triple::isX86()

2020-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @craig.topper Good to go? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72247/new/ https://reviews.llvm.org/D72247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D72306: [PowerPC] FreeBSD >= 13 default ABI is ELFv2

2020-01-06 Thread Alfredo Dal'Ava Júnior via Phabricator via cfe-commits
adalava created this revision. adalava added reviewers: dim, MaskRay. adalava added a project: PowerPC. Herald added subscribers: llvm-commits, cfe-commits, steven.zhang, shchenz, jsji, kbarton, hiraditya, krytarowski, arichardson, nemanjai, emaste. Herald added projects: clang, LLVM. FreeBSD for

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 236468. MaskRay marked 13 inline comments as done. MaskRay added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72221/new/ https://reviews.llvm.org/D72221 Files: clang/inclu

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/Attr.td:686 +def PatchableFunctionEntry : InheritableAttr { + let Spellings = [GCC<"patchable_function_entry">]; aaron.ballman wrote: > Should this be inheriting from `TargetSpecificAttr` as

[PATCH] D72304: Summary: Add OpenMP Directives (master and critical) to OMPBuilder, and use them in clang.

2020-01-06 Thread Fady Ghanim via Phabricator via cfe-commits
fghanim created this revision. fghanim added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, cfe-commits, guansong, hiraditya. Herald added projects: clang, LLVM. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D72304 Files: clang/lib/CodeGen/CGStmtOpenMP.cpp ll

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 6 inline comments as done. Mordante added a comment. Thanks for the feedback! Comment at: clang/include/clang/AST/Decl.h:903 /// declared. -unsigned ScopeDepthOrObjCQuals : NumScopeDepthOrObjCQualsBits; +unsigned ScopeDepthOrObjCQuals : IQ::NumScope

[PATCH] D72202: [Diagnostic] make Wmisleading-indendation not warn about labels

2020-01-06 Thread Tyker via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf5329bfc76bb: [Diagnostic] make Wmisleading-indendation not warn about labels (authored by Tyker). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monor

[clang] f5329bf - [Diagnostic] make Wmisleading-indendation not warn about labels

2020-01-06 Thread via cfe-commits
Author: Tyker Date: 2020-01-06T23:22:27+01:00 New Revision: f5329bfc76bb6fc30a589e8238aabc005c52e5d6 URL: https://github.com/llvm/llvm-project/commit/f5329bfc76bb6fc30a589e8238aabc005c52e5d6 DIFF: https://github.com/llvm/llvm-project/commit/f5329bfc76bb6fc30a589e8238aabc005c52e5d6.diff LOG: [D

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 marked an inline comment as done. logan-5 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnintendedADLCheck.cpp:43 + Whitelist( + utils::options::parseStringList(Options.get("Whitelist", "swap"))) {} + JonasToth wro

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:272 + if (const auto *Typedef = + Value->getReturnType().getTypePtr()->getAs()) { +addUsage(NamingCheckFailures, Typedef->getDecl(), --

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 updated this revision to Diff 236449. logan-5 marked 3 inline comments as done. logan-5 added a comment. Addressed some nits. If the rest looks good, I'll need someone with commit access to help me wrap this up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D71714#1795313 , @ilya wrote: > While I agree with the general notion about the flaws with the current > implementation, I feel that the more major refactoring proposed in this > review is out of the scope of this minor fix.

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13384 case Stmt::MemberExprClass: { expr = cast(expr)->getBase(); break; ilya wrote: > rsmith wrote: > > Hmm, don't we need to do different things for dot and arrow

[clang] 7b518dc - [OPENMP50]Support lastprivate conditional updates in inc/dec unary ops.

2020-01-06 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-01-06T16:37:01-05:00 New Revision: 7b518dcb291e740c3e957d93c2b4046bc8a97f00 URL: https://github.com/llvm/llvm-project/commit/7b518dcb291e740c3e957d93c2b4046bc8a97f00 DIFF: https://github.com/llvm/llvm-project/commit/7b518dcb291e740c3e957d93c2b4046bc8a97f00.diff

[PATCH] D72097: [LifetimeAnalysis] Do not forbid void deref type in gsl::Pointer/gsl::Owner annotations

2020-01-06 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/D72097/new/ https://reviews.llvm.org/D72097 ___ cfe-commits mailing lis

[clang] 02f694b - [NFC] Test commit, revert whitespace change

2020-01-06 Thread via cfe-commits
Author: stevewan Date: 2020-01-06T16:28:13-05:00 New Revision: 02f694b69a8b30db7b5d43670da5ab3b9f31bb81 URL: https://github.com/llvm/llvm-project/commit/02f694b69a8b30db7b5d43670da5ab3b9f31bb81 DIFF: https://github.com/llvm/llvm-project/commit/02f694b69a8b30db7b5d43670da5ab3b9f31bb81.diff LOG:

[clang] b73fea6 - [NFC] Test commit, whitespace change

2020-01-06 Thread via cfe-commits
Author: stevewan Date: 2020-01-06T16:24:27-05:00 New Revision: b73fea6a7cfd87fe07b9c05ba153042198b5d873 URL: https://github.com/llvm/llvm-project/commit/b73fea6a7cfd87fe07b9c05ba153042198b5d873 DIFF: https://github.com/llvm/llvm-project/commit/b73fea6a7cfd87fe07b9c05ba153042198b5d873.diff LOG:

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnintendedADLCheck.cpp:43 + Whitelist( + utils::options::parseStringList(Options.get("Whitelist", "swap"))) {} + do you mean `std::swap`? If you it should be fully qu

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. I guess all the tests run? I think this LGTM after the nits are adressed. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:203 + Decl = Ref.getDecl(); +} + What about the else? If it is unreachable it

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/Decl.h:903 /// declared. -unsigned ScopeDepthOrObjCQuals : NumScopeDepthOrObjCQualsBits; +unsigned ScopeDepthOrObjCQuals : IQ::NumScopeDepthOrObjCQualsBits; These bitfields are assum

[PATCH] D72121: [clang-tidy] Fix readability-identifier-naming missing member variables

2020-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming-member-decl-usage.cpp:137 +} +}; // namespace CtorInits I think this is one more test case to add: base class specifiers. e.g., ``` struct f

[PATCH] D70926: [clang-format] Add option for not breaking line before ObjC params

2020-01-06 Thread Kanglei Fang via Phabricator via cfe-commits
ghvg1313 added a comment. In D70926#1790848 , @MyDeveloperDay wrote: > Thanks for the patch. Happy new year! Could you help landing this diff? I don't know exactly what to do from here Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D70689: [analyzer] Fix SARIF column locations

2020-01-06 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! I think we've had sufficient time for other reviewers to lodge concerns and we can deal with any other issues post-commit. Do you need me to commit on your behalf? =

[PATCH] D72289: [analyzer] Update help text to reflect sarif support

2020-01-06 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 for this! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72289/new/ https://reviews.llvm.org/D72289

[PATCH] D72233: Add a new AST matcher 'optionally'.

2020-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Just to make sure I understand the purpose -- the goal here is to optionally match one or more inner matchers without failing even if none of the inner matchers match anything, and this is a different use case than `anyOf()` because that would fail when none of th

[PATCH] D69878: Consoldiate internal denormal flushing controls

2020-01-06 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: llvm/docs/LangRef.rst:1837 + are present, this overrides ``"denormal-fp-math"``. Not all targets + support separately setting the denormal mode per type. + arsenm wrote: > andrew.w.kaylor wrote: > > Can you d

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-06 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:686 +def PatchableFunctionEntry : InheritableAttr { + let Spellings = [GCC<"patchable_function_entry">]; Should this be inheriting from `TargetSpecificAttr` as well given that t

[PATCH] D68101: [MC][ELF] Prevent globals with an explicit section from being mergeable

2020-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D68101#1806213 , @rjmccall wrote: > In D68101#1806135 , @nickdesaulniers > wrote: > > > In D68101#1802280 , @rjmccall > > wrote: > > > >

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unintended-adl.rst:39 + + Semicolon-separated list of names that the check ignores. Default is `swap`. logan-5 wrote: > Eugene.Zelenko wrote: > > Indentation. P

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 updated this revision to Diff 236420. logan-5 marked 5 inline comments as done. logan-5 added a comment. Addressed some formatting stuff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72282/new/ https://reviews.llvm.org/D72282 Files: cla

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-06 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11190 /// combination, based on their host/device attributes. - /// \param Caller function which needs address of \p Callee. - /// nullptr in case of global context. - /// \param Callee

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-unintended-adl.rst:35 + + If non-zero, ignores calls to overloaded operators using the operator syntax (e.g. `a + b`), but not the function call syntax (e.g. `operator+(a, b)`). Defa

[PATCH] D69878: Consoldiate internal denormal flushing controls

2020-01-06 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm marked an inline comment as done. arsenm added inline comments. Comment at: llvm/docs/LangRef.rst:1837 + are present, this overrides ``"denormal-fp-math"``. Not all targets + support separately setting the denormal mode per type. + andrew.w.kaylor wrot

[PATCH] D68720: Support -fstack-clash-protection for x86

2020-01-06 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:1903 +.. option:: -fstack-clash-protection + Probably need a -fno-stack-class-protection as well. Looks like gcc has it. You'll need to update the handling in the driver t

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:826 + "patchable-function-entry", + (Twine(Attr->getSize()) + "," + Twine(Attr->getStart())).str()); } ostannard wrote: > I think using two function attr

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/UnintendedADLCheck.h:13 +#include "../ClangTidyCheck.h" + +#include Unnecessary empty line. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-

[PATCH] D72289: [analyzer] Update help text to reflect sarif support

2020-01-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun created this revision. xazax.hun added reviewers: aaron.ballman, NoQ. xazax.hun added a project: clang. Herald added subscribers: Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. Repository: rG LLVM Github Monorepo

[PATCH] D71848: Allow the discovery of Android NDK's triple-prefixed binaries.

2020-01-06 Thread Brian Ledger via Phabricator via cfe-commits
brianpl added a comment. > Just to clarify, this is needed for the triple-prefixed tools, but the > triple-specific directory worked fine before this patch? If I'm understanding > that correctly then LGTM, otherwise I'm confused as to why I haven't seen > this problem before. Yes, that's right

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers marked an inline comment as done. nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4925 + T.getArch() != llvm::Triple::x86_64) { +S.Diag(getAttrLoc(AL), diag::err_attribute_unsupported) << AL; +return; ---

[PATCH] D69878: Consoldiate internal denormal flushing controls

2020-01-06 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added inline comments. Comment at: llvm/docs/LangRef.rst:1837 + are present, this overrides ``"denormal-fp-math"``. Not all targets + support separately setting the denormal mode per type. + Can you document which targets do support the option

[PATCH] D72221: Support function attribute patchable_function_entry

2020-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4925 + T.getArch() != llvm::Triple::x86_64) { +S.Diag(getAttrLoc(AL), diag::err_attribute_unsupported) << AL; +return; Why is the target arch also checked in `clang/li

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:351 +const std::string &Fixup) { + if (Fixup.empty()) { +return "; cannot be fixed automatically"; Please elide braces. Same be

[PATCH] D71714: [Sema] Fix -Warray-bounds false negative when casting an out-of-bounds array item

2020-01-06 Thread Ilya Mirsky via Phabricator via cfe-commits
ilya added a comment. Kind ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71714/new/ https://reviews.llvm.org/D71714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D68101: [MC][ELF] Prevent globals with an explicit section from being mergeable

2020-01-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D68101#1806135 , @nickdesaulniers wrote: > In D68101#1802220 , @bd1976llvm > wrote: > > > Below is the code comment from the new patch explaining the new approach, > > please take a l

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-06 Thread James Y Knight via Phabricator via cfe-commits
jyknight accepted this revision. jyknight added a comment. LGTM modulo some minor wording. Comment at: clang/docs/LanguageExtensions.rst:1256-1258 +Clang provides support for the `goto form of GCC's extended +assembly`_ with

[PATCH] D72281: [Matrix] Add matrix type to Clang (WIP).

2020-01-06 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon times-circle color=red} Unit tests: fail. 61254 tests passed, 1 failed and 736 were skipped. failed: Clang.CodeGen/pch-dllexport.cpp {icon times-circle color=red} clang-tidy: fail. Please fix clang-tidy findings

[PATCH] D71848: Allow the discovery of Android NDK's triple-prefixed binaries.

2020-01-06 Thread Dan Albert via Phabricator via cfe-commits
danalbert accepted this revision. danalbert added a comment. This revision is now accepted and ready to land. Just to clarify, this is needed for the triple-prefixed tools, but the triple-specific directory worked fine before this patch? If I'm understanding that correctly then LGTM, otherwise I

[PATCH] D72271: [Clang] Handle target-specific builtins returning aggregates.

2020-01-06 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:4333 +if (!ReturnValue.isNull() && + ReturnValue.getValue().getType()->getPointerElementType()->isStructTy()) + return RValue::getAggregate(ReturnValue.getValue(), The re

[PATCH] D71314: Emit a warning if a variable is uninitialized in indirect ASM goto destination.

2020-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Analysis/UninitializedValues.cpp:856 +vals[VD] = MayUninitialized; } Can you walk me through the logic of this function? I would assume for changes to `asm goto`, the above early `return` wo

[PATCH] D72213: [clang-tidy] Add `bugprone-reserved-identifier` to flag usages of reserved C++ names

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 added a comment. I'm taking @JonasToth's suggestion and splitting this into two patches, one for the refactor, followed by one for the new check. The refactor patch is here: https://reviews.llvm.org/D72284. Thanks everyone for your feedback so far. CHANGES SINCE LAST ACTION https://r

[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added reviewers: alexfh, hokein, aaron.ballman. logan-5 added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. Before this patch, `readability-identifier-naming` contained a significant am

[PATCH] D71174: [clang-tidy] new check: bugprone-signed-char-misuse

2020-01-06 Thread Tamás Zolnai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG350da402ef6b: [clang-tidy] new check: bugprone-signed-char-misuse (authored by ztamas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71174/new/ https://rev

[PATCH] D69876: Allow output constraints on "asm goto"

2020-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. No, thanks for the work on this @void ! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69876/new/ https://reviews.llvm.org/D698

[PATCH] D68101: [MC][ELF] Prevent globals with an explicit section from being mergeable

2020-01-06 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D68101#1802220 , @bd1976llvm wrote: > Below is the code comment from the new patch explaining the new approach, > please take a look and see if you have any questions/comments: > > // If two globals with differing siz

[PATCH] D72283: [Matrix] Add __builtin_matrix_insert to Clang (WIP).

2020-01-06 Thread pre-merge checks [bot] via Phabricator via cfe-commits
merge_guards_bot added a comment. {icon question-circle color=gray} Unit tests: unknown. {icon question-circle color=gray} clang-tidy: unknown. {icon question-circle color=gray} clang-format: unknown. Build artifacts : diff.

[PATCH] D72282: [clang-tidy] Add `bugprone-unintended-adl`

2020-01-06 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added reviewers: aaron.ballman, hokein, alexfh. logan-5 added a project: clang-tools-extra. Herald added subscribers: cfe-commits, xazax.hun, mgorny. Herald added a project: clang. This patch adds `bugprone-unintended-adl` which flags uses of ADL that are not

[PATCH] D72283: [Matrix] Add __builtin_matrix_insert to Clang (WIP).

2020-01-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. Herald added a subscriber: tschuett. Herald added a project: clang. This patch adds a __builtin_matrix_insert builtin as described in "Matrix Support in Clang" on cfe-dev [1]. The patch is not intended for review yet, just to provide an idea how the implementation coul

[PATCH] D72281: [Matrix] Add matrix type to Clang (WIP).

2020-01-06 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. Herald added a reviewer: martong. Herald added subscribers: tschuett, arphaman. Herald added a project: clang. This patch adds a matrix type to Clang as described in "Matrix Support in Clang" on cfe-dev [1]. The patch is not intended for review yet, just to provide an

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-06 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/docs/ImplementationQuantities.rst:11 +This page lists the limits implemented in the Clang compiler. The available +resources on the system running Clang may imposse other limits. For exam

[PATCH] D69878: Consoldiate internal denormal flushing controls

2020-01-06 Thread Cameron McInally via Phabricator via cfe-commits
cameron.mcinally added a comment. Ok, thanks for the clarifications. Looks good to me, but it would be good to have experts in OpenCL/Cuda/AMDGPU review the target specific changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69878/new/ https://reviews.llvm.org/D69878

[PATCH] D72268: [ARM,MVE] Support -ve offsets in gather-load intrinsics.

2020-01-06 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4978296cd8e4: [ARM,MVE] Support -ve offsets in gather-load intrinsics. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72268/new/

[clang] 4978296 - [ARM, MVE] Support -ve offsets in gather-load intrinsics.

2020-01-06 Thread Simon Tatham via cfe-commits
Author: Simon Tatham Date: 2020-01-06T16:33:07Z New Revision: 4978296cd8e4d10724cfa41f0308d256c0fd490c URL: https://github.com/llvm/llvm-project/commit/4978296cd8e4d10724cfa41f0308d256c0fd490c DIFF: https://github.com/llvm/llvm-project/commit/4978296cd8e4d10724cfa41f0308d256c0fd490c.diff LOG:

[PATCH] D72268: [ARM,MVE] Support -ve offsets in gather-load intrinsics.

2020-01-06 Thread Dave Green via Phabricator via cfe-commits
dmgreen accepted this revision. dmgreen added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72268/new/ https://reviews.llvm.org/D72268

[PATCH] D72270: [ARM,MVE] Fix many signedness errors in MVE intrinsics.

2020-01-06 Thread Dave Green via Phabricator via cfe-commits
dmgreen accepted this revision. dmgreen added a comment. This revision is now accepted and ready to land. OK. LGTM then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72270/new/ https://reviews.llvm.org/D72270 ___

[PATCH] D72276: [clang-format] Add IndentCaseBlocks option

2020-01-06 Thread Nicolas Capens via Phabricator via cfe-commits
capn created this revision. capn added a reviewer: clang-format. capn added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. The documentation for IndentCaseLabels claimed that the "Switch statement body is always indented one level more than case lab

[PATCH] D72270: [ARM,MVE] Fix many signedness errors in MVE intrinsics.

2020-01-06 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/include/clang/Basic/arm_mve.td:204 let params = T.Float in { - defm vminnmq : VectorVectorArithmetic<"min_predicated">; - defm vmaxnmq : VectorVectorArithmetic<"max_predicated"

[PATCH] D72270: [ARM,MVE] Fix many signedness errors in MVE intrinsics.

2020-01-06 Thread Dave Green via Phabricator via cfe-commits
dmgreen added inline comments. Comment at: clang/include/clang/Basic/arm_mve.td:204 let params = T.Float in { - defm vminnmq : VectorVectorArithmetic<"min_predicated">; - defm vmaxnmq : VectorVectorArithmetic<"max_predicated">; + defm vminnmq : VectorVectorArithmetic<"min_pre

[PATCH] D72274: [libTooling] Fix bug in Stencil handling of macro ranges

2020-01-06 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: gribozavr. Herald added a project: clang. Currently, an attempt to rewrite source code inside a macro expansion succeeds, but results in empty text, rather than failing with an error. This patch restructures to the code to explicitly vali

[PATCH] D72053: [RFC] Handling implementation limits

2020-01-06 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/docs/ImplementationQuantities.rst:11 +This page lists the limits implemented in the Clang compiler. The available +resources on the system running Clang may imposse other limits. For example, +the system may have insufficient m

  1   2   >