[PATCH] D99646: [clang-tidy] misc-avoid-std-io-outside-main: a new check

2021-05-12 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann updated this revision to Diff 344692. mgartmann added a comment. Revert `ReleaseNotes.rst` to its initial content in a try to fix the pre-build tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99646/new/ https://reviews.llvm.org/D996

[PATCH] D102280: [analyzer] Engine: fix crash with SEH __leave keyword

2021-05-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added reviewers: NoQ, vsavchenko, steakhal. steakhal added a comment. Please, add these reviewers for your upcoming [analyzer] patches. Inline a couple of nits. Nice to see some fixes for visual c++ stuff. Comment at: clang/lib/StaticAnalyzer/Core/CoreEngine.cpp:352

[PATCH] D99646: [clang-tidy] misc-avoid-std-io-outside-main: a new check

2021-05-12 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann updated this revision to Diff 344711. mgartmann added a comment. Re-add description for this check in `ReleaseNotes.rst`. Adjust `AvoidStdIoOutsideMainCheck.cpp` third matcher to call `hasAnyName()` with a vector. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION http

[PATCH] D102213: [ASTMatchers] Add forCallable(), a generalization of forFunction().

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. I honestly don't see a reason why it's not a part of `forFunction`. `forFunction` matches C++ methods and lambdas, Obj-C methods and blocks don't seem that much more special to have an extended matcher just for those. I really don't think that it will break someone's

[PATCH] D102303: [ASTMatchers] Fix formatting around forFunction().

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko accepted this revision. vsavchenko added a comment. This revision is now accepted and ready to land. It always pleases me when more code becomes compliant to our style guides. Thanks! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102303/n

[PATCH] D102294: [clang-tidy] bugprone-infinite-loop: React to ObjC ivars and messages in condition.

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Tests look thorough, it should only reduce the number of warnings and should only affect Obj-C. So, I'd say that it's safe and sound! Great job! Comment at: clang-tools-extra/clang-tidy/bugprone/InfiniteLoopCheck.cpp:64-66 + } else if (isa(Cond) ||

[clang] cbd93ce - Revert "[PowerPC] [Clang] Enable float128 feature on VSX targets"

2021-05-12 Thread Qiu Chaofan via cfe-commits
Author: Qiu Chaofan Date: 2021-05-12T16:51:52+08:00 New Revision: cbd93cee9bf014402a7405479ba21f6f3340a126 URL: https://github.com/llvm/llvm-project/commit/cbd93cee9bf014402a7405479ba21f6f3340a126 DIFF: https://github.com/llvm/llvm-project/commit/cbd93cee9bf014402a7405479ba21f6f3340a126.diff L

[PATCH] D99646: [clang-tidy] misc-avoid-std-io-outside-main: a new check

2021-05-12 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann updated this revision to Diff 344726. mgartmann added a comment. Remove any parentheses and slashes from the check's section in `ReleaseNotes.rst` in order to try to fix the build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99646/new/

[PATCH] D99646: [clang-tidy] misc-avoid-std-io-outside-main: a new check

2021-05-12 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann updated this revision to Diff 344731. mgartmann added a comment. Remove text from `ReleaseNotes.rst` to narrow down the cause for the failing build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99646/new/ https://reviews.llvm.org/D99646

[PATCH] D102273: [analyzer] LoopUnrolling: fix crash when a loop counter is captured in a lambda by reference

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. Great job on the patch! Thanks! Comment at: clang/lib/StaticAnalyzer/Core/LoopUnrolling.cpp:166-167 -static bool isPossiblyEscaped(const VarDecl *VD, ExplodedNode *N) { +static bool isCapturedByReference(const VarDecl *VD, ExplodedNode *N, +

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D99260#2751967 , @steakhal wrote: > In D99260#2704102 , @NoQ wrote: > >> In https://bugs.llvm.org/show_bug.cgi?id=45786 the godbolt link shows that >> there are still problems with `a

[PATCH] D102322: [clang-tidy] Add '-target' CLI option to override target triple

2021-05-12 Thread Georgy Komarov via Phabricator via cfe-commits
jubnzv created this revision. jubnzv added a project: clang-tools-extra. Herald added subscribers: kbarton, xazax.hun, nemanjai. jubnzv requested review of this revision. The added option allows the user to specify the target for which //clang-tidy// checks will be executed. This is necessary for

[PATCH] D102322: [clang-tidy] Add '-target' CLI option to override target triple

2021-05-12 Thread Georgy Komarov via Phabricator via cfe-commits
jubnzv updated this revision to Diff 344758. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102322/new/ https://reviews.llvm.org/D102322 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp clang-tools-extra/clang-tidy/ClangTidy.h clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp

[PATCH] D102065: [AMDGPU][OpenMP] Emit textual IR for -emit-llvm -S

2021-05-12 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal updated this revision to Diff 344763. pdhaliwal added a comment. Fixed the if-else logic Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102065/new/ https://reviews.llvm.org/D102065 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/te

[PATCH] D102065: [AMDGPU][OpenMP] Emit textual IR for -emit-llvm -S

2021-05-12 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added a comment. Tested on gfx906. The libomptarget tests are working as expected. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102065/new/ https://reviews.llvm.org/D102065 ___ cfe-commits mai

[PATCH] D99439: Update @llvm.powi to handle different int sizes for the exponent

2021-05-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Seems reasonable. I'd like to see a test for autoupgrade; not sure if you need to make any code changes for that. Comment at: llvm/docs/LangRef.rst:13282 +to one of the ``__powi*`` functions in compiler-rt. Not all targets support all types however.

[PATCH] D92815: [PowerPC] [Clang] Enable float128 feature on VSX targets

2021-05-12 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. Looks like this is causing failures at https://lab.llvm.org/buildbot/#/builders/76/builds/2422 Please revert. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92815/new/ https://reviews.llvm.org/D92815 _

[PATCH] D99439: Update @llvm.powi to handle different int sizes for the exponent

2021-05-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. What about IR backward compatibility? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99439/new/ https://reviews.llvm.org/D99439 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D99439: Update @llvm.powi to handle different int sizes for the exponent

2021-05-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/test/Transforms/InstCombine/pow_fp_int16.ll:3 -; PR42190 +; Test case was copied from pow_fp_int.ll but adjusted for 16-bit int. +; Assuming that we can't generate test checks for the same reason (PR42740). Preco

[PATCH] D92815: [PowerPC] [Clang] Enable float128 feature on VSX targets

2021-05-12 Thread Qiu Chaofan via Phabricator via cfe-commits
qiucf added a comment. In D92815#2753684 , @nemanjai wrote: > Looks like this is causing failures at > https://lab.llvm.org/buildbot/#/builders/76/builds/2422 > Please revert. Yes. Already reverted in https://reviews.llvm.org/rGcbd93cee9bf014402a7405479

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

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:147 +/// where N = size(LHS), M = size(RHS) +RangeSet unite(RangeSet Original, RangeSet RHS); +/// Create a new set by uniting gi

[PATCH] D102313: [docs] Fix documentation for bugprone-dangling-handle

2021-05-12 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, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102313/new/ https://reviews.llvm.org/D102313

[PATCH] D102303: [ASTMatchers] Fix formatting around forFunction().

2021-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thanks for the cleanup! Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102303/new/ https://reviews.llvm.org/D102303 ___ cfe-commit

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

2021-05-12 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @vsavchenko Thanka for the suggestions! I'll take them into account and update the patch. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:250 +/// guarantee this. +ContainerType unite(const Con

[PATCH] D101519: [C++4OpenCL] Fix reinterpret_cast of vectors

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaCast.cpp:2333 + if (DestType->isExtVectorType() || SrcType->isExtVectorType()) { +// FIXME: Allow for reinterpret cast between 3 and 4 element vectors +if (Self.areVectorTypesSameSize(SrcType, De

[PATCH] D102273: [analyzer] LoopUnrolling: fix crash when a loop counter is captured in a lambda by reference

2021-05-12 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. By checking the line coverage of the `LoopUnrolling.cpp` test file, looks like all lines are covered you touched. There are only two return statements uncovered though: L200, L251. We should consider extending this test file to cover them as well in a follow-up patch.

[clang-tools-extra] 1633250 - [clang-tidy] Enable the use of IgnoreArray flag in pro-type-member-init rule

2021-05-12 Thread Nathan James via cfe-commits
Author: Hana Joo Date: 2021-05-12T12:57:21+01:00 New Revision: 163325086c35b3984c5e6f7a2adb6022003fcd84 URL: https://github.com/llvm/llvm-project/commit/163325086c35b3984c5e6f7a2adb6022003fcd84 DIFF: https://github.com/llvm/llvm-project/commit/163325086c35b3984c5e6f7a2adb6022003fcd84.diff LOG:

[PATCH] D101239: [clang-tidy] Enable the use of IgnoreArray flag in pro-type-member-init rule

2021-05-12 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG163325086c35: [clang-tidy] Enable the use of IgnoreArray flag in pro-type-member-init rule (authored by h-joo, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D102216: [Clang][docs]JSONLinkDatabase

2021-05-12 Thread Mirzazyanov Gleb via Phabricator via cfe-commits
Glebuska updated this revision to Diff 344773. Glebuska added a comment. Updating D102216 : [Clang][docs]JSONLinkDatabase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102216/new/ https://reviews.llvm.org/D102216

[PATCH] D97915: [Coroutines] Handle overaligned frame allocation

2021-05-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/AST/StmtCXX.h:356-359 Expr *Allocate = nullptr; Expr *Deallocate = nullptr; +Expr *AlignedAllocate = nullptr; +Expr *AlignedDeallocate = nullptr; Can't we merge these? ==

[PATCH] D102322: [clang-tidy] Add '-target' CLI option to override target triple

2021-05-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. This change doesn't seem to accomplish anything. We can already set the target via the compile command. This can be done in the compilation database directly or by using the `extra-arg` and `extra-arg-before` command line arguments. If you're not using a compilation dat

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:12643 + if (CXXRecordDecl *RD = Var->getType()->getAsCXXRecordDecl()) { +for (auto *ctor : RD->ctors()) { + if (ctor->isConstexpr() && ctor->getNumParams() == 0 && ctor

[PATCH] D102213: [ASTMatchers] Add forCallable(), a generalization of forFunction().

2021-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D102213#2753388 , @vsavchenko wrote: > I honestly don't see a reason why it's not a part of `forFunction`. > `forFunction` matches C++ methods and lambdas, Obj-C methods and blocks don't > seem that much more special

[clang-tools-extra] 4c59ab3 - [clang-tidy][NFC] Simplify a lot of bugprone-sizeof-expression matchers

2021-05-12 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2021-05-12T13:18:41+01:00 New Revision: 4c59ab34f7bda74296e42ef7ea8d83828cb45558 URL: https://github.com/llvm/llvm-project/commit/4c59ab34f7bda74296e42ef7ea8d83828cb45558 DIFF: https://github.com/llvm/llvm-project/commit/4c59ab34f7bda74296e42ef7ea8d83828cb45558.diff

[PATCH] D101614: [clang-tidy][NFC] Simplify a lot of bugprone-sizeof-expression matchers

2021-05-12 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4c59ab34f7bd: [clang-tidy][NFC] Simplify a lot of bugprone-sizeof-expression matchers (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D102306: Add gfx1034

2021-05-12 Thread Jay Foad via Phabricator via cfe-commits
foad added a comment. Can you also check for updates in: clang/lib/Basic/Cuda.cpp openmp/libomptarget/plugins/amdgpu/impl/get_elf_mach_gfx_name.cpp llvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll llvm/test/tools/llvm-objdump/ELF/AMDGPU/subtarget.ll llvm/test/tools/llvm-readobj/ELF/amdgpu-elf-h

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + dblaikie wrote: > hoy wrote: > > dblaikie wrote: > > > hoy wrote: > > > > dblaikie wrote: > > >

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

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h:250 +/// guarantee this. +ContainerType unite(const ContainerType &LHS, const ContainerType &RHS); ASDenysPetrov wrote: > vsav

[PATCH] D100976: [OpenCL] Simplify use of C11 atomic types

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 344781. Anastasia added a comment. Added a comment in the test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100976/new/ https://reviews.llvm.org/D100976 Files: clang/lib/Sema/Sema.cpp clang/test/Parser/opencl-atomics-cl20.cl Index: clang/

[PATCH] D100976: [OpenCL] Simplify use of C11 atomic types

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: clang/test/Parser/opencl-atomics-cl20.cl:12 void atomic_types_test() { -// OpenCL v2.0 s6.13.11.6 defines supported atomic types. + // OpenCL v2.0 s6.13.11.6 defines supported atomic types.

[PATCH] D101843: [OpenCL] Add clang extension for bitfields

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 344784. Anastasia added a comment. Added suggestions from Sven. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101843/new/ https://reviews.llvm.org/D101843 Files: clang/docs/LanguageExtensions.rst clang/include/clang/Basic/OpenCLExtensions.def

[PATCH] D101843: [OpenCL] Add clang extension for bitfields

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:16798 } // OpenCL v1.2 s6.9.c: bitfields are not supported. +if (BitWidth && !getOpenCLOptions().isAvailableOption( svenvh wrote: > Slightly modified to avoid repeating the ex

[PATCH] D102064: Parse vector bool when stdbool.h and altivec.h are included

2021-05-12 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 344785. ZarkoCA added a comment. - Rename test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102064/new/ https://reviews.llvm.org/D102064 Files: clang/include/clang/Parse/Parser.h clang/lib/Parse/ParseDecl

[PATCH] D102251: Suppress Deferred Diagnostics in discarded statements.

2021-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/Stmt.cpp:1000-1003 + if (Optional Result = + const_cast(this)->getNondiscardedCase(Ctx)) +return *Result; + return None; rsmith wrote: > Can this simply be > ``` > return const_cast(this

[PATCH] D99683: [HIP] Support ThinLTO

2021-05-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added a comment. In D99683#2744764 , @yaxunl wrote: > In D99683#2683308 , @tejohnson wrote: > >> To do what I suggested in the prior comment, you'd probably want to add a >> new index-wide flag (since we

[PATCH] D102325: [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check

2021-05-12 Thread Marco Gartmann via Phabricator via cfe-commits
mgartmann created this revision. mgartmann added reviewers: aaron.ballman, njames93, alexfh. mgartmann added a project: clang-tools-extra. Herald added subscribers: shchenz, kbarton, xazax.hun, mgorny, nemanjai. mgartmann requested review of this revision. Finds base classes and structs whose dest

[PATCH] D102238: [TableGen] [Clang] Clean up arm_mve.td file

2021-05-12 Thread Paul C. Anagnostopoulos via Phabricator via cfe-commits
Paul-C-Anagnostopoulos updated this revision to Diff 344809. Paul-C-Anagnostopoulos added a comment. The arm_*.inc files do not change with this revision. I removed the commented-out code. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102238/new/ https://reviews.llvm.org/D102238 Files

[PATCH] D95976: [OpenMP] Simplify offloading parallel call codegen

2021-05-12 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/generated_microtask_cases.gen:1 +case 0: +((void (*)(kmp_int32 *, kmp_int32 * This is not very pretty. Why do we need runtime dispatch to a function pointer? Repository:

[PATCH] D102238: [TableGen] [Clang] Clean up arm_mve.td file

2021-05-12 Thread Paul C. Anagnostopoulos via Phabricator via cfe-commits
Paul-C-Anagnostopoulos updated this revision to Diff 344810. Paul-C-Anagnostopoulos added a comment. One must amend the commit when one makes changes to the files. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102238/new/ https://reviews.llvm.org/D102238 Files: clang/include/clang/Ba

[PATCH] D102238: [TableGen] [Clang] Clean up arm_mve.td file

2021-05-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: clang/include/clang/Basic/arm_mve.td:1532 // // So this foldl expression implements what you'd write in Python as // [srctype for srctype in T.All if srctype != desttype] If you've removed my unreadable `fo

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2021-05-12 Thread Felix Berger via Phabricator via cfe-commits
flx added a comment. Could someone take a look at this patch? Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97567/new/ https://reviews.llvm.org/D97567 ___ cfe-commits mailing list cfe-commits@

[PATCH] D99683: [HIP] Support ThinLTO

2021-05-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:496 dbgs() << "ignored! No qualifying callee with summary found.\n"); continue; } tejohnson wrote: > Probabl

[PATCH] D102325: [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check

2021-05-12 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualBaseClassDestructorCheck.cpp:38 + + const auto Destructor = MatchedClassOrStruct->getDestructor(); + Please don't use auto unless type is spelled in same sta

[PATCH] D102238: [TableGen] [Clang] Clean up arm_mve.td file

2021-05-12 Thread Paul C. Anagnostopoulos via Phabricator via cfe-commits
Paul-C-Anagnostopoulos added inline comments. Comment at: clang/include/clang/Basic/arm_mve.td:1532 // // So this foldl expression implements what you'd write in Python as // [srctype for srctype in T.All if srctype != desttype] simon_tatham wrote: > If

[clang] 892c56e - [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-05-12 Thread Ben Shi via cfe-commits
Author: Ben Shi Date: 2021-05-12T22:05:26+08:00 New Revision: 892c56eabe250acaeb761eaddf783f47d95f7f4d URL: https://github.com/llvm/llvm-project/commit/892c56eabe250acaeb761eaddf783f47d95f7f4d DIFF: https://github.com/llvm/llvm-project/commit/892c56eabe250acaeb761eaddf783f47d95f7f4d.diff LOG:

[PATCH] D100701: [clang][AVR] Redefine some types to be compatible with avr-gcc

2021-05-12 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG892c56eabe25: [clang][AVR] Redefine some types to be compatible with avr-gcc (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100701/ne

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-12 Thread Ole Strohm via Phabricator via cfe-commits
olestrohm added inline comments. Comment at: clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp:36 + Z() __local = default; + Z() __global = default; + constexpr Z() __constant : z(0) {} Anastasia wrote: > We seem to be missing the coverage with __constant

[PATCH] D102251: Suppress Deferred Diagnostics in discarded statements.

2021-05-12 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 344813. erichkeane added a comment. Moved `IfStmt`/discarded case logic to ExprEvaluatorBase per @rsmith 's suggestion. This is the 'highest' in the tree that has a `Sema`/`ASTContext` reference, so anything 'higher' in the tree would be higher touch. @r

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

2021-05-12 Thread Philipp Krones via Phabricator via cfe-commits
flip1995 marked an inline comment as done. flip1995 added inline comments. Comment at: clang/tools/driver/cc1as_main.cpp:407 - MOFI->initMCObjectFileInfo(Ctx, PIC); + // FIXME: This is not pretty. MCContext has a ptr to MCObjectFileInfo and + // MCObjectFileInfo needs a MCCo

[PATCH] D99683: [HIP] Support ThinLTO

2021-05-12 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: llvm/lib/Transforms/IPO/FunctionImport.cpp:496 dbgs() << "ignored! No qualifying callee with summary found.\n"); continue; } yaxunl wrote: > tejohnson wrote: > > Probably better to issue an

[PATCH] D102244: [llvm][AsmPrinter] Restore source location to register clobber warning

2021-05-12 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett updated this revision to Diff 344821. DavidSpickett added a comment. Herald added a subscriber: dexonsmith. - Report via LLVMContext Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102244/new/ https://reviews.llvm.org/D102244 Files:

[PATCH] D102168: Use an allow list on reserved macro identifiers

2021-05-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 344825. serge-sans-paille added a comment. Minor nits as suggested by reviewers + extend the list. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102168/new/ https://reviews.llvm.org/D102168 Files: clang/lib/Lex/PPDirectives.cpp clang/

[PATCH] D95976: [OpenMP] Simplify offloading parallel call codegen

2021-05-12 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/generated_microtask_cases.gen:1 +case 0: +((void (*)(kmp_int32 *, kmp_int32 * JonChesterfield wrote: > This is not very pretty. Why do we need runtime dispatch to a function > po

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Two pieces of feedback: 1. This fires in system headers on windows, e.g. like so: ../../third_party/wtl/include\./atlapp.h(336,12): error: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Werror,-Wnull-pointer-arithmeti

[clang] 9857570 - [CUDA][HIP] Fix device template variables

2021-05-12 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2021-05-12T11:13:29-04:00 New Revision: 98575708da9544ccab8939fece9c3d638a32f09f URL: https://github.com/llvm/llvm-project/commit/98575708da9544ccab8939fece9c3d638a32f09f DIFF: https://github.com/llvm/llvm-project/commit/98575708da9544ccab8939fece9c3d638a32f09f.dif

[PATCH] D102237: [CUDA][HIP] Fix non-ODR-use of static device variable

2021-05-12 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rG98575708da95: [CUDA][HIP] Fix device template variables (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D1

[PATCH] D102325: [clang-tidy] cppcoreguidelines-virtual-base-class-destructor: a new check

2021-05-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. Whats the intended behaviour for derived classes and their destructors? Can test be added to demonstrate that behaviour? Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualBaseClassDestructorCheck.cpp:44 + "making it public and

[PATCH] D102248: [C++4OpenCL] Fix initialization of __constant constructors without arguments

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/SemaOpenCLCXX/addrspace-constructors.clcpp:36 + Z() __local = default; + Z() __global = default; + constexpr Z() __constant : z(0) {} olestrohm wrote: > Anastasia wrote: > > We seem to be missing the cove

[clang] 58d18dd - [OpenCL] Remove pragma requirement from Arm dot extension.

2021-05-12 Thread Anastasia Stulova via cfe-commits
Author: Anastasia Stulova Date: 2021-05-12T16:25:33+01:00 New Revision: 58d18dde5cca3417e3d52670775c95d2f6fe9d05 URL: https://github.com/llvm/llvm-project/commit/58d18dde5cca3417e3d52670775c95d2f6fe9d05 DIFF: https://github.com/llvm/llvm-project/commit/58d18dde5cca3417e3d52670775c95d2f6fe9d05.d

[PATCH] D100985: [OpenCL] Remove pragma requirement for functions from Arm dot extension

2021-05-12 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG58d18dde5cca: [OpenCL] Remove pragma requirement from Arm dot extension. (authored by Anastasia). Herald added a subscriber: ldrumm. Herald added a p

[PATCH] D97567: [clang-tidy] performance-* checks: Also allow allow member expressions to be used in a const manner.

2021-05-12 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM, but with a very minor nit. Comment at: clang-tools-extra/clang-tidy/utils/DeclRefExprUtils.cpp:49 declRefExpr(to(varDecl(equalsNode(&VarDecl.bind("declRe

[PATCH] D102288: [HWASan] Add -fsanitize=lam flag and enable HWASan to use it.

2021-05-12 Thread Matt Morehouse via Phabricator via cfe-commits
morehouse added inline comments. Comment at: clang/include/clang/Basic/Sanitizers.def:55-59 +// Utilize Intel LAM in sanitizers. Currently only used in combination with +// -fsanitize=hwaddress. This is an experimental flag which may be removed in +// the future. +// TODO: Use

[PATCH] D102261: Introduce SYCL 2020 mode

2021-05-12 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. My bad. My last comment: LangOptions::SYCL::Ver2017 LangOptions::SYCL_2017 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102261/new/ https://reviews.llvm.org/D102261 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D102168: Use an allow list on reserved macro identifiers

2021-05-12 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 344840. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102168/new/ https://reviews.llvm.org/D102168 Files: clang/lib/Lex/PPDirectives.cpp clang/test/Preprocessor/macro-reserved.c Index: clang/test/Preprocessor/macro-reserved.c

[PATCH] D102261: Introduce SYCL 2020 mode

2021-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D102261#2754289 , @tschuett wrote: > My bad. My last comment: > > LangOptions::SYCL::Ver2017 > LangOptions::SYCL_2017 To me, those convey the same amount of information, so the use of the scoped enum doesn't get us

[clang-tools-extra] 5389a05 - [docs] Fix documentation for bugprone-dangling-handle

2021-05-12 Thread Malcolm Parsons via cfe-commits
Author: Malcolm Parsons Date: 2021-05-12T17:20:15+01:00 New Revision: 5389a05836e74e3acab6dbda7e80ea43e3bc6304 URL: https://github.com/llvm/llvm-project/commit/5389a05836e74e3acab6dbda7e80ea43e3bc6304 DIFF: https://github.com/llvm/llvm-project/commit/5389a05836e74e3acab6dbda7e80ea43e3bc6304.dif

[PATCH] D102313: [docs] Fix documentation for bugprone-dangling-handle

2021-05-12 Thread Malcolm Parsons via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5389a05836e7: [docs] Fix documentation for bugprone-dangling-handle (authored by malcolm.parsons). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102313/new/

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-05-12 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + aaron.ballman wrote: > dblaikie wrote: > > hoy wrote: > > > dblaikie wrote: > > > > hoy wrote: > > > > > d

[PATCH] D70401: [WIP][RISCV] Implement ilp32e ABI

2021-05-12 Thread Alex Bradbury via Phabricator via cfe-commits
asb added a comment. In D70401#2733003 , @khchen wrote: > Hi, I would like to add ilp32e ABI support in llvm > Is there anyone working on this? > It seem the one thing missed is ilp32e ABI should disallow D ISA extension. > Is there anything else? Nobody

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-05-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + hoy wrote: > aaron.ballman wrote: > > dblaikie wrote: > > > hoy wrote: > > > > dblaikie wrote: >

[PATCH] D102134: [docs]Updated the AMD GPU Attributes documentation

2021-05-12 Thread Shivam Gupta via Phabricator via cfe-commits
xgupta resigned from this revision. xgupta added a comment. I am really an idol reviewer for this patch -:) don't know anything about AMDGPU. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102134/new/ https://reviews.llvm.org/D102134 _

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Jamie Schmeiser via Phabricator via cfe-commits
jamieschmeiser added a comment. @thakis, I have some questions about your comments. Are you sure this is coming from a system header? The path that you gave has third_party as a directory in the path. If the warning were being triggered by code in a system header, I would have expected it to f

[PATCH] D98799: [UniqueLinkageName] Use consistent checks when mangling symbo linkage name and debug linkage name.

2021-05-12 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang/test/CodeGen/unique-internal-linkage-names-dwarf.c:34-39 +static int go(a) int a; +{ + return glob + a; +} + + aaron.ballman wrote: > hoy wrote: > > aaron.ballman wrote: > > > dblaikie wrote: > > > > hoy wrote: > > >

[PATCH] D102213: [ASTMatchers] Add forCallable(), a generalization of forFunction().

2021-05-12 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I totally agree that changing `forFunction()` to work correctly is the right solution but backwards compatibility breakage is very real because `forFunction()` accepts a `Matcher` whereas `forCallable()` accepts `Matcher` which is a smaller set of matchers. Eg., `forFuncti

[PATCH] D102270: [CUDA][HIP] Fix device template variables

2021-05-12 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:17145 }; -if (Var && Var->hasGlobalStorage() && !IsEmittedOnDeviceSide(Var)) { - SemaRef.targetDiag(Loc, diag::err_ref_bad_target) - << /*host*/ 2 << /*variable*/

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2021-05-12 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I think the best method is to In D86671#2750957 , @dougpuob wrote: > Hi @njames93: > Could you do me a favor? Because it is my first patch, something I'm not > sure. I'm confused about can I land this patch now? I read the "LLVM

[PATCH] D101139: Create install targets for scan-build-py.

2021-05-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: clang/tools/scan-build-py/CMakeLists.txt:1-7 +set (BinFiles + "analyze-build" + "analyze-c++" + "analyze-cc" + "intercept-build" + "intercept-c++" + "intercept-cc") Shouldn't this list also contain

[PATCH] D102337: [clang-tidy] Fix test that requires Windows platofrm

2021-05-12 Thread Georgy Komarov via Phabricator via cfe-commits
jubnzv created this revision. jubnzv added reviewers: aaron.ballman, njames93. jubnzv added a project: clang-tools-extra. Herald added subscribers: kbarton, xazax.hun, nemanjai. jubnzv requested review of this revision. This commit fixes the `cppcoreguidelines-pro-type-vararg` test when it runs o

[clang] 3bf1aca - [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-12 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2021-05-12T10:34:31-07:00 New Revision: 3bf1acab5b454ad7fb2074b34663108b53620695 URL: https://github.com/llvm/llvm-project/commit/3bf1acab5b454ad7fb2074b34663108b53620695 DIFF: https://github.com/llvm/llvm-project/commit/3bf1acab5b454ad7fb2074b34663108b53620695.diff

[PATCH] D102090: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions

2021-05-12 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3bf1acab5b45: [CMake][ELF] Add -fno-semantic-interposition and -Bsymbolic-functions (authored by MaskRay). Changed prior to commit: https://reviews.llvm.org/D102090?vs=343758&id=344866#toc Repository:

[PATCH] D102322: [clang-tidy] Add '-target' CLI option to override target triple

2021-05-12 Thread Georgy Komarov via Phabricator via cfe-commits
jubnzv abandoned this revision. jubnzv added a comment. Thank you, I didn't know that it is possible to set the target triple using `--extra-arg`. I created a new revision with this fix: https://reviews.llvm.org/D102337. For some reasons, the `--target=unknown-windows` doesn't work for me with t

[clang] 81f56a2 - [NFC][clang][Codegen] Split ThunkInfo into it's own header

2021-05-12 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2021-05-12T20:39:54+03:00 New Revision: 81f56a2eb3797eb5be61d65a8f7d7e19456e67d1 URL: https://github.com/llvm/llvm-project/commit/81f56a2eb3797eb5be61d65a8f7d7e19456e67d1 DIFF: https://github.com/llvm/llvm-project/commit/81f56a2eb3797eb5be61d65a8f7d7e19456e67d1.diff

[clang] 2d84195 - [NFCI][clang][Codegen] CodeGenVTables::addVTableComponent(): use getGlobalDecl

2021-05-12 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2021-05-12T20:39:54+03:00 New Revision: 2d84195d60b0cb5ea43b18ab8f6770a84bf32da4 URL: https://github.com/llvm/llvm-project/commit/2d84195d60b0cb5ea43b18ab8f6770a84bf32da4 DIFF: https://github.com/llvm/llvm-project/commit/2d84195d60b0cb5ea43b18ab8f6770a84bf32da4.diff

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D98798#2754449 , @jamieschmeiser wrote: > @thakis, I have some questions about your comments. > Are you sure this is coming from a system header? The path that you gave has > third_party as a directory in the path. Yes. `thir

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. (sorry, accidentally hit cmd-enter, not actually done writing) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798 ___ cfe-commits mailing lis

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. You dont have to use -Wno-… You can use pragma to disable this warning for certain location in the code. -1 for revert just because of this reason. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews

[PATCH] D98798: Produce warning for performing pointer arithmetic on a null pointer.

2021-05-12 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. (Now completed the reply, see phab.) In D98798#2754635 , @xbolva00 wrote: > You dont have to use -Wno-… > > You can use pragma to disable this warning for certain location in the code, > eg include of commctrl.h. commctrl.h is in

[PATCH] D102338: [Sema] Always search the full function scope context if a potential availability violation is encountered

2021-05-12 Thread Logan Smith via Phabricator via cfe-commits
logan-5 created this revision. logan-5 added reviewers: erik.pilkington, rsmith, arphaman. logan-5 added a project: clang. logan-5 requested review of this revision. Herald added a subscriber: cfe-commits. Always search the full function scope context if a potential availability violation is enco

[clang] 1470b85 - Remove AST inclusion from Basic include

2021-05-12 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2021-05-12T19:51:21+02:00 New Revision: 1470b8587f6fdc357163c2258747b77ae9ad6d7a URL: https://github.com/llvm/llvm-project/commit/1470b8587f6fdc357163c2258747b77ae9ad6d7a DIFF: https://github.com/llvm/llvm-project/commit/1470b8587f6fdc357163c2258747b77ae9ad6d7a.dif

[PATCH] D102339: [clang] On Windows, ignore case and separators when discarding duplicate dependency file paths.

2021-05-12 Thread Sylvain Audi via Phabricator via cfe-commits
saudi created this revision. saudi added reviewers: rnk, thakis, dexonsmith, Bigcheese. saudi added a project: clang. saudi requested review of this revision. Herald added a subscriber: cfe-commits. We noticed that the dependency collectors of `clang` may report duplicate paths under Windows, whe

  1   2   >