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

2021-05-12 Thread Qiu Chaofan 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 rGfebbe4b5a0ab: [PowerPC] [Clang] Enable float128 feature on VSX targets (authored by qiucf). Changed prior to commit:

[clang] febbe4b - [PowerPC] [Clang] Enable float128 feature on VSX targets

2021-05-12 Thread Qiu Chaofan via cfe-commits
Author: Qiu Chaofan Date: 2021-05-12T14:33:41+08:00 New Revision: febbe4b5a0ab0cb6f8ada6cd1ead4bb1f565bda8 URL: https://github.com/llvm/llvm-project/commit/febbe4b5a0ab0cb6f8ada6cd1ead4bb1f565bda8 DIFF: https://github.com/llvm/llvm-project/commit/febbe4b5a0ab0cb6f8ada6cd1ead4bb1f565bda8.diff

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

2021-05-12 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons created this revision. malcolm.parsons added a reviewer: aaron.ballman. malcolm.parsons requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. string_view isn't experimental anymore. This check has always handled both

[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

[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

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

2021-05-12 Thread Xiang Zhang via Phabricator via cfe-commits
xiangzhangllvm added inline comments. Comment at: compiler-rt/test/hwasan/TestCases/Linux/vfork.c:7 -// Aliasing mode does not support stack tagging. -// XFAIL: x86_64 What does here XFAIL mean, do not test in x86_64 ? Repository: rG LLVM Github Monorepo

[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

[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 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

[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

[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

[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

[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

[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] 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/

[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] 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

[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

[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).

[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

[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 ___

[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.

[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] 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

[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)

[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

[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

[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

[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] 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 &&

[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

[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] 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

[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] 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,

[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

[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

[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

[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:

[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: > > >

[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=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

[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

[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

[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:

[PATCH] D102343: [clang][patch][FPEnv} Initialization of C++ globals not strictfp aware

2021-05-12 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:700 CurCodeDecl = D; - if (const auto *FD = dyn_cast_or_null(D)) -if (FD->usesSEHTry()) - CurSEHParent = FD; + const FunctionDecl *FD = dyn_cast_or_null(D); + if (FD &&

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

2021-05-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. @thakis if this is an issue for you, please revert; like you said, we can figure out the issues later. Looking at the warning you showed, we might want to consider suppressing that specific pattern, in addition to (or instead of?) suppressing it in system headers.

[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#2754495 , @NoQ wrote: > 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`

[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 <<

[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.

[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/

[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

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

2021-05-12 Thread Roman Lebedev via cfe-commits
Thanks! On Wed, May 12, 2021 at 8:56 PM Benjamin Kramer via cfe-commits wrote: > > > Author: Benjamin Kramer > Date: 2021-05-12T19:51:21+02:00 > New Revision: 1470b8587f6fdc357163c2258747b77ae9ad6d7a > > URL: > https://github.com/llvm/llvm-project/commit/1470b8587f6fdc357163c2258747b77ae9ad6d7a

[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: > > hoy wrote: > > > aaron.ballman wrote: > > > > dblaikie

[PATCH] D100388: [BROKEN][clang] Try to fix thunk function types

2021-05-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D100388#2754872 , @efriedma wrote: >> Would it be reasonable to instead start with a stopgap measure of not adding >> attributes for this/return of thunks? > > You mean, add align attributes to "this" on regular methods,

[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

[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

[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,

[PATCH] D102343: [clang][patch][FPEnv} Initialization of C++ globals not strictfp aware

2021-05-12 Thread Melanie Blower via Phabricator via cfe-commits
mibintc created this revision. mibintc added reviewers: kpn, rjmccall, aaron.ballman, pcc. Herald added a subscriber: martong. Herald added a reviewer: shafik. mibintc requested review of this revision. Herald added a project: clang. In the proposed patch https://reviews.llvm.org/D81178 @kpn

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

2021-05-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added inline comments. Comment at: clang/include/clang/AST/EvaluatedExprVisitor.h:37 + // 'constexpr-if'. + bool shouldVisitDiscardedCase() const { return true; } #define PTR(CLASS) typename Ptr::type Maybe

[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. If this is a problem for you, please revert it and I will take a look when I return. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98798/new/ https://reviews.llvm.org/D98798

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, looks good. Sorry for the delay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99543/new/ https://reviews.llvm.org/D99543

[PATCH] D100388: [BROKEN][clang] Try to fix thunk function types

2021-05-12 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Would it be reasonable to instead start with a stopgap measure of not adding > attributes for this/return of thunks? You mean, add align attributes to "this" on regular methods, but not thunks? I can't see how that could do any harm. Comment at:

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

2021-05-12 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/lib/Frontend/DependencyFile.cpp:145 + StringRef SearchPath; +#ifdef _WIN32 + // Make the search insensitive to case and separators. I feel like this should somehow be a property of the input virtual filesystem: we

[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.,

[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

[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

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

2021-05-12 Thread Yuanfang Chen via Phabricator via cfe-commits
ychen added a comment. Looks good except for one suggestion and the patch need rebasing on an upstream commit. Comment at: llvm/include/llvm/IR/LLVMContext.h:300 + /// with "warning: " and should not end with a ".". + void emitWarning(unsigned LocCookie, const Twine ); +

[PATCH] D100388: [BROKEN][clang] Try to fix thunk function types

2021-05-12 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 344877. lebedev.ri marked 2 inline comments as done. lebedev.ri added a comment. In D100388#2749115 , @efriedma wrote: > Made a couple suggestions to make this easier to review. > > The test changes you've made so

[PATCH] D89177: [cmake] Add support for multiple distributions

2021-05-12 Thread Shoaib Meenai 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 rG56f7e5a822b4: [cmake] Add support for multiple distributions (authored by smeenai). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] 56f7e5a - [cmake] Add support for multiple distributions

2021-05-12 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2021-05-12T11:13:18-07:00 New Revision: 56f7e5a822b43578e086c40d063af2a2c0d214ee URL: https://github.com/llvm/llvm-project/commit/56f7e5a822b43578e086c40d063af2a2c0d214ee DIFF: https://github.com/llvm/llvm-project/commit/56f7e5a822b43578e086c40d063af2a2c0d214ee.diff

[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

[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] 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

[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

[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 >

[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: > > > > >

[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] 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

[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

[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

[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:

[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:

[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:

[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

[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(.bind("declRef"); +

[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] 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

[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:

[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: >

[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] 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

[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:

[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] 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

  1   2   >