[PATCH] D103131: support debug info for alias variable

2021-05-26 Thread Umesh Kalappa via Phabricator via cfe-commits
umesh.kalappa0 added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:4949 +void CGDebugInfo::EmitGlobalAlias(llvm::GlobalAlias *Var, const VarDecl *D) { + if (!CGM.getCodeGenOpts().hasReducedDebugInfo()) +return; check is redundant ,no require

Re: [clang] 722c39f - [HIP] Tighten checks in hip-include-path.hip test case

2021-05-26 Thread Tom Stellard via cfe-commits
On 5/19/21 4:15 AM, Bjorn Pettersson via cfe-commits wrote: Author: Bjorn Pettersson Date: 2021-05-19T13:11:57+02:00 New Revision: 722c39fef5ab611b3196e964bb3177a5ab473355 URL: https://github.com/llvm/llvm-project/commit/722c39fef5ab611b3196e964bb3177a5ab473355 DIFF: https://github.com/llvm/l

RE: [clang] 722c39f - [HIP] Tighten checks in hip-include-path.hip test case

2021-05-26 Thread Björn Pettersson A via cfe-commits
Ok. Thanks for noticing. It was probably a bit too optimistic to match on "lib/clang" in those checks. Probably need to relax that part a bit again, while still matching on the [[ROOT]] to avoid that the test case depends on how users name their build directories. I'll have a look, and will try t

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-05-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin created this revision. DmitryPolukhin added reviewers: dexonsmith, bruno, rsmith. DmitryPolukhin added a project: clang. Herald added subscribers: usaxena95, ormris, kadircet, arphaman. DmitryPolukhin requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-05-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 347862. DmitryPolukhin added a comment. Fix clang-format issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103142/new/ https://reviews.llvm.org/D103142 Files: clang/include/clang/Lex/HeaderMap.h c

[PATCH] D103142: [clang][clangd] Use reverse header map lookup in suggestPathToFileForDiagnostics

2021-05-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 347864. DmitryPolukhin added a comment. Fix linter Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103142/new/ https://reviews.llvm.org/D103142 Files: clang/include/clang/Lex/HeaderMap.h clang/lib/Lex

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

2021-05-26 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/SmartPtr.h:37 + +class GetNoteVisitor : public BugReporterVisitor { +private: Sorry for picking on it again, but is it visiting "get notes"? Otherwise, it is just a placeholder name

[PATCH] D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration

2021-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. This patch still only considers structs? @krasimir and I are I think saying that really this should it support `class` in the same way? I mean isn't a struct and a class almost identical in this context why would we want treat them differently. class new_str

[PATCH] D102995: errorUnsupported should be non-fatal

2021-05-26 Thread MJ via Phabricator via cfe-commits
majiang31312 added a comment. Thanks for the information. Well, the key problem is x64 abi. But we can do better here for sure. First of all, we can fallback to use fpu instructions. I can get the following binary which should work correctly(after this fix, of course) :

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-05-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Although verifyFormat is nice, I would add some EXPECT_EQ to show that the braces are really inserted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95168/new/ https://reviews.llvm.org/D95168 __

[clang] a3b3f7e - [HIP] Adjust check in hip-include-path.hip test case

2021-05-26 Thread Bjorn Pettersson via cfe-commits
Author: Bjorn Pettersson Date: 2021-05-26T11:08:05+02:00 New Revision: a3b3f7e631981bd861d5fe5e20f33b11a0dac978 URL: https://github.com/llvm/llvm-project/commit/a3b3f7e631981bd861d5fe5e20f33b11a0dac978 DIFF: https://github.com/llvm/llvm-project/commit/a3b3f7e631981bd861d5fe5e20f33b11a0dac978.di

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-05-26 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. To be honest, I don't think that it solves the problem I mentioned before. The fact that conditions and branching are part of `operator++` now, doesn't cancel them. I noticed that you made the first loop, so we don't need to check for `Min` in the main loop, and th

RE: [clang] 722c39f - [HIP] Tighten checks in hip-include-path.hip test case

2021-05-26 Thread Björn Pettersson A via cfe-commits
Having some problems to reproduce this (my build fails for some unknown reason when trying to use -DLLVM_LIBDIR_SUFFIX=64). But I made a "speculative" fix here: https://reviews.llvm.org/rGa3b3f7e631981bd861d5fe5e20f33b11a0dac978 Tom: Can you try again with an updated main branch? Or maybe let

[PATCH] D102923: [clang][lex] Remark for used header search paths

2021-05-26 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese added a subscriber: akyrtzi. Bigcheese added a comment. I think this is looking good, but would like either @dexonsmith, @akyrtzi, or someone else familiar with this area to take a look. Only other comment I have is that the new functions you add should use the current LLVM naming conv

[PATCH] D102850: [C++4OpenCL] Fix overloading resolution of addrspace constructors

2021-05-26 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 347872. olestrohm added a comment. Made the check more general, it's no longer OpenCL specific and no longer restricted to just constructors, since the check only requires them to be methods. Also added more Sema tests, including using FileCheck to check

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:19068 +" call_function(arg, arg);"; + verifyFormat(IfSourceShort); + Can you just put the code inline in the verifyFormat, please copy the conve

[PATCH] D95168: [clang-format] Add InsertBraces option

2021-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:2546 +**InsertBraces** (``BraceInsertionStyle``) + The brace insertion style to use for control flow statements. I'm not convinced this code has been generated via doc/to

[PATCH] D102989: Align documentation in Format.h and ClangFormatStyleOptions.rst for EmptyLineAfterAccessModifier

2021-05-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102989/new/ https://reviews.llvm.org/D102989 ___ cfe-commits mailing l

[PATCH] D103131: support debug info for alias variable

2021-05-26 Thread kamlesh kumar via Phabricator via cfe-commits
kamleshbhalui updated this revision to Diff 347883. kamleshbhalui retitled this revision from "support debug info for alias variable " to "support debug info for alias variable". kamleshbhalui added a comment. removed unnecessary code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D102850: [C++4OpenCL] Fix overloading resolution of addrspace constructors

2021-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:9870 + if (S.getLangOpts().OpenCL) { +if (const auto *CD1 = dyn_cast_or_null(Cand1.Function)) { olestrohm wrote: > Anastasia wrote: > > olestrohm wrote: > > > Anastasia wrote: >

[PATCH] D103125: [Clang][WIP] Allow renaming of "clang"

2021-05-26 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. In D103125#2780936 , @dblaikie wrote: > Can't say I'm super enthusiastic about this (I assume the build already > supports prefixes and suffixes, which I'd hope would be adequate - but > presumably are not for your use case),

[PATCH] D103125: [Clang][WIP] Allow renaming of "clang"

2021-05-26 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai created this revision. nemanjai added reviewers: rjmccall, rsmith, craig.topper, t.p.northover, arsenm, kparzysz, echristo. Herald added subscribers: usaxena95, s.egerton, kadircet, arphaman, delcypher, simoncook, mgorny. nemanjai requested review of this revision. Herald added subscribe

[PATCH] D103125: [Clang][WIP] Allow renaming of "clang"

2021-05-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added subscribers: jhenderson, probinson, dblaikie. dblaikie added a comment. Can't say I'm super enthusiastic about this (I assume the build already supports prefixes and suffixes, which I'd hope would be adequate - but presumably are not for your use case), though there's some, I thin

[PATCH] D101921: [MC] Make it possible for targets to define their own MCObjectFileInfo

2021-05-26 Thread Philipp Krones via Phabricator via cfe-commits
flip1995 added inline comments. Comment at: llvm/include/llvm/Support/TargetRegistry.h:26 #include "llvm/ADT/iterator_range.h" +#include "llvm/MC/MCObjectFileInfo.h" #include "llvm/Support/CodeGen.h" MaskRay wrote: > `include/llvm/Support/TargetRegistry.h now h

[PATCH] D101921: [MC] Make it possible for targets to define their own MCObjectFileInfo

2021-05-26 Thread Philipp Krones via Phabricator via cfe-commits
flip1995 added inline comments. Comment at: llvm/include/llvm/Support/TargetRegistry.h:26 #include "llvm/ADT/iterator_range.h" +#include "llvm/MC/MCObjectFileInfo.h" #include "llvm/Support/CodeGen.h" flip1995 wrote: > MaskRay wrote: > > `include/llvm/Support/Ta

[PATCH] D102850: [C++4OpenCL] Fix overloading resolution of addrspace constructors

2021-05-26 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm added inline comments. Comment at: clang/lib/Sema/SemaOverload.cpp:9870 + if (S.getLangOpts().OpenCL) { +if (const auto *CD1 = dyn_cast_or_null(Cand1.Function)) { Anastasia wrote: > olestrohm wrote: > > Anastasia wrote: > > > olestrohm wrote: >

[PATCH] D103097: Add DWARF address spaces mapping for SPIR

2021-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/spir-debug-info-pointer-address-space.cl:22 +// CHECK-DAG: distinct !DIGlobalVariable(name: "FileVar5", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: ![[DWARF_ADDRESS_SPACE_GLOBAL]], isLocal:

[PATCH] D103155: [clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465)

2021-05-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added reviewers: thakis, rnk. Herald added a subscriber: dang. hans requested review of this revision. Herald added a project: clang. VS 2019 16.11 (just released in Preview) is adding support for the /std:c++20 option and bumping /std:c++latest to "post-c++20". T

[clang] ba0fe85 - [OpenCL] Include header for atomic-ops test

2021-05-26 Thread Sven van Haastregt via cfe-commits
Author: Sven van Haastregt Date: 2021-05-26T12:32:07+01:00 New Revision: ba0fe85ec0e93db44f9babaace84cb9ab29ff5f4 URL: https://github.com/llvm/llvm-project/commit/ba0fe85ec0e93db44f9babaace84cb9ab29ff5f4 DIFF: https://github.com/llvm/llvm-project/commit/ba0fe85ec0e93db44f9babaace84cb9ab29ff5f4.

[PATCH] D102148: [clangd] Type hints for variables with 'auto' type

2021-05-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Sorry *again* about the delayed response, will explain off-list. This looks great. There's a substantive question about `auto &x⟦: int &⟧ = 42` vs `auto⟦int⟧ &x = 42`. But I don't think

[PATCH] D103112: Reimplement __builtin_unique_stable_name-

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:329 +def SYCLDevice : LangOpt<"SYCLIsDevice">; +def SYCLHost : LangOpt<"SYCLIsDevice">; def COnly : LangOpt<"", "!LangOpts.CPlusPlus">; Pretty sure you meant this. :-) =

[PATCH] D102689: [C++4OpenCL] Allow address space conversion in reinterpret_cast

2021-05-26 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm updated this revision to Diff 347922. olestrohm added a comment. I've cleaned up the check. The qualifiers of SrcType are removed prior to this function, so only DestType needs to have the address space removed. reinterpret_cast only allows integral types, so structs are not an issue h

[PATCH] D103157: Disable misc-no-recursion checking in Clang

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: alexfh, njames93, rsmith. aaron.ballman requested review of this revision. Herald added a subscriber: aheejin. Herald added a project: clang. We currently enable `misc-no-recursion`, but Clang uses recursion intentionally in a fa

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver created this revision. melver added reviewers: aaron.ballman, vitalybuka, morehouse, nickdesaulniers. Herald added a subscriber: dexonsmith. melver requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Like other sanitizers, enable __has_f

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver updated this revision to Diff 347936. melver added a comment. Documentation wording. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103159/new/ https://reviews.llvm.org/D103159 Files: clang/docs/SanitizerCoverage.rst clang/include/clang/

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-05-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @vsavchenko Thanks for your suggestions! I really appreciate it! I'll do my best on this algorithm. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:257 + // BoundCounter is 0 for outer `)`. + // BoundCounter is 1 for outer

[PATCH] D103163: [Matrix] Skip matrix casts checks for class or struct types in C++.

2021-05-26 Thread Florian Hahn via Phabricator via cfe-commits
fhahn created this revision. fhahn added reviewers: rjmccall, anemet, erichkeane. Herald added a subscriber: tschuett. fhahn requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. At the moment, the matrix support in CheckCXXCStyleCast (added in D

[PATCH] D103155: [clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465)

2021-05-26 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter accepted this revision. CaseyCarter added a comment. Looks great - thanks Hans! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103155/new/ https://reviews.llvm.org/D103155 ___ cfe-commits mail

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-05-26 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:257 + // BoundCounter is 0 for outer `)`. + // BoundCounter is 1 for outer '(' or inner `)`. + // BoundCounter is 2 for inner `(`. ASDenysPetrov wrote: > vsa

[PATCH] D103125: [Clang][WIP] Allow renaming of "clang"

2021-05-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D103125#2781239 , @jhenderson wrote: > In D103125#2780936 , @dblaikie > wrote: > >> Can't say I'm super enthusiastic about this (I assume the build already >> supports prefixes and

[clang] a8f75d4 - [clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465)

2021-05-26 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2021-05-26T16:05:52+02:00 New Revision: a8f75d497daa2684a03909d7c31d5bce11b427e1 URL: https://github.com/llvm/llvm-project/commit/a8f75d497daa2684a03909d7c31d5bce11b427e1 DIFF: https://github.com/llvm/llvm-project/commit/a8f75d497daa2684a03909d7c31d5bce11b427e1.diff

[PATCH] D103155: [clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465)

2021-05-26 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa8f75d497daa: [clang-cl] Add driver support for /std:c++20 and bump /std:c++latest (PR50465) (authored by hans). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D102517: [clang] Add support for the "abstract" contextual keyword of MSVC

2021-05-26 Thread Abbas Sabra via Phabricator via cfe-commits
AbbasSabra updated this revision to Diff 347955. AbbasSabra added a comment. Updating D102517 : [clang] Apply code review: while loop instead of for loop Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102517/new/ h

[PATCH] D102517: [clang] Add support for the "abstract" contextual keyword of MSVC

2021-05-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. Looks good to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102517/new/ https://reviews.llvm.org/D102517 __

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-05-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 347958. yaxunl added a comment. do not promote or check dependent variables since their ctor/dtor/initializers are not determined yet CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103108/new/ https://reviews.llvm.org/D103108 Files: clang/lib/Sema

[PATCH] D103125: [Clang][WIP] Allow renaming of "clang"

2021-05-26 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. I'm also not a fan of this change. From a project perspective the binary is clang and while people may wish to change the name for their own product teams it seems like that onus should be on them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D102761: [clangd] New ParsingCallback for semantics changes

2021-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8f79203a22d8: [clangd] New ParsingCallback for semantics changes (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102761/new/ https://r

[clang-tools-extra] 8f79203 - [clangd] New ParsingCallback for semantics changes

2021-05-26 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2021-05-26T16:57:30+02:00 New Revision: 8f79203a22d8e04086f4cc9a58bb365148852a09 URL: https://github.com/llvm/llvm-project/commit/8f79203a22d8e04086f4cc9a58bb365148852a09 DIFF: https://github.com/llvm/llvm-project/commit/8f79203a22d8e04086f4cc9a58bb365148852a09.dif

[PATCH] D90835: [clang-tidy] Ignore diagnostics due to macro expansion from not-interested headers

2021-05-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 347968. DmitryPolukhin added a comment. Herald added a subscriber: dexonsmith. Added test for system like object macro Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90835/new/ https://reviews.llvm.org/D9

[PATCH] D99797: [analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

2021-05-26 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:257 + // BoundCounter is 0 for outer `)`. + // BoundCounter is 1 for outer '(' or inner `)`. + // BoundCounter is 2 for inner `(`. vsavchenko wrote: > ASD

[PATCH] D102779: [clang-tidy] cppcoreguidelines-explicit-constructor-and-conversion: new alias

2021-05-26 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann updated this revision to Diff 347970. mgartmann marked 5 inline comments as done. mgartmann added a comment. - added option to ignore conversion operators - added tests for new and existing options - renamed options to `Ignore...` - ensured that option's strings only get parsed once Re

[PATCH] D90835: [clang-tidy] Ignore diagnostics due to macro expansion from not-interested headers

2021-05-26 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added a comment. @alexfh, @njames93 and @thakis please take a look! I added all tests cases and put new logic behind a flag to make it as safe as possible. Issue with diagnostics from macro expansion from third-party headers is the one of the biggest problem with deployment that w

[PATCH] D102779: [clang-tidy] cppcoreguidelines-explicit-constructor-and-conversion: new alias

2021-05-26 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann added a comment. @aaron.ballman Thanks a lot for your valuable feedback! I incorporated it accordingly. Is there anything else that should be improved? Comment at: clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp:102 if (const auto *Conversion = -

[PATCH] D97869: [OpenCL][Draft] Add OpenCL builtin test generator

2021-05-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I think this is a very good starting point for the testing of built-in functions. Btw should we now remove '[Draft]' from the title? Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:242 + // functions. + void Emit(); + ---

[PATCH] D103175: [C++4OpenCL] Fix ICE with invalid use of half

2021-05-26 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm created this revision. olestrohm added reviewers: Anastasia, svenvh. olestrohm added a project: clang. Herald added subscribers: ldrumm, yaxunl. olestrohm requested review of this revision. Herald added a subscriber: cfe-commits. Because half is limited to the `cl_khr_fp16` extension bei

[PATCH] D102443: [PowerPC] Added multiple PowerPC builtins

2021-05-26 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai accepted this revision. nemanjai added a comment. This revision is now accepted and ready to land. LGTM. Thanks for implementing this. The redundant pseudo can be removed when committing. Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:2572 + [(in

[PATCH] D103179: [clangd] Handle queries without an originating file in ProjectAwareIndex

2021-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added reviewers: sammccall, kbobyrev. Herald added subscribers: usaxena95, jfb, arphaman. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This enables hand

[PATCH] D103179: [clangd] Handle queries without an originating file in ProjectAwareIndex

2021-05-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Note that I don't feel strongly about making use of `Context` to figure out config::Params vs moving the `Params` into the `Config`. But I'd rather not only store `Path` in the `Config` since we might end up needing other environment variables in future. I didn't go w

[PATCH] D103112: Reimplement __builtin_unique_stable_name-

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 347993. erichkeane marked 6 inline comments as done. erichkeane added a comment. Do all the things requested by @aaron.ballman and @rjmccall except for limiting the syntax to 'types only'. Currently evaluating whether this is something we can accept.

[libunwind] adf1561 - [libunwind] Inform ASan that resumption is noreturn

2021-05-26 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2021-05-26T09:31:39-07:00 New Revision: adf1561d6ce8af057127c65af863b3f0e1c77e60 URL: https://github.com/llvm/llvm-project/commit/adf1561d6ce8af057127c65af863b3f0e1c77e60 DIFF: https://github.com/llvm/llvm-project/commit/adf1561d6ce8af057127c65af863b3f0e1c77e60.diff

[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

2021-05-26 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. FYI, I'm seeing what I think is a miscompile that bisects to this patch. Greatly simplified, the problematic snippet is this: struct Stats { int a; int b; int a_or_b; }; bool x = ... bool y = ... Stats stats; stats.a = x ? 1 : 0; stats.b =

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-05-26 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: danielkiss, kristof.beyls. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixed PR#48894 for AArch64. The issue has been fixed for Arm in https://reviews.llvm.org/D95872

[PATCH] D102839: [RISCV][Clang] Add -mno-div option to disable hardware int division

2021-05-26 Thread Luís Marques via Phabricator via cfe-commits
luismarques added inline comments. Comment at: clang/include/clang/Driver/Options.td:3149-3152 +def mno_div : Flag<["-"], "mno-div">, Group, + HelpText<"Disable hardware integral division instructions in M extension">; +def mdiv : Flag<["-"], "mdiv">, Group, + HelpText<"Enable

[PATCH] D102839: [RISCV][Clang] Add -mno-div option to disable hardware int division

2021-05-26 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. We have Zmmul extension in the ISA spec now, that's equivalent to `-mno-div` , so I suggest we should go forward to implement that extension rather than `-mno-div`. https://github.com/riscv/riscv-isa-manual/pull/648 CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D102839: [RISCV][Clang] Add -mno-div option to disable hardware int division

2021-05-26 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D102839#2782557 , @kito-cheng wrote: > We have Zmmul extension in the ISA spec now, that's equivalent to `-mno-div` > , so I suggest we should go forward to implement that extension rather than > `-mno-div`. > > https://githu

[clang] 6911114 - [Scudo] Make -fsanitize=scudo use standalone. Migrate tests.

2021-05-26 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2021-05-26T10:03:17-07:00 New Revision: 694d8cbed06a8a809c34ae07f4e3e89ab252 URL: https://github.com/llvm/llvm-project/commit/694d8cbed06a8a809c34ae07f4e3e89ab252 DIFF: https://github.com/llvm/llvm-project/commit/694d8cbed06a8a809c34ae07f4e3e89ab252.diff

[PATCH] D102543: [Scudo] Make -fsanitize=scudo use standalone. Migrate tests.

2021-05-26 Thread Mitch Phillips via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG694d8cbe: [Scudo] Make -fsanitize=scudo use standalone. Migrate tests. (authored by hctim). Changed prior to commit: https://reviews.llvm.org/D102543?vs=347814&id=348011#toc Repository: rG LLVM G

[PATCH] D102779: [clang-tidy] cppcoreguidelines-explicit-constructor-and-conversion: new alias

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.cpp:28-30 + std::string FullOperatorName = + Node.getParent()->getNameAsString().append("::").append( + Node.getNameAsString()); Rather t

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek created this revision. Herald added a subscriber: xazax.hun. eddy-geek requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Fixes bug 35694 Adds option AutoTypeNameLength, defau

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek added a comment. I haven't been able to build locally so far -- OOM on my machine, not sure if I can do something lighter than: cmake -G Ninja -DLLVM_ENABLE_PROJECTS=clang\;clang-tools-extra -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2408 +``__builtin_sycl_unique_stable_name`` + + Underlines look off now, so this likely causes Sphinx warnings. Comment at: clang

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added inline comments. Comment at: clang/docs/SanitizerCoverage.rst:319 It is possible to disable coverage instrumentation for select functions via the -function attribute ``__attribute__((no_sanitize("coverage")))``. +functi

[PATCH] D103108: [CUDA][HIP] Promote const variables to constant

2021-05-26 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Sema/SemaCUDA.cpp:568 +} +// Check whether a variable has an allowed initializer for a CUDA device side +// variable with global storage. \p VD may be a host variable to be checked for Nit: add an empty line to sep

[clang] f7c5c0d - Revert "[Scudo] Make -fsanitize=scudo use standalone. Migrate tests."

2021-05-26 Thread Mitch Phillips via cfe-commits
Author: Mitch Phillips Date: 2021-05-26T10:50:26-07:00 New Revision: f7c5c0d87b8ae5e55006fd3a31994cd68d64f102 URL: https://github.com/llvm/llvm-project/commit/f7c5c0d87b8ae5e55006fd3a31994cd68d64f102 DIFF: https://github.com/llvm/llvm-project/commit/f7c5c0d87b8ae5e55006fd3a31994cd68d64f102.diff

[PATCH] D101868: [clang-format] Adds a formatter for aligning arrays of structs

2021-05-26 Thread Fred Grim via Phabricator via cfe-commits
feg208 updated this revision to Diff 348020. feg208 added a comment. Still need to fix and added the tests I said I would but the comment tests are added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101868/new/ https://reviews.llvm.org/D101868 F

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) aaron.ballman wrote: > I thin

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver updated this revision to Diff 348021. melver marked an inline comment as done. melver added a comment. s/Since/Because/ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103159/new/ https://reviews.llvm.org/D103159 Files: clang/docs/Sanitizer

[PATCH] D103157: Disable misc-no-recursion checking in Clang

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. I like this, since the entire CFE does a ton of recursion on purpose for all AST related things. Please give others time to disagree however :) Repository: rG LLVM Github Monorepo

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Miguel Ojeda via Phabricator via cfe-commits
ojeda added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) melver wrote: > aaron.ballman

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2413 +(or type of the expression) that is stable across split compilations, mainly to +support SYCL/Data Parallel C++ language. + rjmccall wrote: > The semantics here seem specific to

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348025. erichkeane marked 7 inline comments as done. erichkeane added a comment. Fix comments from aaron. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files: clang/docs/LanguageExtensions.rst cla

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Marco Elver via Phabricator via cfe-commits
melver added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) ojeda wrote: > melver wrote:

[PATCH] D103191: [OpenCL] Add support of __opencl_c_program_scope_global_variables feature macro

2021-05-26 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov created this revision. azabaznov added reviewers: Anastasia, svenvh. Herald added subscribers: ldrumm, yaxunl. azabaznov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.o

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348028. eddy-geek added a comment. Fix test build Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.c

[PATCH] D102820: [Clang] Check for returns_nonnull when deciding to add allocation null checks

2021-05-26 Thread Di Mo via Phabricator via cfe-commits
modimo added a comment. @rsmith @lebedev.ri thoughts on adding this directly to FE generation? As mentioned this isn't strictly needed and the BE can elide the check but we can also not emit it to save on AST/IR processing cost. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102820/new/

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348038. eddy-geek added a comment. Fix test output Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files: clang-tools-extra/clang-tidy/modernize/LoopConvertCheck.

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2443 + // Computes a unique stable name for the type of the given expression. + constexpr const char * __builtin_unique_stable_name( expression ); + These need to be updated for the r

[PATCH] D102663: Bug 49633 - Added warning for static inline global and namespaced declarations for c++17+

2021-05-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Should we also warn about `inline` variables in anonymous namespaces? Comment at: clang/lib/Sema/SemaDecl.cpp:7127 << FixItHint::CreateRemoval(D.getDeclSpec().getInlineSpecLoc()); +} else if (SC == SC_Static && DC->isFileContext() && +

[PATCH] D103159: [Clang] Enable __has_feature(coverage_sanitizer)

2021-05-26 Thread Miguel Ojeda via Phabricator via cfe-commits
ojeda added inline comments. Comment at: clang/include/clang/Basic/Features.def:52 LangOpts.Sanitize.hasOneOf(SanitizerKind::Undefined)) +FEATURE(coverage_sanitizer, LangOpts.SanitizeCoverage) FEATURE(assume_nonnull, true) melver wrote: > ojeda wrote: >

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2443 + // Computes a unique stable name for the type of the given expression. + constexpr const char * __builtin_unique_stable_name( expression ); + rjmccall wrote: > These need to

[PATCH] D103195: Add matchers for gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and EXPECT_CALL

2021-05-26 Thread Zhaomo Yang via Phabricator via cfe-commits
zhaomo created this revision. zhaomo added a reviewer: ymandel. Herald added a subscriber: mstorsjo. zhaomo requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds support for matching gtest's ASSERT_THAT, EXPECT_THAT, ON_CALL and

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348047. eddy-geek added a comment. *Trigger rebuild (windows failed to git clone)* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files: clang-tools-extra/clang-

[PATCH] D99675: [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level

2021-05-26 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 348046. mibintc retitled this revision from "RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level" to "[llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level". mibi

[PATCH] D101191: [InstCombine] Fully disable select to and/or i1 folding

2021-05-26 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. The issue I'm seeing seems more directly caused by SLP vectorization, as it goes away with `-fno-slp-vectorize`. This patch merely unblocks that bad optimization AFAICT. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1011

[PATCH] D100118: [clang] Add support for new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-05-26 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 348052. mibintc retitled this revision from "[clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens" to "[clang] Add support for new builtin __arithmetic_fence to control floating point

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348060. erichkeane added a comment. Remove 'expression' form per suggestion. Still need to do the device-mangling-number removal/rewrite business. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files

[PATCH] D103131: support debug info for alias variable

2021-05-26 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. In D103131#2780997 , @dblaikie wrote: > Looks like GCC emits aliases as a `DW_TAG_variable` without a location, not > as a `DW_TAG_imported_declaration` and marks it external; this works only because gdb will look up the ELF s

[PATCH] D103204: [Format] New BreakInheritanceList style AfterComma

2021-05-26 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. lichray requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This inheritance list style has been widely adopted by Symantec, a division of Broadcom Inc. It breaks after the commas that separate the base-specifiers

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348080. eddy-geek added a comment. *Trigger rebuild (windows failed to git clone)* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files: clang-tools-extra/clang

[PATCH] D103188: [clang-tidy] modernize-loop-convert: limit use of auto

2021-05-26 Thread Edward O via Phabricator via cfe-commits
eddy-geek updated this revision to Diff 348081. eddy-geek added a comment. *Trigger rebuild (windows failed to git clone)* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103188/new/ https://reviews.llvm.org/D103188 Files: clang-tools-extra/clang-

  1   2   >