[PATCH] D8467: C++14: Disable sized deallocation by default due to ABI breakage

2021-10-28 Thread Zixuan Wu via Phabricator via cfe-commits
zixuan-wu added a comment. Herald added a subscriber: dang. Hi, I am wondering could -fsized-deallocation this be enabled by default nowadays in 2021? Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D8467/new/ https://reviews.llvm.org/D8467

[PATCH] D112646: [clang-tidy] Add `readability-container-contains` check

2021-10-28 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D112646#3092619 , @whisperity wrote: > @xazax.hun I think you did something similar wrt. `empty()`, right? Could you > take a look at this? The idea looks good to me. The module also sounds right. If we want to follow

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-10-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D111797: [clang][scan-build] Use uname -s to detect the operating system.

2021-10-28 Thread Brad Smith via Phabricator via cfe-commits
brad added a comment. Oh, and you would have to use chomp to eliminate the newline character. Never mind. That's kind of ugly. Maybe it is better to go back to the original diff. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111797/new/ https://reviews.llvm.org/D111797

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Félix Cloutier 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 rG6a5f7437720e: format_arg attribute should allow instancetype in NSString definition (authored by fcloutier). Repository: rG LLVM Github Monorepo

[clang] 6a5f743 - format_arg attribute should allow instancetype in NSString definition

2021-10-28 Thread Félix Cloutier via cfe-commits
Author: Félix Cloutier Date: 2021-10-28T20:25:00-07:00 New Revision: 6a5f7437720ea0fa184469584600c27a1a912a41 URL: https://github.com/llvm/llvm-project/commit/6a5f7437720ea0fa184469584600c27a1a912a41 DIFF:

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak accepted this revision. ahatanak added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3392 + // replace instancetype with the class type + if (Ty.getTypePtr() ==

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier updated this revision to Diff 383227. fcloutier added a comment. Add test for a protocol method with `format_arg`, second NSString method accepting a NSString instead of a C string Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D92270: [ConstantFold] Fold more operations to poison

2021-10-28 Thread Juneyoung Lee via Phabricator via cfe-commits
aqjune added inline comments. Comment at: llvm/lib/IR/ConstantFold.cpp:633 // the input constant. -return UndefValue::get(DestTy); +return PoisonValue::get(DestTy); } neildhar wrote: > spatel wrote: > > MatzeB wrote: > > > I

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier updated this revision to Diff 383222. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112670/new/ https://reviews.llvm.org/D112670 Files: clang/lib/Sema/SemaDeclAttr.cpp clang/test/SemaObjC/format-arg-attribute.m Index:

[PATCH] D112777: [X86][FP16] add alias for *_fmul_pch intrinsics

2021-10-28 Thread Freddy, Ye via Phabricator via cfe-commits
FreddyYe created this revision. Herald added subscribers: jeroen.dobbelaere, pengfei. FreddyYe requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. *_mul_pch is to align with *_mul_ps annd *_mul_pd Repository: rG LLVM Github Monorepo

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier added a comment. Apologies, Phabricator showed the comment below line 197 in the diff, but the email showed it to be below line 3404. I can check if the return type is `instancetype` in `handleFormatArgAttr` and use that instead. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3403 } Ty = getFunctionOrMethodResultType(D); if (!isNSStringType(Ty, S.Context, /*AllowNSAttributedString=*/true) && ahatanak wrote: > Is it possible to just replace `Ty` with

[PATCH] D112767: [clang][driver] Fix multiarch output name with -Wl arg

2021-10-28 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112767/new/ https://reviews.llvm.org/D112767

[PATCH] D111199: [Clang][LLVM][Attr] support btf_type_tag attribute

2021-10-28 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D99#3093448 , @aaron.ballman wrote: > Attribute bits look good to me, but I'd appreciate if @dblaikie could weigh > in on whether he thinks the CodeGen changes are fine. My concern there is > around whether the changes

[PATCH] D112773: Allow __attribute__((swift_attr)) in attribute push pragmas

2021-10-28 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Looks good to me. Can you post the patch with the full context next time so that it's easier to review? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 3d0d7d8 - [clang][driver][darwin] support -target with Mac Catalyst triple without OS version

2021-10-28 Thread Alex Lorenz via cfe-commits
Author: Alex Lorenz Date: 2021-10-28T18:46:10-07:00 New Revision: 3d0d7d8c5b669332f55c0af654b10f510bde1932 URL: https://github.com/llvm/llvm-project/commit/3d0d7d8c5b669332f55c0af654b10f510bde1932 DIFF: https://github.com/llvm/llvm-project/commit/3d0d7d8c5b669332f55c0af654b10f510bde1932.diff

[PATCH] D112289: Support: Use sys::path::is_style_{posix,windows}() in a few places

2021-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 383218. dexonsmith added a comment. Fix some backwards checks in FileManagerTest.cpp. (check-clang check-llvm passes now.) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112289/new/ https://reviews.llvm.org/D112289 Files:

[PATCH] D112774: Support k-ext clang intrinsics

2021-10-28 Thread Shao-Ce SUN via Phabricator via cfe-commits
achieveartificialintelligence created this revision. achieveartificialintelligence added reviewers: HsiangKai, kito-cheng, craig.topper, jrtc27, luismarques, asb. Herald added subscribers: frasercrmck, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck,

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3403 } Ty = getFunctionOrMethodResultType(D); if (!isNSStringType(Ty, S.Context, /*AllowNSAttributedString=*/true) && Is it possible to just replace `Ty` with the class pointer

[PATCH] D112767: [clang][driver] Fix multiarch output name with -Wl arg

2021-10-28 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 383213. keith marked an inline comment as done. keith added a comment. Update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112767/new/ https://reviews.llvm.org/D112767 Files:

[PATCH] D112773: Allow __attribute__((swift_attr)) in attribute push pragmas

2021-10-28 Thread Becca Royal-Gordon via Phabricator via cfe-commits
beccadax created this revision. beccadax added a reviewer: arphaman. beccadax added a project: clang. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. beccadax requested review of this revision. Herald added a subscriber: cfe-commits. This change does what it says on

[PATCH] D112761: cfi-icall: Add -fsanitize-cfi-promotion-aliases

2021-10-28 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. I asked @samitolvanen out-of-band to check whether this really needs a flag since it seems like there could be some underlying issue that needs to be resolved so that we can do this

[PATCH] D112767: [clang][driver] Fix multiarch output name with -Wl arg

2021-10-28 Thread Dave Lee via Phabricator via cfe-commits
kastiglione added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4697 // Always use the first input as the base input. const char *BaseInput = InputInfos[0].getBaseInput(); maybe adjust this comment to emphasize first _file_ input

[PATCH] D112289: Support: Use sys::path::is_style_{posix,windows}() in a few places

2021-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 383207. dexonsmith added a comment. Undo a no-op change in the Path unit tests that I didn't intend to put here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112289/new/ https://reviews.llvm.org/D112289 Files:

[PATCH] D112289: Support: Use sys::path::is_style_{posix,windows}() in a few places

2021-10-28 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 383206. dexonsmith retitled this revision from "Support: Use sys::path::system_style() in a few places" to "Support: Use sys::path::is_style_{posix,windows}() in a few places". dexonsmith edited the summary of this revision. dexonsmith added reviewers:

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Elliott Hughes via Phabricator via cfe-commits
enh added a comment. In D111833#3094868 , @mbenfield wrote: > Previously this patch did not cover %c and %[, but now it does. thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/

[PATCH] D112761: cfi-icall: Add -fsanitize-cfi-promotion-aliases

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. please don't forget to run `git-clang-format HEAD~`. Thanks for the patch, LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D112768: [ARM] implement support for TLS register based stack protector

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: llvm/lib/Target/ARM/Thumb2InstrInfo.cpp:250 void Thumb2InstrInfo::expandLoadStackGuard( MachineBasicBlock::iterator MI) const { what about `Thumb1InstrInfo::expandLoadStackGuard`? Do we have `mrc`

[PATCH] D112768: [ARM] implement support for TLS register based stack protector

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Nice job! This looks like it hits every place that I was looking at for this. In terms of tests, https://reviews.llvm.org/D100919 and https://reviews.llvm.org/D102742 are probably interesting. In particular, we should test that clang no longer rejects

[PATCH] D111860: [modules] Update visibility for merged ObjCProtocolDecl definitions.

2021-10-28 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 383201. vsapsai added a comment. Rebase and trigger pre-merge checks again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111860/new/ https://reviews.llvm.org/D111860 Files:

[PATCH] D112768: [ARM] implement support for TLS register based stack protector

2021-10-28 Thread Ard Biesheuvel via Phabricator via cfe-commits
ardb created this revision. ardb added reviewers: nickdesaulniers, peter.smith, nathanchance, kees. Herald added subscribers: hiraditya, kristof.beyls. ardb requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Implement

[PATCH] D112767: [clang][driver] Fix multiarch output name with -Wl arg

2021-10-28 Thread Keith Smiley via Phabricator via cfe-commits
keith created this revision. keith added reviewers: ddunbar, JDevlieghere. keith requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Previously if you passed a `-Wl,-foo` _before_ the source filename, the first `InputInfos`, which is used for

[PATCH] D112765: [AST] injected-class-name is not a redecl, even in template specializations

2021-10-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a subscriber: carlosgalvezp. sammccall added a comment. After this patch we can revert D110614 except for the testcases (cc @carlosgalvezp) as the old matchers should just work. Comment at:

[PATCH] D112765: [AST] injected-class-name is not a redecl, even in template specializations

2021-10-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added reviewers: hokein, aaron.ballman, whisperity. Herald added subscribers: rnkovacs, kbarton, nemanjai. sammccall requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. Back in the

[PATCH] D92270: [ConstantFold] Fold more operations to poison

2021-10-28 Thread Neil Dhar via Phabricator via cfe-commits
neildhar added inline comments. Comment at: llvm/lib/IR/ConstantFold.cpp:633 // the input constant. -return UndefValue::get(DestTy); +return PoisonValue::get(DestTy); } spatel wrote: > MatzeB wrote: > > I believe this is causing

[PATCH] D103745: [dfsan] Add full fast8 support

2021-10-28 Thread Taewook Oh via Phabricator via cfe-commits
twoh added a comment. @browneee Thanks! Makes sense. Is there a chance that you have an idea of the ballpark overhead of the legacy mode? I'm curious if we track N-labels, the total CPU time is generally much higher with "legacy-mode single-run with N labels" than "fast-8 mode (N/8) runs". I

[PATCH] D112670: __attribute__((format_arg(__NSString__, N))) does not support instancetype in NSString interface

2021-10-28 Thread Félix Cloutier via Phabricator via cfe-commits
fcloutier updated this revision to Diff 383179. fcloutier added a comment. Forgot to run clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112670/new/ https://reviews.llvm.org/D112670 Files: clang/lib/Sema/SemaDeclAttr.cpp

[PATCH] D103745: [dfsan] Add full fast8 support

2021-10-28 Thread Andrew via Phabricator via cfe-commits
browneee added a comment. Sorry, I was thinking/describing fast-16 to fast-8. The same reasons apply for legacy mode (2^16 labels) to fast-8. - simplify code (smaller codesize overhead) - share more code and shadow/origin memory layout with MSan (which also has a 1:1 shadow) - reduce memory

[PATCH] D112399: Get Bazel building `//clang` on Windows with clang-cl.

2021-10-28 Thread Geoffrey Martin-Noble via Phabricator via cfe-commits
GMNGeoffrey added inline comments. Comment at: utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h:81 /* The LLVM product name and version */ #define BACKEND_PACKAGE_STRING "LLVM 12.0.0git" rnk wrote: > Unrelated to your change, but is this

[PATCH] D112399: Get Bazel building `//clang` on Windows with clang-cl.

2021-10-28 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1059 +#undef strcasecmp +#undef strncasecmp + thakis wrote: > GMNGeoffrey wrote: > > chandlerc wrote: > > > thakis wrote: > > > > Why do we need this with bazel but not with other

[PATCH] D112761: cfi-icall: Add -fsanitize-cfi-promotion-aliases

2021-10-28 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen created this revision. Herald added subscribers: ormris, jeroen.dobbelaere, dexonsmith, dang, steven_wu, hiraditya. samitolvanen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Inline assembly refererences

[PATCH] D103745: [dfsan] Add full fast8 support

2021-10-28 Thread Taewook Oh via Phabricator via cfe-commits
twoh added a comment. @browneee Thanks for the reply! IIUC, with non-fast mode and 16-bit shadow data, it could support 2^16 labels with a single run, so the coverage reduction is 2^16 -> 8. Do I miss something? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D103745: [dfsan] Add full fast8 support

2021-10-28 Thread Andrew via Phabricator via cfe-commits
browneee added a subscriber: kcc. browneee added a comment. In D103745#3094831 , @twoh wrote: > @gbalats @stephan.yichao.zhao Hello sorry for the late comment but I wonder > what was the reason behind this change (changing taint label representation >

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added a comment. Previously his patch did not cover %c and %[, but now it does. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/ https://reviews.llvm.org/D111833 ___ cfe-commits

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield updated this revision to Diff 383161. mbenfield added a comment. Support %c and %[ specifiers. Changed the diagnostic message to accommodate. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/ https://reviews.llvm.org/D111833

[clang] fb67f3d - [WebAssembly] Add prototype relaxed float to int trunc instructions

2021-10-28 Thread Thomas Lively via cfe-commits
Author: Thomas Lively Date: 2021-10-28T14:01:53-07:00 New Revision: fb67f3d96980519fa77c25f708dc7dfe9065beca URL: https://github.com/llvm/llvm-project/commit/fb67f3d96980519fa77c25f708dc7dfe9065beca DIFF: https://github.com/llvm/llvm-project/commit/fb67f3d96980519fa77c25f708dc7dfe9065beca.diff

[PATCH] D112186: [WebAssembly] Add prototype relaxed float to int trunc instructions

2021-10-28 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfb67f3d96980: [WebAssembly] Add prototype relaxed float to int trunc instructions (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D103745: [dfsan] Add full fast8 support

2021-10-28 Thread Taewook Oh via Phabricator via cfe-commits
twoh added a comment. @gbalats @stephan.yichao.zhao Hello sorry for the late comment but I wonder what was the reason behind this change (changing taint label representation from 16-bit to 8-bit-fast only). Do we have any discussion thread from llvm-dev regarding this? Thanks! Repository:

[PATCH] D112186: [WebAssembly] Add prototype relaxed float to int trunc instructions

2021-10-28 Thread Thomas Lively via Phabricator via cfe-commits
tlively accepted this revision. tlively 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/D112186/new/ https://reviews.llvm.org/D112186

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-28 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 383128. jcking1034 added a comment. Regenerate documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112491/new/ https://reviews.llvm.org/D112491 Files: clang/docs/LibASTMatchersReference.html

[PATCH] D112409: [clang-tidy] Add check 'cert-err33-c'.

2021-10-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D112409#3093815 , @balazske wrote: > Not sure if it is good to have such a test, the first and last function is > enough? Yeah, that's testing an awful lot. We don't usually aim for exhaustive tests with these

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/include/clang/AST/APValue.h:195 unsigned CallIndex, Version; + bool NoCFIValue : 1; }; Is there be padding off the end of the bitfield? Or does this actually change the

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-28 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 383126. jcking1034 added a comment. Deprecate original overloads of `hasAnyCapture`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112491/new/ https://reviews.llvm.org/D112491 Files:

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/AST/APValue.cpp:44-46 + false} {} APValue::LValueBase::LValueBase(const Expr *P, unsigned I, unsigned V) +: Ptr(P), Local{I, V, false} {}

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D112059#3094464 , @nickdesaulniers wrote: > Here's a [hastily and poorly written] script to measure the average cycle > counts for 30 invocations using linux `perf`: >

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/CodeGen/builtin-addressof-nocfi.c:2 +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -fsanitize=cfi-icall -o - %s | FileCheck %s + +void a(void) {} mind adding a test case to this file

[PATCH] D112143: [X86][ABI] Do not return float/double from x87 registers when x87 is disabled

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/Driver/x86-target-features.c:5 // RUN: %clang -target i386-unknown-linux-gnu -march=i386 -mno-80387 %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-X87 %s +// RUN: %clang -target i386-unknown-linux-gnu -march=i386

[PATCH] D112659: Add a limit to __make_integer_seq builtin.

2021-10-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D112659#3091501 , @rsmith wrote: > I wonder if more generally we should have a limit on either the size of a > pack or the number of template arguments in a template specialization, rather > than limiting only

[PATCH] D112059: Fix inline builtin handling in case of redefinition

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. Here's a [hastily and poorly written] script to measure the average cycle counts for 30 invocations using linux `perf`: https://gist.github.com/nickdesaulniers/4a20ba10c26ac2ad02cb0425b8b0f826 For Diff 382671 (latest; storing redecl state), builds of the linux

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-28 Thread James King via Phabricator via cfe-commits
jcking1034 marked an inline comment as not done. jcking1034 added a comment. I agree that having two ways to match the same thing is a usability concern and could definitely be confusing. Deprecating non-bindable matchers could be a possibility and is probably the right way to go if we choose

[PATCH] D112491: Add `LambdaCapture`-related matchers.

2021-10-28 Thread James King via Phabricator via cfe-commits
jcking1034 updated this revision to Diff 383115. jcking1034 added a comment. Update comment with additional example. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112491/new/ https://reviews.llvm.org/D112491 Files:

[PATCH] D98895: [X86][clang] Disable long double type for -mno-x87 option

2021-10-28 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a subscriber: Fznamznon. erichkeane added a comment. @Fznamznon was into this a bunch at once, so she should probably take a look as well. Comment at: clang/lib/Sema/Sema.cpp:1936 +if (LangOpts.SYCLIsDevice || (LangOpts.OpenMP && LangOpts.OpenMPIsDevice))

[PATCH] D110927: [analyzer] Access stored value of a constant array through a pointer to another type

2021-10-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal I'll address all of your remarks. Thanks a lot! Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1630-1641 +/// Returns true if the stored value can be accessed through the pointer to +/// another type: +/// const int arr[42]

[PATCH] D112720: [clang-tidy] Use globs in HeaderFilter

2021-10-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. Makes total sense, thanks for the suggestion! I'll wait for more reviewers to see if this behavior is what we want at all. If so I can revert the breaking changes and introduce that option. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112720/new/

[PATCH] D112720: [clang-tidy] Use globs in HeaderFilter

2021-10-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Assuming this is the change we want, i would imagine the viable enablement path is to introduce some option "filters are regexes and not globs", that defaults to `false`, and use it. Then some time later (2 releases?), flip the default and remove said option. My main

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-28 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added a comment. In D112732#3094158 , @kstoimenov wrote: > Tests are not passing. Hold off the review. Yep, removed FUNCTION_PASS_WITH_PARAMS("asan", must affect some tests Comment at:

[PATCH] D112695: [clangd] IncludeCleaner: Skip non self-contained headers

2021-10-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:247 for (const Inclusion : Structure.MainFileIncludes) { // FIXME: Skip includes that are not self-contained. if (!MFI.HeaderID) { kbobyrev wrote: > sammccall

[PATCH] D112720: [clang-tidy] Use globs in HeaderFilter

2021-10-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D112720#3094163 , @lebedev.ri wrote: > As long as this blankedly breaks/regresses existing configs it's a > non-starter i think. I see, thanks for the input! I'm curious if there are any deprecation mechanisms for

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-10-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 383087. carlosgalvezp added a comment. Update release notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112730/new/ https://reviews.llvm.org/D112730 Files: clang-tools-extra/clang-tidy/CMakeLists.txt

[PATCH] D112695: [clangd] IncludeCleaner: Skip non self-contained headers

2021-10-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 383086. kbobyrev added a comment. Remove stale FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112695/new/ https://reviews.llvm.org/D112695 Files: clang-tools-extra/clangd/IncludeCleaner.cpp

[PATCH] D112695: [clangd] IncludeCleaner: Skip non self-contained headers

2021-10-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:247 for (const Inclusion : Structure.MainFileIncludes) { // FIXME: Skip includes that are not self-contained. if (!MFI.HeaderID) { sammccall wrote: > this is

[PATCH] D112695: [clangd] IncludeCleaner: Skip non self-contained headers

2021-10-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 383085. kbobyrev marked 4 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112695/new/ https://reviews.llvm.org/D112695 Files:

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-28 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/test/CodeGen/arm-tphard.c:10 +} + peter.smith wrote: > nickdesaulniers wrote: > > ardb wrote: > > > nickdesaulniers wrote: > > > > Let's make this a test under llvm/test/CodeGen/, using IR: > > > > ``` > >

[PATCH] D112720: [clang-tidy] Use globs in HeaderFilter

2021-10-28 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri requested changes to this revision. lebedev.ri added a comment. This revision now requires changes to proceed. As long as this blankedly breaks/regresses existing configs it's a non-starter i think. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112720/new/

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-28 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov planned changes to this revision. kstoimenov added a comment. Tests are not passing. Hold off the review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112732/new/ https://reviews.llvm.org/D112732

[PATCH] D98895: [X86][clang] Disable long double type for -mno-x87 option

2021-10-28 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. @pengfei, @erichkeane, please let me know if the patch is OK now, or anything else needs to be fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98895/new/ https://reviews.llvm.org/D98895

[PATCH] D112600: [ARM] Use hardware TLS register in Thumb2 mode when -mtp=cp15 is passed

2021-10-28 Thread Peter Smith via Phabricator via cfe-commits
peter.smith added inline comments. Comment at: clang/test/CodeGen/arm-tphard.c:10 +} + nickdesaulniers wrote: > ardb wrote: > > nickdesaulniers wrote: > > > Let's make this a test under llvm/test/CodeGen/, using IR: > > > ``` > > > ; RUN: llc

[PATCH] D112289: Support: Use sys::path::system_style() in a few places

2021-10-28 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112289/new/ https://reviews.llvm.org/D112289

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

2021-10-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/unittests/StaticAnalyzer/RangeSetTest.cpp:81 const llvm::APSInt (BaseType X) { -llvm::APSInt Dummy = Base; -Dummy = X; -return BVF.getValue(Dummy); +static llvm::APSInt Base{sizeof(BaseType) * 8, +

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-28 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 383072. kstoimenov added a comment. Added AddressSanitizerOptions back. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112732/new/ https://reviews.llvm.org/D112732 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-28 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 383071. kstoimenov edited the summary of this revision. kstoimenov added a comment. Reverted pass builder. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112732/new/ https://reviews.llvm.org/D112732 Files:

[PATCH] D112098: [ASan] Added stack safety support in address sanitizer.

2021-10-28 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov added inline comments. Comment at: llvm/include/llvm/Analysis/StackSafetyAnalysis.h:93 + bool invalidate(Module &, const PreservedAnalyses &, + ModuleAnalysisManager::Invalidator &) { +return false; eugenis wrote: > vitalybuka

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-28 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 383068. kstoimenov added a comment. Removed unrelated files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112732/new/ https://reviews.llvm.org/D112732 Files: clang/lib/CodeGen/BackendUtil.cpp

[PATCH] D112732: [ASan] Removed AddressSanitizerPass function pass class and rolled it into the module pass for the new pass mangager only.

2021-10-28 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov created this revision. Herald added subscribers: ormris, hiraditya. kstoimenov requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D112732 Files:

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Elliott Hughes via Phabricator via cfe-commits
enh accepted this revision. enh added a comment. add tests for %c and %[ too? (it's genuinely unclear to me from a quick skim whether this patch covers them.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111833/new/

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

2021-10-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 383065. ASDenysPetrov added a comment. Fixed nits. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99797/new/ https://reviews.llvm.org/D99797 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added a comment. Thanks for reverting. Here's another try. This just shouldn't be warning on any specifier other than %s, so I fixed that. As far as not pointing at code for the second warning, I verified manually that it does now point at code even when warning twice, but it doesn't

[PATCH] D111833: [clang] Fortify warning for scanf calls with field width too big.

2021-10-28 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield updated this revision to Diff 383064. mbenfield added a comment. Only diagnose if conversion specifier is %s. Give the location of the particular argument rather than the location of the function call. Test to make sure we don't warn on %d. Repository: rG LLVM Github Monorepo

[PATCH] D92270: [ConstantFold] Fold more operations to poison

2021-10-28 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added inline comments. Comment at: llvm/lib/IR/ConstantFold.cpp:633 // the input constant. -return UndefValue::get(DestTy); +return PoisonValue::get(DestTy); } MatzeB wrote: > I believe this is causing some of our clients

[PATCH] D112421: [clang][ARM] PACBTI-M frontend support

2021-10-28 Thread Momchil Velikov via Phabricator via cfe-commits
chill added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:134-135 StringRef ) const { - llvm::AArch64::ParsedBranchProtection PBP; - if (!llvm::AArch64::parseBranchProtection(Spec, PBP, Err)) +

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-10-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 383059. carlosgalvezp added a comment. Fix ordering in check list. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112730/new/ https://reviews.llvm.org/D112730 Files: clang-tools-extra/clang-tidy/CMakeLists.txt

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-10-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 383058. carlosgalvezp added a comment. Specify C++14 in the module description. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112730/new/ https://reviews.llvm.org/D112730 Files: clang-tools-extra/clang-tidy/CMakeLists.txt

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

2021-10-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:200-204 +} else { + //[ First ]--> + //[ Second ]---> + // MIN^ + // The First range is entirely inside the Second one.

[PATCH] D112730: [clang-tidy] Add AUTOSAR module

2021-10-28 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp created this revision. carlosgalvezp added reviewers: aaron.ballman, whisperity. carlosgalvezp added a project: clang-tools-extra. Herald added subscribers: armkevincheng, jsmolens, eric-k256, arphaman, rnkovacs, kbarton, xazax.hun, mgorny, nemanjai. Herald added a reviewer: sjarus.

[PATCH] D111654: [analyzer] Retrieve a value from list initialization of multi-dimensional array declaration.

2021-10-28 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 383054. ASDenysPetrov added a comment. @steakhal @martong Updated according to your comments. I think I'm done with this patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111654/new/ https://reviews.llvm.org/D111654 Files:

[PATCH] D112707: [clangd] IncludeCleaner: Be more conservative in marking RecordDecl usage

2021-10-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. What's the purpose of this patch at a high level? Was it triggered by a real example? IIUC it's avoiding false negatives, where we're using a class and an otherwise-unused header forward-declares that class. Avoiding false negatives isn't a high priority at this

[PATCH] D103395: PR45879: Keep evaluated expression in LValue object

2021-10-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: aaron.ballman. aaron.ballman added a comment. Trying to help get this review going again as it impacts libc++. Comment at: clang/lib/AST/ExprConstant.cpp:1584-1585 Designator = SubobjectDesignator(getType(B)); + if (!LExpr) +

[PATCH] D112695: [clangd] IncludeCleaner: Skip non self-contained headers

2021-10-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:292 auto Refs = findReferencedLocations(AST); auto ReferencedFiles = translateToHeaderIDs(findReferencedFiles(Refs, SM),

[PATCH] D112695: [clangd] IncludeCleaner: Skip non self-contained headers

2021-10-28 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:191 -// FIXME(kirillbobyrev): We currently do not support the umbrella headers. -// Standard Library headers are typically umbrella headers, and system headers -// are likely to be the

  1   2   3   >