[PATCH] D124262: compile commands header to source heuristic lower-cases filenames before inferring file types

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG87468e85fcdc: compile commands header to source heuristic lower-cases filenames before… (authored by ishaangandhi, committed by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-04-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:1183-1185 +.. option:: -fmodule-header=\[user,system\] + +Build a C++20 header unit, but search for the header in the user or system header search paths respectively. Are "us

[PATCH] D122258: [MC] Omit DWARF unwind info if compact unwind is present for all archs

2022-04-25 Thread Jez Ng via Phabricator via cfe-commits
int3 added a comment. bump @lhames @JDevlieghere would either of y'all be able to review this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122258/new/ https://reviews.llvm.org/D122258 ___ cfe-commits m

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-04-25 Thread Iain Sandoe via Phabricator via cfe-commits
iains added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:1183-1185 +.. option:: -fmodule-header=\[user,system\] + +Build a C++20 header unit, but search for the header in the user or system header search paths respectively. tahonermann w

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added a comment. The problem is that we are trying to shorten the input file paths in `PrepareToExecuteAction`, where the `CompilerInstance` is still primal and doesn't even have a `FileManager` that we could use. That makes it hard (if possible at all) to reverse lookup headermaps and us

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/CodeGenCXX/no_auto_return_lambda.cpp:1 +// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s + So this CodeGen test without a triple is a bit troublesome. The one we've noticed th

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/AST/Type.h:486 + bool IsSYCLOrOpenCL = false) { +if (ASMap) { + bool IsATargetAS = false; If A and B are both target AS, we fall through to the code which is

[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

2022-04-25 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/docs/ClangCommandLineReference.rst:1183-1185 +.. option:: -fmodule-header=\[user,system\] + +Build a C++20 header unit, but search for the header in the user or system header search paths respectively. iains w

[clang] 6035649 - [Serialization] Remove dead TYPE_FUNCTION_PROTO abbreviation. NFC

2022-04-25 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2022-04-25T21:16:54+02:00 New Revision: 6035649d4c763dab83376484c5fe515c2469a1bb URL: https://github.com/llvm/llvm-project/commit/6035649d4c763dab83376484c5fe515c2469a1bb DIFF: https://github.com/llvm/llvm-project/commit/6035649d4c763dab83376484c5fe515c2469a1bb.diff LO

[PATCH] D124063: [LegacyPM] Rename and deprecate populateModulePassManager

2022-04-25 Thread Josh Berdine via Phabricator via cfe-commits
jberdine added a comment. Apologies if this isn't directly related to this patch in particular, but is there a more informative message that could be given than "Migrate to new pass manager"? In particular, for non-C language bindings that currently call `LLVMPassManagerBuilderPopulateModulePas

[clang] 5c90eca - [PS5] Driver test for analyzer defaults

2022-04-25 Thread Paul Robinson via cfe-commits
Author: Paul Robinson Date: 2022-04-25T12:42:00-07:00 New Revision: 5c90ecae2db104a816aeb33b6f773aaf782850e7 URL: https://github.com/llvm/llvm-project/commit/5c90ecae2db104a816aeb33b6f773aaf782850e7 DIFF: https://github.com/llvm/llvm-project/commit/5c90ecae2db104a816aeb33b6f773aaf782850e7.diff

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-04-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/CodeGenCXX/no_auto_return_lambda.cpp:1 +// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s + erichkeane wrote: > So this CodeGen test without a triple is a bit troublesome. The o

[PATCH] D124063: [LegacyPM] Rename and deprecate populateModulePassManager

2022-04-25 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. @jberdine See https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm-c/Transforms/PassBuilder.h for C bindings for the new pass manager. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124063/new/ https://reviews.ll

[libunwind] c98d950 - [libunwind] Fix build warnings in Unwind-EHABI.cpp. NFC.

2022-04-25 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2022-04-25T23:00:52+03:00 New Revision: c98d9502fc6b10caea3cc3db94d85887c38e5892 URL: https://github.com/llvm/llvm-project/commit/c98d9502fc6b10caea3cc3db94d85887c38e5892 DIFF: https://github.com/llvm/llvm-project/commit/c98d9502fc6b10caea3cc3db94d85887c38e5892.diff

[libunwind] 7164c5f - [libunwind] [CMake] Remove leftover no-op cmake variable setting. NFC.

2022-04-25 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2022-04-25T23:01:22+03:00 New Revision: 7164c5f051a980442f2376af4bae3740710bf347 URL: https://github.com/llvm/llvm-project/commit/7164c5f051a980442f2376af4bae3740710bf347 DIFF: https://github.com/llvm/llvm-project/commit/7164c5f051a980442f2376af4bae3740710bf347.diff

[PATCH] D124221: Add new builtin __builtin_reflect_struct.

2022-04-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D124221#3471645 , @erichkeane wrote: > In D124221#3470550 , @aaron.ballman > wrote: > >> In D124221#3469251 , @rsmith wrote: >> >>> - Take any

[PATCH] D124221: Add new builtin __builtin_reflect_struct.

2022-04-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:420 +auto *FD = IFD ? IFD->getAnonField() : dyn_cast(D); +if (!FD || (FD->isUnnamedBitfield() || FD->isAnonymousStructOrUnion())) + continue; yihanaa wrote: > erichkeane wrote:

[clang] 0386213 - [clang][NFC] Inclusive language: remove use of Whitelist in clang/lib/Analysis/

2022-04-25 Thread Quinn Pham via cfe-commits
Author: Quinn Pham Date: 2022-04-25T15:26:36-05:00 New Revision: 0386213352ec42342c756099fcfc6c1165d99e08 URL: https://github.com/llvm/llvm-project/commit/0386213352ec42342c756099fcfc6c1165d99e08 DIFF: https://github.com/llvm/llvm-project/commit/0386213352ec42342c756099fcfc6c1165d99e08.diff LO

[PATCH] D124389: [clang][NFC] Inclusive language: remove use of Whitelist in clang/lib/Analysis/

2022-04-25 Thread Quinn Pham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0386213352ec: [clang][NFC] Inclusive language: remove use of Whitelist in clang/lib/Analysis/ (authored by quinnp). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 425017. zixuw added a comment. - Create FileManager in PrepareToExecuteAction - Use FileManager to load headermaps and reverse lookup mappings - Use FileSystem to correctly get working directory and make absolute paths Repository: rG LLVM Github Monorepo CH

[PATCH] D124382: [Clang] Recognize target address space in superset calculation

2022-04-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. You should be able to provide an address space of the pointer using the number, see details in: https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/Builtins.def#L65 However if language address spaces are needed I wonder if the best approach is jus

[PATCH] D124316: [clang-tidy] Modernize-macro-to-enum should skip macros used in other macros

2022-04-25 Thread Richard via Phabricator via cfe-commits
LegalizeAdulthood added a comment. Gentle ping. I have another change based on this that fixes #55055 Enhance modernize-macro-to-enum to recognize constant literal expressions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D124395: [clang][dataflow] Optimize flow condition representation

2022-04-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Nice! Did you do some measurements? Does this improve the performance or decrease the memory consumption? Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h:160 + void addFlowConditionConstraint(AtomicBoolValue &Token,

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2022-04-25 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a subscriber: ahatanak. ldionne added inline comments. Comment at: clang/lib/Frontend/CompilerInvocation.cpp:4078-4082 + if (!Args.getLastArg(options::OPT_fsized_deallocation, + options::OPT_fno_sized_deallocation)) +Opts.SizedDeallocation

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2022-04-25 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. (BTW I strongly support this patch, I just think we should do it properly on all platforms from the start :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112921/new/ https://reviews.llvm.org/D112921

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2022-04-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ideally, I think, we would set this up to work something like `ObjCRuntime`, where we're making queries to a common place that contains all the information necessary to decide what runtime features are available. In particular, we shouldn't treat Apple platforms as fo

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:134 +if (!SpelledFilename.empty()) + return SpelledFilename.str(); + One problem I can see in this right now is that there might be multiple headermaps that tog

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:134 +if (!SpelledFilename.empty()) + return SpelledFilename.str(); + zixuw wrote: > One problem I can see in this right now is that there might be multiple > he

[PATCH] D124420: [Serialization] Compress serialized macro expansion SLocEntries

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added a project: All. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Macro expansion SLocEntries are significant to PCH size (7-10% in my tests).

[PATCH] D124422: [Serialization] Improve encoding of small SourceRanges.

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ilya-biryukov. Herald added subscribers: usaxena95, kadircet. Herald added a project: All. sammccall requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Instead of encoding as (start,

[clang-tools-extra] 2d014b7 - [test][clangd] Use StringRef instead of std::string

2022-04-25 Thread Vitaly Buka via cfe-commits
Author: Vitaly Buka Date: 2022-04-25T16:38:18-07:00 New Revision: 2d014b72ccb51de9a9627c31667a3edf8cca7616 URL: https://github.com/llvm/llvm-project/commit/2d014b72ccb51de9a9627c31667a3edf8cca7616 DIFF: https://github.com/llvm/llvm-project/commit/2d014b72ccb51de9a9627c31667a3edf8cca7616.diff L

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-04-25 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. ('scuse the delay) Baseline: I'm still not really sure this is the right direction. Is there a sound argument for why this change is suitable for lambdas, but not for other types? I believe all the situations that can happen with other types can happen with lambdas (&

[PATCH] D116203: [clang] adds unary type transformations as compiler built-ins

2022-04-25 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/include/clang/AST/TransformTypeTraits.def:27 +TRANSFORM_TYPE_TRAIT_DEF(RemoveVolatile, remove_volatile) +TRANSFORM_TYPE_TRAIT_DEF(EnumUnderlyingType, underlying_type) This file should undef the `TRANSFORM_TYPE_TRAIT

[PATCH] D124422: [Serialization] Improve encoding of small SourceRanges.

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Bad news: this isn't ready, there are places where ASTWriter calls AddSourceLocation() twice and ASTReader calls ReadSourceRange(). After this change, those are no longer compatible so we have to make them match, and have to audit them all. Good news, there's a bunch

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw added inline comments. Comment at: clang/lib/ExtractAPI/ExtractAPIConsumer.cpp:134 +if (!SpelledFilename.empty()) + return SpelledFilename.str(); + zixuw wrote: > zixuw wrote: > > One problem I can see in this right now is that there might

[PATCH] D123831: [POC][WIP] Use relative include in extract-api

2022-04-25 Thread Zixu Wang via Phabricator via cfe-commits
zixuw updated this revision to Diff 425083. zixuw added a comment. - Rewrite commit message for preparation - Remove shortening paths based on the current working directory: it does not work with angled includes, and unnecessary for our use - XFAIL test known_files_only_hmap.c, as it is not a val

[libunwind] db92019 - [libunwind] Update the test configuration files to support the remote execution.

2022-04-25 Thread Vladimir Vereschaka via cfe-commits
Author: Vladimir Vereschaka Date: 2022-04-25T17:33:03-07:00 New Revision: db92019ab97b9bb13a3287438c4a2fa3ba375756 URL: https://github.com/llvm/llvm-project/commit/db92019ab97b9bb13a3287438c4a2fa3ba375756 DIFF: https://github.com/llvm/llvm-project/commit/db92019ab97b9bb13a3287438c4a2fa3ba375756

[clang] 8e4cd72 - [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC.

2022-04-25 Thread Vladimir Vereschaka via cfe-commits
Author: Vladimir Vereschaka Date: 2022-04-25T17:44:35-07:00 New Revision: 8e4cd7295cb56c2baa6fbed1b739ed974738c307 URL: https://github.com/llvm/llvm-project/commit/8e4cd7295cb56c2baa6fbed1b739ed974738c307 DIFF: https://github.com/llvm/llvm-project/commit/8e4cd7295cb56c2baa6fbed1b739ed974738c307

[PATCH] D124093: [PowerPC] Fixing implicit castings in altivec for -fno-lax-vector-conversions

2022-04-25 Thread Maryam Moghadas via Phabricator via cfe-commits
maryammo updated this revision to Diff 425086. maryammo added a comment. [PowerPC] Address the review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124093/new/ https://reviews.llvm.org/D124093 Files: clang/include/clang/Basic/BuiltinsPP

[PATCH] D124422: [Serialization] Improve encoding of small SourceRanges.

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 425089. sammccall added a comment. Switch reader/writer to use sourcerange encoding for all "obvious" ranges. Gain is now 1.75% in my test PCH. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124422/new/ https

[PATCH] D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.

2022-04-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 425093. vsapsai added a comment. Rebase and update test to use `ptr` instead of `i64*`. Also now the added test is failing for `implementationIvar`, investigating that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D124427: [Serialization] Pack Expr ObjectKind and ValueKind into one VBR.

2022-04-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added a subscriber: usaxena95. Herald added a project: All. sammccall requested review of this revision. Herald added subscribers: cfe-commits, ilya-biryukov. Herald added a project: clang. Most Exprs are serialized unab

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-04-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/test/CodeGenCXX/no_auto_return_lambda.cpp:1 +// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s + erichkeane wrote: > erichkeane wrote: > > So this CodeGen test without a triple is a bit t

[PATCH] D112921: [clang] Enable sized deallocation by default in C++14 onwards

2022-04-25 Thread Wang Pengcheng via Phabricator via cfe-commits
pcwang-thead added a comment. In D112921#3473022 , @ldionne wrote: > (BTW I strongly support this patch, I just think we should do it properly on > all platforms from the start :-) I couldn't agree with you more, but I have no idea how to implement it.

[PATCH] D123924: [clang-apply-replacements] Added an option to ignore insert conflict.

2022-04-25 Thread liushuai wang via Phabricator via cfe-commits
MTC added inline comments. Comment at: clang/include/clang/Tooling/Refactoring/AtomicChange.h:119 + Replacements &getRefReplacements() { return Replaces; } + IMHO, there is no need to rename the method to get the non-const version. The following code is ok e

[PATCH] D121177: [modules] Merge equivalent extensions and diagnose ivar redeclarations for extensions loaded from different modules.

2022-04-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/Serialization/ASTReaderDecl.cpp:1261-1263 + Reader.Diag(IVD->getLocation(), diag::err_duplicate_ivar_declaration) + << II; + Reader.Diag(PrevIvar->getLocation(), diag::note_previous_definition); -

[PATCH] D123319: Change how we handle auto return types for lambda operator() to be consistent with gcc

2022-04-25 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D123319#3473283 , @dblaikie wrote: > ('scuse the delay) > > Baseline: I'm still not really sure this is the right direction. Is there a > sound argument for why this change is suitable for lambdas, but not for other > types? I

[PATCH] D118409: [OpenMPIRBuilder] Remove ContinuationBB argument from Body callback.

2022-04-25 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5571-5579 + { +OMPBuilderCBHelpers::InlinedRegionBodyRAII IRB(*this, AllocaIP, + *FiniBB); +EmitStmt(CS->get

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

2022-04-25 Thread Kugan Vivekanandarajah via Phabricator via cfe-commits
kuganv created this revision. Herald added subscribers: dexonsmith, usaxena95, kadircet, arphaman. Herald added a project: All. kuganv requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added projects: clang, clang-tools-extra. Fixes following

[PATCH] D124434: [Clang][Test] Run tests in C++14 mode explicitly.

2022-04-25 Thread Jun Zhang via Phabricator via cfe-commits
junaire created this revision. junaire added reviewers: dblaikie, nikic, tstellar. Herald added a subscriber: mstorsjo. Herald added a project: All. junaire requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, sstefan1. Herald added a project

[clang] be744da - [analyzer] Fix ValistChecker false-positive involving symbolic pointers

2022-04-25 Thread Balazs Benics via cfe-commits
Author: Balazs Benics Date: 2022-04-26T08:49:05+02:00 New Revision: be744da01f9da0675ba5a3958c03bcd1fdc8ad60 URL: https://github.com/llvm/llvm-project/commit/be744da01f9da0675ba5a3958c03bcd1fdc8ad60 DIFF: https://github.com/llvm/llvm-project/commit/be744da01f9da0675ba5a3958c03bcd1fdc8ad60.diff

[PATCH] D124239: [analyzer] Fix ValistChecker false-positive involving symbolic pointers

2022-04-25 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe744da01f9d: [analyzer] Fix ValistChecker false-positive involving symbolic pointers (authored by steakhal). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D124060: [PowerPC] Enable CR bits support for Power8 and above.

2022-04-25 Thread ChenZheng via Phabricator via cfe-commits
shchenz added a comment. > This patch turns on support for CR bit accesses for Power8 and above. The > reason why CR bits are turned on as the default for Power8 and above is that > because later architectures make use of builtins and instructions that > require CR bit accesses (such as the use

<    1   2