[PATCH] D124715: Use QoS class Utility for ThreadPriority::Low on Mac

2022-05-04 Thread Stefan Haller via Phabricator via cfe-commits
stefanhaller added a comment. In D124715#3488447 , @sammccall wrote: > (How) does this interact with battery vs mains power on laptops? > It seems like there's a common scenario where: > > - the user is on a relatively slow laptop, running off battery > -

[PATCH] D124690: [clangd] add inlay hints for std::forward-ed parameter packs

2022-05-04 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:474 +// the parameter names from the wrapped function +if (Args.size() > FixedParamCount && Args.size() == Params.size()) { + auto ForwardedParams = matchForwardedParams( --

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header and rename it .

2022-05-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/include/clang/AST/ASTImportError.h:17 + +#include "clang/AST/APValue.h" +#include "llvm/Support/Error.h" This header is probably not needed. Comment at: clang/include/clang/AST/ASTImportError.h:

[PATCH] D124807: [clang][dataflow] Only skip ExprWithCleanups when visiting terminators

2022-05-04 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:230 + /// + /// Requirements: + /// Why add these as requirements instead of skipping past `ExprWithCleanups` internally, as we currently do for parens?

[PATCH] D124638: [clang] Track how headers get included generally during lookup time

2022-05-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 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/D124638/new/ https://reviews.llvm.org/D124638 __

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header and rename it .

2022-05-04 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added inline comments. Comment at: clang/include/clang/AST/ASTImportError.h:22 + +class ImportError : public llvm::ErrorInfo { +public: balazske wrote: > balazske wrote: > > Rename to `ASTImportError`. > The rename to `ASTImportError` is better in a s

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header and rename it .

2022-05-04 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added inline comments. Comment at: clang/include/clang/AST/ASTImporterLookupTable.h:17 +#include "clang/AST/ASTImportError.h" #include "clang/AST/DeclBase.h" // lookup_result balazske wrote: > phyBrackets wrote: > > balazske wrote: > > > This inclu

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header and rename it .

2022-05-04 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/include/clang/AST/ASTImportError.h:1 +//===- ASTImporter.h - Import Error while Importing AST ---*- C++ -*-===// +// balazske wrote: > Comment at: clang/include/clang/AST/ASTImportError.h:

[PATCH] D124669: [flang][driver] Add support for -save-temps

2022-05-04 Thread Diana Picus via Phabricator via cfe-commits
rovka added inline comments. Comment at: flang/test/Driver/fno-integrated-as.f90:6 +!-- +! Verify that there _is_ a seperate line with an assembler invocation +! RUN: %flang -c -fno-integrated-as %s -### 2>&1 | FileCheck %s

[PATCH] D124836: [AArch64] Add support for -fzero-call-used-regs

2022-05-04 Thread Peter Waller via Phabricator via cfe-commits
peterwaller-arm added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:752 +#undef CASE + } +} void wrote: > kristof.beyls wrote: > > Just a drive-by comment: I'm wondering if SVE registers should also be > > listed here? > I'm not

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. Can we have a test for this, got idea from here (https://stackoverflow.com/questions/4129961/how-is-the-size-of-a-struct-with-bit-fields-determined-measured) typedef struct { unsigned int a:1; unsigned int x:31; unsigned int c:1;

[PATCH] D124666: In MSVC compatibility mode, handle unqualified templated base class initialization

2022-05-04 Thread Fred Tingaud via Phabricator via cfe-commits
frederic-tingaud-sonarsource updated this revision to Diff 426944. frederic-tingaud-sonarsource added a comment. Sorry about the confusion, it makes sense. Fixed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124666/new/ https://reviews.llvm.org/D124666 Files: clang/include/clang/Bas

[libunwind] 7167237 - [libunwind][SystemZ] Unwind out of signal handlers

2022-05-04 Thread Ulrich Weigand via cfe-commits
Author: Ulrich Weigand Date: 2022-05-04T10:43:11+02:00 New Revision: 71672375fe91d602699ae2a6d6a88e910ff91b5c URL: https://github.com/llvm/llvm-project/commit/71672375fe91d602699ae2a6d6a88e910ff91b5c DIFF: https://github.com/llvm/llvm-project/commit/71672375fe91d602699ae2a6d6a88e910ff91b5c.diff

[PATCH] D123831: [clang][extract-api] Use relative includes

2022-05-04 Thread Daniel Grumberg via Phabricator via cfe-commits
dang accepted this revision. dang added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123831/new/ https://reviews.llvm.org/D123831 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D124909: Fixes following incompatibility issues with c++ modules

2022-05-04 Thread Kugan Vivekanandarajah via Phabricator via cfe-commits
kuganv created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. kuganv requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added projects: clang, clang-tools-extra. 1. Preamble generated by clangd is g

[PATCH] D124341: [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice.

2022-05-04 Thread Nathan James via Phabricator via cfe-commits
njames93 marked 4 inline comments as done. njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.cpp:51 ClangTidyContext *Context) -: NamePrefix(CheckName.str() + "."), CheckOptions(CheckOptions), +: NamePrefix((CheckName + ".").str(

[PATCH] D124850: [Sema][SVE2] Move/simplify Sema testing for SVE2 ACLE builtins

2022-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for working on this @RosieSumpter! Comment at: clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2.cpp:1 +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fallow-half-arguments-and-returns -fsyntax-on

[PATCH] D124836: [AArch64] Add support for -fzero-call-used-regs

2022-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.td:1398 + (sequence "W%u", 0, 7))>; +def FPR8_ARG : RegisterClass<"AArch64", [untyped], 8, (trunc FPR8, 7)> { + let Size = 8; Should this fea

[PATCH] D124349: [analyzer] Get direct binding for specific punned case

2022-05-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D124349#3490524 , @martong wrote: > Can we have a test for this, got idea from here > (https://stackoverflow.com/questions/4129961/how-is-the-size-of-a-struct-with-bit-fields-determined-measured) > > typedef struct > { >

[PATCH] D123831: [clang][extract-api] Use relative includes

2022-05-04 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. Since this is a new test can we use the approach in https://reviews.llvm.org/D124634 to check for diagnostics output. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123831/new/ https://reviews.llvm.org/D123831 ___

[PATCH] D124341: [clang-tidy][NFC] Replace many instances of std::string where a StringRef would suffice.

2022-05-04 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. In D124341#3476533 , @njames93 wrote: > In D124341#3475083 , @aaron.ballman > wrote: > >> I we

[PATCH] D124534: [clang] Add a diagnostic for line directive of a gnu extension

2022-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124534#3490098 , @ken-matsui wrote: > @aaron.ballman > >> If so, I think putting Diag after the call of this function would be better. > > With the above change, I tried to add comments to failed tests, but there > wer

[PATCH] D124221: Reimplement `__builtin_dump_struct` in Sema.

2022-05-04 Thread Wang Yihan via Phabricator via cfe-commits
yihanaa added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:433 + + llvm::StringRef getFormatSpecifier(QualType T) { +if (auto *BT = T->getAs()) { rsmith wrote: > rsmith wrote: > > aaron.ballman wrote: > > > yihanaa wrote: > > > > I think this

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: erichkeane, rsmith, rjmccall. Herald added a project: All. aaron.ballman requested review of this revision. Herald added a project: clang. With sufficiently tortured code, it's possible to cause a stack overflow when parsing decl

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-04 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I think I've seen this one before Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124915/new/ https://reviews.llvm.org/D124915 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[PATCH] D124915: Check for resource exhaustion when recursively parsing declarators

2022-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Two things to note: 1. I'm not convinced that adding a test case is the right thing to do here. On the one hand, we want to verify that we now emit the diagnostic before crashing. But on the other hand, this test is extremely expensive to run (because it exhausts

[PATCH] D124909: Fix issues with using clangd with C++ modules

2022-05-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. To back up a bit... Until now I don't think we've had a serious effort/plan for supporting modules in clangd, or AFAIK in clang tools in general. To the extent that modules work, it's a side-effect of how we use clang's driver + compilation database, and inherit behav

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: FreddyYe, RKSimon, LuoYuanke, craig.topper. Herald added a subscriber: StephenFan. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix uninitialize

[PATCH] D124790: [HLSL] Enable half type for hlsl.

2022-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D124790#3489690 , @python3kgae wrote: > Add option -fcgl which output clang codeGen result to avoid test dependent on > build DirectX backend. Thanks -- I think this should actually be a separate patch though, because

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: clang/test/CodeGen/X86/sse-builtins-constrained.c:5 +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux-gnu -target-feature +sse -S -o - -Wall -Werror | FileCheck %s --check-prefix=CHECK-ASM --check-prefix=COMMON +// RUN

[PATCH] D124748: [clang-format] Fix whitespace counting stuff

2022-05-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Is there any way you could add a unit test for this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124748/new/ https://reviews.llvm.org/D124748 ___ cfe-commits mailing lis

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/test/CodeGen/X86/sse-builtins-constrained.c:5 +// RUN: %clang_cc1 -ffreestanding %s -triple=x86_64-unknown-linux-gnu -target-feature +sse -S -o - -Wall -Werror | FileCheck %s --check-prefix=CHECK-ASM --check-prefix=COMMON +// RUN

[PATCH] D124749: [clang-format] Handle Verilog preprocessor directives

2022-05-04 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. You add significant number of keywords here but I don't see any of them being tested? can you add a unit tests to cover what you are adding Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124749/new/ https://reviews.l

[clang] b540ee5 - [X86] Fix redundant `%s` in RUN command. NFC

2022-05-04 Thread Phoebe Wang via cfe-commits
Author: Phoebe Wang Date: 2022-05-04T20:29:50+08:00 New Revision: b540ee540266f42b238e683c775c32a10c184ab5 URL: https://github.com/llvm/llvm-project/commit/b540ee540266f42b238e683c775c32a10c184ab5 DIFF: https://github.com/llvm/llvm-project/commit/b540ee540266f42b238e683c775c32a10c184ab5.diff L

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei updated this revision to Diff 426971. pengfei added a comment. Seperated unrelated change and rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124916/new/ https://reviews.llvm.org/D124916 Files: clang/lib/Headers/cetintrin.h Index

[PATCH] D124258: [C89/C2x] Change the behavior of implicit int diagnostics

2022-05-04 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've landed in 2cb2cd242ca08d0bbd2a51a41f1317442e5414fc and will keep my eyes on the bots for long tail issues from the diagnostic change. CHANGES SINCE LAST

[PATCH] D124918: Add a new clang-tidy for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 created this revision. Herald added subscribers: carlosgalvezp, mgorny. Herald added a project: All. veluca93 requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. This check is meant to detect case that -Wunused-variable doe

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. LGTM - I'm intending to add -Wsystem-headers to the clang x86 builtins tests once everything is clean. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D124666: In MSVC compatibility mode, handle unqualified templated base class initialization

2022-05-04 Thread Fred Tingaud via Phabricator via cfe-commits
frederic-tingaud-sonarsource added a comment. By the way, in the current state of the code, there is no risk of such conflict between typo correction and UnqualifiedBase, because when an unqualified base exists the lookup result will not be empty. That's why the test was not failing even without

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. In D124916#3490868 , @RKSimon wrote: > LGTM - I'm intending to add -Wsystem-headers to the clang x86 builtins tests > once everything is clean. Thanks @RKSimon! That sounds great! I was thinking the headers will do diagnosis wh

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 426977. mboehme added a comment. Rebased to a more recent base change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Files: clang/docs/ReleaseNotes.rst clang/in

[PATCH] D124919: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added a reviewer: aaron.ballman. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For backwards compatiblity, we only emit a warning if the attribute is one of the ex

[PATCH] D124806: [clang-tidy] add support for Demorgan conversions to readability-simplify-bool-expr

2022-05-04 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. njames93 updated this revision to Diff 426524. njames93 added a comment. njames93 updated this revision to Diff 426976. njames93 edited the summary of this revision. njames93 added revie

[clang] 1587f6b - Bump the serialization major version number

2022-05-04 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-05-04T09:07:57-04:00 New Revision: 1587f6bb3ca2cf83591f392f932007dd0fdb7b54 URL: https://github.com/llvm/llvm-project/commit/1587f6bb3ca2cf83591f392f932007dd0fdb7b54 DIFF: https://github.com/llvm/llvm-project/commit/1587f6bb3ca2cf83591f392f932007dd0fdb7b54.diff

[clang] 2d18a86 - [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Phoebe Wang via cfe-commits
Author: Phoebe Wang Date: 2022-05-04T21:12:12+08:00 New Revision: 2d18a86d14a936798a34b10d4b951465b7f0527f URL: https://github.com/llvm/llvm-project/commit/2d18a86d14a936798a34b10d4b951465b7f0527f DIFF: https://github.com/llvm/llvm-project/commit/2d18a86d14a936798a34b10d4b951465b7f0527f.diff L

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Phoebe Wang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d18a86d14a9: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224 (authored by pengfei). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme added inline comments. Comment at: clang/test/SemaCXX/annotate-type.cpp:2 +// RUN: %clang_cc1 %s -std=c++17 -fsyntax-only -verify + +struct S1 { aaron.ballman wrote: > mboehme wrote: > > aaron.ballman wrote: > > > mboehme wrote: > > > > aaron.ballman wrot

[PATCH] D124807: [clang][dataflow] Only skip ExprWithCleanups when visiting terminators

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 426985. li.zhe.hua marked 7 inline comments as done. li.zhe.hua added a comment. Add `ExprWithCleanups` requirement to `createStorageLocation`, `setStorageLocation`, and `getStorageLocation`. Remove `ParenExpr` requirement from `getValue`. Remove unnecessa

[PATCH] D124807: [clang][dataflow] Only skip ExprWithCleanups when visiting terminators

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua added inline comments. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:230 + /// + /// Requirements: + /// sgatev wrote: > Why add these as requirements instead of skipping past `ExprWithCleanups` > internally, as we cu

[PATCH] D124807: [clang][dataflow] Only skip ExprWithCleanups when visiting terminators

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua updated this revision to Diff 426987. li.zhe.hua added a comment. Forgot to add a file... let's try this again... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124807/new/ https://reviews.llvm.org/D124807 Files: clang/include/clang/An

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 426990. mboehme added a comment. Changes in response to review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111548/new/ https://reviews.llvm.org/D111548 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D124919: [clang] [WIP] Reject non-declaration C++11 attributes on declarations.

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme updated this revision to Diff 426991. mboehme added a comment. Reuploaded because base revision changed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124919/new/ https://reviews.llvm.org/D124919 Files: clang/include/clang/Parse/Parser.h

[PATCH] D124774: [clang][ASTImporter][NFC]: Move clang::ImportError into own header and rename it .

2022-05-04 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets updated this revision to Diff 426992. phyBrackets added a comment. Address inline comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124774/new/ https://reviews.llvm.org/D124774 Files: clang/include/clang/AST/ASTImportError.h c

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 2 inline comments as done. mboehme added inline comments. Comment at: clang/unittests/AST/AttrTest.cpp:89 +S::* [[clang::annotate_type("ptr_to_mem")]] ptr_to_member = &S::mem; +)cpp"); + aaron.ballman wrote: > The formatting looks a bit off for

[PATCH] D124923: [Sema] Simplify CheckConstraintSatisfaction. NFC

2022-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added reviewers: sammccall, saar.raz. Herald added a project: All. ilya-biryukov requested review of this revision. Herald added a project: clang. - Exit early when constraint caching is disabled. - Use unique_ptr to manage temporary lifetime. - F

[PATCH] D124807: [clang][dataflow] Only skip ExprWithCleanups when visiting terminators

2022-05-04 Thread Stanislav Gatev via Phabricator via cfe-commits
sgatev accepted this revision. sgatev added a comment. Looks great! Thank you! Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:1156 +// FIXME: Remove this test once it provides no additional test coverage. +TEST_F(FlowConditionTest, DoesNo

[PATCH] D124923: [Sema] Simplify CheckConstraintSatisfaction. NFC

2022-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:335 + auto Satisfaction = + std::make_unique(Template, TemplateArgs); if (::CheckConstraintSatisfaction(*this, Template, ConstraintExprs, I also wonder if this could be alloc

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked 3 inline comments as done. mboehme added a comment. In D111548#3483275 , @erichkeane wrote: > I don't really know how useful this ends up being, these attributes (since > they are part of `AttributedType` end up disappearing pretty quickl

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:204 +// subtraction/addition of the negated value. +if (!RHS.isNegative()) { + ConvertedRHS = &BasicVals.Convert(resultTy, RHS); steakh

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-04 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 426998. steplong added a comment. Removed unnecessary braces (mentioned in the LLVM coding standard) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124702/new/ https://reviews.llvm.org/D124702 Files: clang/i

[PATCH] D111548: [Clang] Add the `annotate_type` attribute

2022-05-04 Thread Martin Böhme via Phabricator via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. In D111548#3483326 , @xbolva00 wrote: > This patch should not land until we see some real use cases to justify new > hundreds of lines of code. We should more careful and take maintenance

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 426999. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124658/new/ https://reviews.llvm.org/D124658 Files: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp clang/test/Analysis/additive-op-on-sym-int-expr.c clang/test/Analy

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-04 Thread Tomasz Kamiński via Phabricator via cfe-commits
tomasz-kaminski-sonarsource updated this revision to Diff 427001. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124658/new/ https://reviews.llvm.org/D124658 Files: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp clang/test/Analysis/additive-op-on-sym-int-expr.c clang/test/Analy

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnusedNoSideEffectCheck.cpp:11 + +#include +#include C++ headers should be after application's ones. Comment at: clang-tools-extra/clang-tidy/perform

[PATCH] D124674: [analyzer] Indicate if a parent state is infeasible

2022-05-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @NoQ Could you please take a look? This change effects the very core of the analyzer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124674/new/ https://reviews.llvm.org/D124674

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-04 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. >> And should we error/warn if the pragma occurs not in namespace scope? > > Oh I wasn't sure how to check if the function pragma was outside of a > function. In the ActOn.. methods I think you can check what the CurContext is. Comment at: clang/lib/Pa

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 updated this revision to Diff 427007. veluca93 marked 7 inline comments as done. veluca93 added a comment. Address first round of review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124918/new/ https://reviews.llvm.org/D124918

[PATCH] D124525: [OpenMP][ClangLinkerWrapper] Extending linker wrapper to embed metadata for multi-arch fat binaries

2022-05-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I'm suggesting instead we define a new `__tgt_device_image` and a new `__tgt_register_lib` function to support this. This new `__tgt_device_image` will simply contain a pointer to an optional information struct. struct __tgt_device_image_v2 { void* ImageStar

[PATCH] D124923: [Sema] Simplify CheckConstraintSatisfaction. NFC

2022-05-04 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Thanks for cleaning up the scary new/deletes. Comment at: clang/lib/Sema/SemaConcept.cpp:321 + bool ShouldCache = LangOpts.ConceptSatisfactionCaching && Template; +

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnusedNoSideEffectCheck.cpp:135 +// or class, and that there are no side effects on `this`. +if (auto *Callee = dyn_cast(Call->getCallee())) { + markSideEffectFree(Callee); --

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 updated this revision to Diff 427013. veluca93 added a comment. Missing `const` from auto * Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124918/new/ https://reviews.llvm.org/D124918 Files: clang-tools-extra/clang-tidy/performance/CMake

[PATCH] D124918: [clang-tidy] Add a new check for non-trivial unused variables.

2022-05-04 Thread Luca Versari via Phabricator via cfe-commits
veluca93 marked an inline comment as done. veluca93 added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/UnusedNoSideEffectCheck.cpp:135 +// or class, and that there are no side effects on `this`. +if (auto *Callee = dyn_cast(Call->getCallee())) {

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts and

2022-05-04 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin marked an inline comment as done. DiggerLin added inline comments. Comment at: clang/test/Driver/aix-ld.c:675-676 +// CHECK-LD32-SHARED-EXPORTS-NOT: "{{.*}}llvm-nm" +// CHECK-LD32-SHARED-EXPORTS-NOT: "-X" +// CHECK-LD32-SHARED-EXPORTS-NOT: "32" +// CHECK-LD32-SHARED-EXP

[PATCH] D124923: [Sema] Simplify CheckConstraintSatisfaction. NFC

2022-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 427018. ilya-biryukov added a comment. - add FIXME for a memory leak Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124923/new/ https://reviews.llvm.org/D124923 Files: clang/lib/Sema/SemaConcept.cpp I

[PATCH] D124923: [Sema] Simplify CheckConstraintSatisfaction. NFC

2022-05-04 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clang/lib/Sema/SemaConcept.cpp:321 + bool ShouldCache = LangOpts.ConceptSatisfactionCaching && Template; + if (!ShouldCache) { sammccall wrote: > Another loose end that could be cleaned up sometime! > > `Conce

[PATCH] D124842: [NFC][CUDA][HIP] rework mangling number for aux target

2022-05-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:11770-11778 + if (!LangOpts.CUDA || LangOpts.CUDAIsDevice) { +assert(!ForAuxTarget && "Only CUDA/HIP host compilation supports mangling " +

[PATCH] D124807: [clang][dataflow] Only skip ExprWithCleanups when visiting terminators

2022-05-04 Thread Eric Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG62b2a47a9f15: [clang][dataflow] Only skip ExprWithCleanups when visiting terminators (authored by li.zhe.hua). Changed prior to commit: https://reviews.llvm.org/D124807?vs=426987&id=427019#toc Reposito

[clang] 62b2a47 - [clang][dataflow] Only skip ExprWithCleanups when visiting terminators

2022-05-04 Thread Eric Li via cfe-commits
Author: Eric Li Date: 2022-05-04T15:31:49Z New Revision: 62b2a47a9f15ed2f1dc4b39c924341c7b9bd7cf8 URL: https://github.com/llvm/llvm-project/commit/62b2a47a9f15ed2f1dc4b39c924341c7b9bd7cf8 DIFF: https://github.com/llvm/llvm-project/commit/62b2a47a9f15ed2f1dc4b39c924341c7b9bd7cf8.diff LOG: [clan

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-04 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. ping Comment at: clang/lib/Sema/SemaOpenMP.cpp:11663 X = BO->getLHS(); - D = BO->getRHS(); + D = BO->getRHS()->IgnoreImpCasts(); tianshilei1992 wrote: > ABataev wrote: > > Why do we need to use `IgnoreImpCasts()` here and

[PATCH] D124790: [HLSL] Enable half type for hlsl.

2022-05-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Basic/LangOptions.cpp:197 - // OpenCL has half keyword - Opts.Half = Opts.OpenCL; + // OpenCL and HLSL have half keyword + Opts.Half = Opts.OpenCL || Opts.HLSL; aaron.ballman wrote: > python3kgae wrote: > >

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-05-04 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:11663 X = BO->getLHS(); - D = BO->getRHS(); + D = BO->getRHS()->IgnoreImpCasts(); tianshilei1992 wrote: > tianshilei1992 wrote: > > ABataev wrote: > > > Why do we need to use `IgnoreI

[PATCH] D124909: Fix issues with using clangd with C++ modules

2022-05-04 Thread Kugan Vivekanandarajah via Phabricator via cfe-commits
kuganv added a comment. Thanks a lot for the detailed. comment. Yes, you are right in that we are using build system (buck) to build the modules and provide as part of the CDB. This is fairly cheap when we hit the buck cache that is also shared by others. You are right in that the PCM format is

[PATCH] D124932: [clang][dataflow] Track `optional`s' values (i.e. contents) in `optional` model.

2022-05-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added reviewers: xazax.hun, sgatev. Herald added subscribers: tschuett, steakhal, rnkovacs. Herald added a project: All. ymandel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds partial

[clang] 726d7b0 - [Sema] Simplify CheckConstraintSatisfaction. NFC

2022-05-04 Thread Ilya Biryukov via cfe-commits
Author: Ilya Biryukov Date: 2022-05-04T15:53:07Z New Revision: 726d7b07fcde58c61743c45723c9b614911fe084 URL: https://github.com/llvm/llvm-project/commit/726d7b07fcde58c61743c45723c9b614911fe084 DIFF: https://github.com/llvm/llvm-project/commit/726d7b07fcde58c61743c45723c9b614911fe084.diff LOG:

[PATCH] D124923: [Sema] Simplify CheckConstraintSatisfaction. NFC

2022-05-04 Thread Ilya Biryukov 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 rG726d7b07fcde: [Sema] Simplify CheckConstraintSatisfaction. NFC (authored by ilya-biryukov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D124708: Fix "the the" typo in documentation and user facing strings

2022-05-04 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. Herald added a subscriber: rnkovacs. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124708/new/ https://reviews.llvm.org/D124708 ___ cfe-commi

[PATCH] D124932: [clang][dataflow] Track `optional` contents in `optional` model.

2022-05-04 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 427029. ymandel added a comment. remove stray newline Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124932/new/ https://reviews.llvm.org/D124932 Files: clang/lib/Analysis/FlowSensitive/Models/UncheckedOption

[PATCH] D124667: [flang][driver] Add support for consuming LLVM IR/BC files

2022-05-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 427032. awarzynski added a comment. Rebase on top of main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124667/new/ https://reviews.llvm.org/D124667 Files: clang/include/clang/Driver/Types.h clang/lib/D

[PATCH] D124874: [clang] add -fmodule-file-home-is-cwd

2022-05-04 Thread Richard Howell via Phabricator via cfe-commits
rmaz updated this revision to Diff 427034. rmaz added a comment. Use regex for path separators in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124874/new/ https://reviews.llvm.org/D124874 Files: clang/include/clang/Driver/Options.td clan

[PATCH] D124669: [flang][driver] Add support for -save-temps

2022-05-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski updated this revision to Diff 427036. awarzynski added a comment. Fix typos as per comments from @rovka, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124669/new/ https://reviews.llvm.org/D124669 Files: clang/include/clang/Dri

[PATCH] D124669: [flang][driver] Add support for -save-temps

2022-05-04 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski marked 4 inline comments as done. awarzynski added inline comments. Comment at: flang/test/Driver/fno-integrated-as.f90:18 +! DEFAULT-LABEL: "-fc1" +! DEFAULT-SAME: "-o" "fno-integrated-as.o" "{{.*}}fno-integrated-as.f90" rovka wrote: > Nit (here and a

[PATCH] D124806: [clang-tidy] add support for Demorgan conversions to readability-simplify-bool-expr

2022-05-04 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 427038. njames93 added a comment. Enhanced support for parens, both adding them in when needed as well as removing some un-needed parens. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124806/new/ https://revi

[PATCH] D124658: [analyzer] Canonicalize SymIntExpr so the RHS is positive when possible

2022-05-04 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Just a few nits left. Consider marking 'done' the corresponding boxes. Comment at: clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:211 +// Check if the negation of the RHS is representable: +// * if resultTy is unsigned, then negation is al

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-04 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 427040. steplong added a comment. Changed std::vector to llvm::SmallVector Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124702/new/ https://reviews.llvm.org/D124702 Files: clang/include/clang/Parse/Parser.

[PATCH] D124702: [MSVC] Add support for pragma function

2022-05-04 Thread Stephen Long via Phabricator via cfe-commits
steplong added inline comments. Comment at: clang/lib/Parse/ParsePragma.cpp:3561 << "intrinsic"; return; } hans wrote: > since the above is just a warning, we should probably still call the ActOn.. > method? Hmm, I'm not sure because all the msg

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Headers/cetintrin.h:45 static __inline__ unsigned int __DEFAULT_FN_ATTRS _rdsspd_i32() { +#pragma clang diagnostic push The argument should also be `(void)`. Comment at: clang/lib/Hea

[PATCH] D124916: [X86] Fix uninitialized variable warnings in cetintrin.h reported by #55224

2022-05-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/Headers/cetintrin.h:48 +#pragma clang diagnostic ignored "-Wuninitialized" unsigned int t; return __builtin_ia32_rdsspd(t); So if CET isn't enabled this intrinsic returns a random value instead of 0

[clang] 94d36fd - Fix a crash on invalid with _Generic expressions

2022-05-04 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2022-05-04T12:41:56-04:00 New Revision: 94d36fdbd7d2c6eab250f15f65fd20a6447b92eb URL: https://github.com/llvm/llvm-project/commit/94d36fdbd7d2c6eab250f15f65fd20a6447b92eb DIFF: https://github.com/llvm/llvm-project/commit/94d36fdbd7d2c6eab250f15f65fd20a6447b92eb.diff

[PATCH] D124938: [clang] serialize SUBMODULE_TOPHEADER relative to BaseDirectory

2022-05-04 Thread Richard Howell via Phabricator via cfe-commits
rmaz created this revision. Herald added a project: All. rmaz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This diff changes the serialization of the `SUBMODULE_TOPHEADER` entry in module files to be serialized relative to the module's `

[clang] b6c67c3 - [clang] Track how headers get included generally during lookup time

2022-05-04 Thread Cyndy Ishida via cfe-commits
Author: Cyndy Ishida Date: 2022-05-04T09:52:31-07:00 New Revision: b6c67c3c67893d532fe741c508dfa2ac40fae1ad URL: https://github.com/llvm/llvm-project/commit/b6c67c3c67893d532fe741c508dfa2ac40fae1ad DIFF: https://github.com/llvm/llvm-project/commit/b6c67c3c67893d532fe741c508dfa2ac40fae1ad.diff

  1   2   >