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

2021-10-21 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:813 +const StackSafetyGlobalInfo *SSI = nullptr; +if (ClUseStackSafety) { + SSI = &getAnalysis().getResult(); usually we don't use {} for one liner

[PATCH] D112292: [Clang][OpenMP] Allow loop iteration var with threadprivate directive

2021-10-21 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 created this revision. jyu2 added reviewers: ABataev, mikerice, jdoerfert. jyu2 added projects: clang, OpenMP. Herald added subscribers: guansong, yaxunl. jyu2 requested review of this revision. Herald added a subscriber: sstefan1. Loop iteration var with threadprivate is predetermined as thr

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

2021-10-21 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. In D99#3078184 , @aaron.ballman wrote: > I reviewed this a bit, but I think it might be heading in a slightly wrong > direction. I think you should be using an `AttributedType` but I don't think > we need to add `Attr

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

2021-10-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith @aaron.ballman 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 https://lists.llvm.org/cgi-bin/m

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D109632#3079745 , @vsapsai wrote: > In D109632#3079455 , @rmaz wrote: > >> So given these numbers are we good to go ahead with set dedupe approach? > > I'd rather get an opinion on t

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

2021-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added a reviewer: Bigcheese. Herald added a subscriber: hiraditya. dexonsmith requested review of this revision. Herald added projects: clang, LLVM. Use the new sys::path::system_style() in a few places that need to detect the system's native path style

[PATCH] D112287: [clang] Implement CFG construction for @try and @catch

2021-10-21 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 381450. thakis added a comment. clang-format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112287/new/ https://reviews.llvm.org/D112287 Files: clang/lib/Analysis/CFG.cpp clang/test/Sema/warn-unreachable.m clang/test/Sema/warn-unreachable.mm

[PATCH] D112287: [clang] Implement CFG construction for @try and @catch

2021-10-21 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: rnk. thakis requested review of this revision. @finally is still not implemented. With this, clang can emit -Wreturn-type warnings for functions containing @try/@catch (but not yet @finally), and -Wunreachable-code also works for those functi

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

2021-10-21 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov added a comment. This should be good for re-review now. PTAL. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112098/new/ https://reviews.llvm.org/D112098 ___ cfe-commits mailing list cfe-commit

[PATCH] D112285: [PowerPC] PPC backend optimization to lower int_ppc_tdw/int_ppc_tw intrinsics to TDI/TWI machine instructions

2021-10-21 Thread Victor Huang via Phabricator via cfe-commits
NeHuang created this revision. NeHuang added reviewers: nemanjai, stefanp, PowerPC. NeHuang added a project: LLVM. Herald added subscribers: shchenz, kbarton, hiraditya. NeHuang requested review of this revision. This patch adds the backend optimization to match XL behavior for the two builtins `

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D109632#3079455 , @rmaz wrote: > So given these numbers are we good to go ahead with set dedupe approach? I'd rather get an opinion on this from other reviewers. It's not purely a numbers game, there can be other reasons to p

[PATCH] D111477: DO NOT SUBMIT: workaround for context-sensitive use of non-type-template-parameter integer suffixes

2021-10-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111477/new/ https://reviews.llvm.org/D111477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1708-1710 + // Handle StringLiteral. + if (const auto *SL = dyn_cast(Init)) +return getSValFromStringLiteral(SL, Offset, R->getElementType()); martong wrote: > I

[PATCH] D112284: [Clang][NFC] Clang CUDA codegen: a dyn_cast -> cast instance + clang-tidy fixes

2021-10-21 Thread Uday Bondhugula via Phabricator via cfe-commits
bondhugula updated this revision to Diff 381441. bondhugula added a comment. Drop redundant cast. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112284/new/ https://reviews.llvm.org/D112284 Files: clang/lib/CodeGen/CGCUDANV.cpp Index: clang/lib

[PATCH] D112284: [Clang][NFC] Clang CUDA codegen: a dyn_cast -> cast instance + clang-tidy fixes

2021-10-21 Thread Uday Bondhugula via Phabricator via cfe-commits
bondhugula created this revision. bondhugula added a reviewer: tra. Herald added subscribers: carlosgalvezp, Groverkss, bollu, yaxunl. bondhugula requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Update an instance of dyn_cast -> cast in Clan

[PATCH] D110898: Pass template parameters when printing template argument lists for function templates

2021-10-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110898/new/ https://reviews.llvm.org/D110898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D112280: Support: Use Expected::moveInto() in a few places

2021-10-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. These look good (pending the underlying change). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112280/new/ https://reviews.llvm.org/D112280

[PATCH] D111720: [clang][deps] Ensure reported context hash is strict

2021-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp:56-58 + // Ensure the reported context hash is strict. + CI.getHeaderSearchOpts().ModulesStrictContextHash = true; + jansvoboda11 wrote: > dexonsmith wrote

[PATCH] D74130: [clang] fix consteval call in default arguments

2021-10-21 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 381416. Tyker added a comment. In D74130#3073271 , @aaron.ballman wrote: > @Tyker -- are you planning to pick this review back up again sometime in the > near future? If not, do you care if the review gets commandeered

[PATCH] D111692: [RISCV] Remove Zvamo C intrinsics and builtins.

2021-10-21 Thread Craig Topper 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 rG6c6abb1ded8d: [RISCV] Remove Zvamo C intrinsics and builtins. (authored by craig.topper). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang] c16655f - [docs] Remove Makefile.sphinx files

2021-10-21 Thread Tom Stellard via cfe-commits
Author: Tom Stellard Date: 2021-10-21T16:04:52-07:00 New Revision: c16655f138b1c2b203f6cdac179baa5accf2a737 URL: https://github.com/llvm/llvm-project/commit/c16655f138b1c2b203f6cdac179baa5accf2a737 DIFF: https://github.com/llvm/llvm-project/commit/c16655f138b1c2b203f6cdac179baa5accf2a737.diff

[PATCH] D112030: [docs] Remove Makefile.sphinx files

2021-10-21 Thread Tom Stellard 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 rGc16655f138b1: [docs] Remove Makefile.sphinx files (authored by tstellar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D112280: Support: Use Expected::moveInto() in a few places

2021-10-21 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: lhames, dblaikie. Herald added subscribers: ormris, hiraditya. dexonsmith requested review of this revision. Herald added projects: clang, LLVM. Herald added a subscriber: cfe-commits. These are some usage examples for `Expected::moveIn

Re: [clang] 2bd8493 - Improve type printing of const arrays to normalize array-of-const and const-array

2021-10-21 Thread David Blaikie via cfe-commits
On Thu, Oct 14, 2021 at 2:25 PM David Blaikie wrote: > On Tue, Oct 12, 2021 at 7:35 PM David Blaikie wrote: > >> On Mon, Oct 11, 2021 at 2:46 PM Richard Smith >> wrote: >> >>> On Wed, 15 Sept 2021 at 13:52, David Blaikie wrote: >>> On Tue, Sep 14, 2021 at 10:04 AM Richard Smith wrot

[PATCH] D112271: [clang][Fuchsia] Add additional unit test for availability attr

2021-10-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/test/Sema/attr-availability-fuchsia.c:19 void f7(int) __attribute__((availability(fuchsia, introduced = 16.1))); // expected-warning {{Fuchsia API Le

[PATCH] D110453: [modules] Update visibility for merged ObjCInterfaceDecl definitions.

2021-10-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG048d2c76efcd: [modules] Update visibility for merged ObjCInterfaceDecl definitions. (authored by vsapsai). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1104

[clang] 048d2c7 - [modules] Update visibility for merged ObjCInterfaceDecl definitions.

2021-10-21 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2021-10-21T15:06:39-07:00 New Revision: 048d2c76efcddf4265987914e30d3d4f49395496 URL: https://github.com/llvm/llvm-project/commit/048d2c76efcddf4265987914e30d3d4f49395496 DIFF: https://github.com/llvm/llvm-project/commit/048d2c76efcddf4265987914e30d3d4f49395496.di

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-21 Thread Richard Howell via Phabricator via cfe-commits
rmaz added a comment. I am seeing the clean build times behaving the same as the populated ones, just slower: | *File*| *Baseline (s)* | *Set Dedupe* | *No External* | | IGMFVC.mm | 230| 194 | 195 | | So given these numbers are we good to go ahead with set ded

[clang] 8c13680 - PR18733: Remove -Wweak-template-vtables

2021-10-21 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2021-10-21T14:50:20-07:00 New Revision: 8c136805242014b6ad9ff1afcac9d7f4a18bec3f URL: https://github.com/llvm/llvm-project/commit/8c136805242014b6ad9ff1afcac9d7f4a18bec3f DIFF: https://github.com/llvm/llvm-project/commit/8c136805242014b6ad9ff1afcac9d7f4a18bec3f.diff

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

2021-10-21 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:812 bool runOnFunction(Function &F) override { +if (ClUseStackSafety) { + report_fatal_error("Stack safety analysis is not supported " fmayer wrote:

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

2021-10-21 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 381391. kstoimenov added a comment. Added support for legacy pass manager and a test for it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112098/new/ https://reviews.llvm.org/D112098 Files: llvm/include/

[PATCH] D112271: [clang][Fuchsia] Add additional unit test for availability attr

2021-10-21 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. haowei added reviewers: phosek, leonardchan, gulfem. Herald added a subscriber: abrachet. haowei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change adds additional unit tests for availability attribute

[PATCH] D111283: [clang] template / auto deduction deduces common sugar

2021-10-21 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D111283#3056748 , @rsmith wrote: > Do you have examples showing what this does in practice for errors in > real-world code? I'm concerned that stripping back to the common type sugar > may produce an unintuitive result in som

[PATCH] D110453: [modules] Update visibility for merged ObjCInterfaceDecl definitions.

2021-10-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 381383. vsapsai added a comment. Rebase to trigger pre-merge checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110453/new/ https://reviews.llvm.org/D110453 Files: clang/lib/Serialization/ASTReaderDecl.cp

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

2021-10-21 Thread Florian Mayer via Phabricator via cfe-commits
fmayer added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:812 bool runOnFunction(Function &F) override { +if (ClUseStackSafety) { + report_fatal_error("Stack safety analysis is not supported " kstoimenov wrote:

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

2021-10-21 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov marked 4 inline comments as done. kstoimenov added inline comments. Comment at: clang/test/CodeGen/asan-stack-safety-analysis.c:1 +// REQUIRES: x86-registered-target + fmayer wrote: > fmayer wrote: > > Should this file be in llvm/test/Instrumentation/

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

2021-10-21 Thread Florian Mayer via Phabricator via cfe-commits
fmayer added a comment. I think you also want to use `SSI->isSafe(AllocaInst*)` in `isInterestingAlloca` to prevent use-after-scope instrumentation if all accesses are safe. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112098/new/ https://review

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

2021-10-21 Thread Kirill Stoimenov via Phabricator via cfe-commits
kstoimenov updated this revision to Diff 381365. kstoimenov added a comment. Removed the top level flag and addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112098/new/ https://reviews.llvm.org/D112098 Files: llvm/include/llvm/A

[PATCH] D110452: [modules] Fix tracking ObjCInterfaceType decl when there are multiple definitions.

2021-10-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd9eca3320a4d: [modules] Fix tracking ObjCInterfaceType decl when there are multiple… (authored by vsapsai). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110

[clang] d9eca33 - [modules] Fix tracking ObjCInterfaceType decl when there are multiple definitions.

2021-10-21 Thread Volodymyr Sapsai via cfe-commits
Author: Volodymyr Sapsai Date: 2021-10-21T12:08:06-07:00 New Revision: d9eca3320a4d8db11ad65229ef6f564d134fc894 URL: https://github.com/llvm/llvm-project/commit/d9eca3320a4d8db11ad65229ef6f564d134fc894 DIFF: https://github.com/llvm/llvm-project/commit/d9eca3320a4d8db11ad65229ef6f564d134fc894.di

[PATCH] D106681: [analyzer][NFCI] Move a block from `getBindingForElement` to separate functions

2021-10-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/test/Analysis/initialization.c:103 +void glob_arr_index4() { + clang_analyzer_eval(glob_arr_no_init[2]); // expected-warning{{UNKNOWN}} +} ASDenysPetrov wrote: > steakhal wrote: > > ASDenysPetrov wrote: > >

[PATCH] D106681: [analyzer][NFCI] Move a block from `getBindingForElement` to separate functions

2021-10-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added inline comments. Comment at: clang/test/Analysis/initialization.c:103 +void glob_arr_index4() { + clang_analyzer_eval(glob_arr_no_init[2]); // expected-warning{{UNKNOWN}} +} steakhal wrote: > ASDenysPetrov wrote: > > ASDenysPetrov wrote: > >

[PATCH] D110436: Add %n format specifier warning to clang-tidy

2021-10-21 Thread Jayson Yan via Phabricator via cfe-commits
Jaysonyan added inline comments. Herald added a subscriber: carlosgalvezp. Comment at: clang-tools-extra/clang-tidy/bugprone/PercentNFormatSpecifierCheck.cpp:89 +Result.Context->getTargetInfo()); +diag(loc, "usage of %%n can lead to unsafe writing to memory"); + } -

Re: [PATCH] D101192: Add support for #elifdef and #elifndef

2021-10-21 Thread Aaron Ballman via cfe-commits
On Thu, Oct 21, 2021 at 2:40 PM Richard Smith - zygoloid via Phabricator wrote: > > rsmith added a comment. > > > In this version of the patch, I am supporting the feature in all C and C++ > > modes. This seems like more useful functionality than diagnosing an unknown > > preprocessor directive

[PATCH] D112257: [www] Fix Ninja build instructions on Windows

2021-10-21 Thread Frederik Seiffert via Phabricator via cfe-commits
triplef created this revision. triplef added reviewers: aaron.ballman, Loghorn. triplef requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The `clang` target used in the line below is only generated with `LLVM_ENABLE_PROJECTS=clang`. Without

[PATCH] D101192: Add support for #elifdef and #elifndef

2021-10-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. > In this version of the patch, I am supporting the feature in all C and C++ > modes. This seems like more useful functionality than diagnosing an unknown > preprocessor directive in older language modes, and is a conforming extension > in those modes anyway as use of an

[PATCH] D112253: [test] Make sure plugin actually runs in clear-ast-before-backend-plugins.c

2021-10-21 Thread Arthur Eubanks 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 rGfdb66eda77a0: [test] Make sure plugin actually runs in clear-ast-before-backend-plugins.c (authored by aeubanks). Repository: rG LLVM Github Monor

[clang] fdb66ed - [test] Make sure plugin actually runs in clear-ast-before-backend-plugins.c

2021-10-21 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2021-10-21T11:38:16-07:00 New Revision: fdb66eda77a00d4ff0cb2730290f0fadf7840770 URL: https://github.com/llvm/llvm-project/commit/fdb66eda77a00d4ff0cb2730290f0fadf7840770 DIFF: https://github.com/llvm/llvm-project/commit/fdb66eda77a00d4ff0cb2730290f0fadf7840770.diff

[PATCH] D112253: [test] Make sure plugin actually runs in clear-ast-before-backend-plugins.c

2021-10-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112253/new/ https://reviews.llvm.org/D112253

[PATCH] D109632: [clang] de-duplicate methods from AST files

2021-10-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. Curiously, the results for the second project are unexpected and bizarre. | **File**| **Baseline (s)** | **Set Dedupe (s)** | **No external (s)** | **Set Dedupe (percentage of baseline)** | **No external (percentage of baseline)** | | Project2. File1 | 0.3785821

[PATCH] D112253: [test] Make sure plugin actually runs in clear-ast-before-backend-plugins.c

2021-10-21 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks created this revision. aeubanks added a reviewer: dblaikie. aeubanks requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D112253 Files: clang/test/Misc/clear-ast-before

[PATCH] D112190: [clang] Don't clear AST if we have consumers running after the main action

2021-10-21 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/test/Misc/clear-ast-before-backend-plugins.c:3-8 +// RUN: %clang_cc1 -mllvm -debug-only=codegenaction -clear-ast-before-backend -emit-obj -o /dev/null -load %llvmshlibdir/PrintFunctionNames%pluginext %s 2>&1 | FileCheck %s --che

[PATCH] D112190: [clang] Don't clear AST if we have consumers running after the main action

2021-10-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/test/Misc/clear-ast-before-backend-plugins.c:3-8 +// RUN: %clang_cc1 -mllvm -debug-only=codegenaction -clear-ast-before-backend -emit-obj -o /dev/null -load %llvmshlibdir/PrintFunctionNames%pluginext %s 2>&1 | FileCheck %s --che

[PATCH] D110257: [CFE][Codegen] Make sure to maintain the contiguity of all the static allocas

2021-10-21 Thread Mahesha S via Phabricator via cfe-commits
hsmhsm added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110257/new/ https://reviews.llvm.org/D110257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] 408075e - Add the papers that were applied to the latest C2x working draft

2021-10-21 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-10-21T13:38:57-04:00 New Revision: 408075ec6a955998eea3549fa7f79c512c6b02d1 URL: https://github.com/llvm/llvm-project/commit/408075ec6a955998eea3549fa7f79c512c6b02d1 DIFF: https://github.com/llvm/llvm-project/commit/408075ec6a955998eea3549fa7f79c512c6b02d1.diff

[PATCH] D110452: [modules] Fix tracking ObjCInterfaceType decl when there are multiple definitions.

2021-10-21 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 381313. vsapsai added a comment. Another rebase and pre-merge checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110452/new/ https://reviews.llvm.org/D110452 Files: clang/include/clang/AST/Type.h clang/

[PATCH] D112235: [HIP][OpenMP] Fix assertion in deferred diag due to incomplete class definition

2021-10-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a reviewer: rsmith. tra added a subscriber: rsmith. tra added a comment. Looks reasonable to me, but, considering that it's generic C++ code, I think it would be prudent go double check that. @rsmith - WDYT? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112235/new/ https://r

[PATCH] D112235: [HIP][OpenMP] Fix assertion in deferred diag due to incomplete class definition

2021-10-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, rjmccall. Herald added a subscriber: guansong. yaxunl requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Fix assertion in UsedDeclVisitor where clang is trying to look up a destructo

[PATCH] D110436: Add %n format specifier warning to clang-tidy

2021-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PercentNFormatSpecifierCheck.cpp:43-57 + auto PrintfDecl = functionDecl(hasName("::printf")); + auto FprintfDecl = functionDecl(hasName("::fprintf")); + auto VfprintfDecl = functionDecl(has

[PATCH] D110925: [clangd] Follow-up on rGdea48079b90d

2021-10-21 Thread ntfshard via Phabricator via cfe-commits
ntfshard added a comment. Still not sure, getHashValue function returns unsigned, but seems it should return hash_code or result of operator size_t() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110925/new/ https://reviews.llvm.org/D110925 _

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1708-1710 + // Handle StringLiteral. + if (const auto *SL = dyn_cast(Init)) +return getSValFromStringLiteral(SL, Offset, R->getElementType()); I am wondering why this h

[clang] 19b07ec - Reland [clang] Pass -clear-ast-before-backend in Clang::ConstructJob()

2021-10-21 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2021-10-21T09:25:53-07:00 New Revision: 19b07ec00062daffcb2fb132f4ac0f2484ff44fa URL: https://github.com/llvm/llvm-project/commit/19b07ec00062daffcb2fb132f4ac0f2484ff44fa DIFF: https://github.com/llvm/llvm-project/commit/19b07ec00062daffcb2fb132f4ac0f2484ff44fa.diff

[PATCH] D110436: Add %n format specifier warning to clang-tidy

2021-10-21 Thread Jayson Yan via Phabricator via cfe-commits
Jaysonyan added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/PercentNFormatSpecifierCheck.cpp:43-57 + auto PrintfDecl = functionDecl(hasName("::printf")); + auto FprintfDecl = functionDecl(hasName("::fprintf")); + auto VfprintfDecl = functionDecl(hasName

[clang] acfe7d8 - Update the title and encoding for the C++ status page

2021-10-21 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-10-21T12:14:44-04:00 New Revision: acfe7d895d2f0897fe8f79151a491e75a7a99a25 URL: https://github.com/llvm/llvm-project/commit/acfe7d895d2f0897fe8f79151a491e75a7a99a25 DIFF: https://github.com/llvm/llvm-project/commit/acfe7d895d2f0897fe8f79151a491e75a7a99a25.diff

[clang] cfca2ae - Update the C++ and C status pages now that Clang 13 has been released

2021-10-21 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2021-10-21T12:13:19-04:00 New Revision: cfca2ae1f5babaf0877bbd3ce8665b9db3344411 URL: https://github.com/llvm/llvm-project/commit/cfca2ae1f5babaf0877bbd3ce8665b9db3344411 DIFF: https://github.com/llvm/llvm-project/commit/cfca2ae1f5babaf0877bbd3ce8665b9db3344411.diff

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added subscribers: ronlieb, pdhaliwal, carlo.bertolli, gregrodgers, dpalermo. JonChesterfield added a comment. Subscribed some AMD people to this. I wanted to apply this patch as-is to amd-stg-open to feed it to the internal testing, but it doesn't apply because Driver/ToolChain

[PATCH] D112230: [OpenCL] Add support of __opencl_c_device_enqueue feature macro.

2021-10-21 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added a comment. @Anastasia, @yaxunl, do you think it's possible to refactor code generation for blocks such that block literal for global blocks (with no captures) would be emitted in constant address space? Now it's emitted in global address space (for example @__block_literal_globa

[PATCH] D112190: [clang] Don't clear AST if we have consumers running after the main action

2021-10-21 Thread Arthur Eubanks via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2dcad7754a20: [clang] Don't clear AST if we have consumers running after the main action (authored by aeubanks). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[clang] 2dcad77 - [clang] Don't clear AST if we have consumers running after the main action

2021-10-21 Thread Arthur Eubanks via cfe-commits
Author: Arthur Eubanks Date: 2021-10-21T09:03:57-07:00 New Revision: 2dcad7754a204d5dbb78fef8f6b13cd005456e33 URL: https://github.com/llvm/llvm-project/commit/2dcad7754a204d5dbb78fef8f6b13cd005456e33 DIFF: https://github.com/llvm/llvm-project/commit/2dcad7754a204d5dbb78fef8f6b13cd005456e33.diff

[PATCH] D112190: [clang] Don't clear AST if we have consumers running after the main action

2021-10-21 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/test/Misc/clear-ast-before-backend-plugins.c:3-8 +// RUN: %clang_cc1 -mllvm -debug-only=codegenaction -clear-ast-before-backend -emit-obj -o /dev/null -load %llvmshlibdir/PrintFunctionNames%pluginext %s 2>&1 | FileCheck %s --che

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: openmp/libomptarget/DeviceRTL/src/Configuration.cpp:23 -extern uint32_t __omp_rtl_debug_kind; +// extern uint32_t __omp_rtl_debug_kind; jdoerfert wrote: > JonChesterfield wrote: > > Otherwise the missing symb

[PATCH] D112230: [OpenCL] Add support of __opencl_c_device_enqueue feature macro.

2021-10-21 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov created this revision. azabaznov added reviewers: Anastasia, yaxunl, svenvh. Herald added a subscriber: ldrumm. azabaznov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This feature requires support of __opencl_c_generic_address_

[PATCH] D112229: Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms

2021-10-21 Thread Ben Langmuir 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 rGb8da59475076: Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms (authored by benlangmuir). Repository: rG LLVM Githu

[clang] b8da594 - Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms

2021-10-21 Thread Ben Langmuir via cfe-commits
Author: Ben Langmuir Date: 2021-10-21T09:00:18-07:00 New Revision: b8da594750762f811283820c19b02cedfb6632d4 URL: https://github.com/llvm/llvm-project/commit/b8da594750762f811283820c19b02cedfb6632d4 DIFF: https://github.com/llvm/llvm-project/commit/b8da594750762f811283820c19b02cedfb6632d4.diff

[clang] dccfadd - [clang] Use StringRef::contains (NFC)

2021-10-21 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2021-10-21T08:58:19-07:00 New Revision: dccfaddc6bcc711bd972b43bff5ce6d71c1b39dc URL: https://github.com/llvm/llvm-project/commit/dccfaddc6bcc711bd972b43bff5ce6d71c1b39dc DIFF: https://github.com/llvm/llvm-project/commit/dccfaddc6bcc711bd972b43bff5ce6d71c1b39dc.diff L

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-21 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/DeviceRTL/src/Configuration.cpp:23 -extern uint32_t __omp_rtl_debug_kind; +// extern uint32_t __omp_rtl_debug_kind; JonChesterfield wrote: > Otherwise the missing symbols prevents linking, not c

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

2021-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I reviewed this a bit, but I think it might be heading in a slightly wrong direction. I think you should be using an `AttributedType` but I don't think we need to add `AttributedBTFType` as a subclass to do this. An `AttributedType` holds the type kind information

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @martong > I am close to accepting this. However, D111542 > should be its parent patch. I think > similar issues could arise here as well, so, redecl chain tests would be > really beneficial. I think I'm done. You can proceed t

[PATCH] D111566: [SYCL] Fix function pointer address space

2021-10-21 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added inline comments. Comment at: clang/lib/CodeGen/CodeGenTypes.cpp:636-638 +unsigned AS = PointeeType->isFunctionTy() + ? getDataLayout().getProgramAddressSpace() + : Context.getTargetAddressSpace(ETy); aa

[PATCH] D110129: [DebugInfo] Support typedef with btf_decl_tag attributes

2021-10-21 Thread Yonghong Song 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 rGf6811cec8421: [DebugInfo] Support typedef with btf_decl_tag attributes (authored by yonghong-song). Repository: rG LLVM Github Monorepo CHANGES S

[clang] f6811ce - [DebugInfo] Support typedef with btf_decl_tag attributes

2021-10-21 Thread Yonghong Song via cfe-commits
Author: Yonghong Song Date: 2021-10-21T08:42:58-07:00 New Revision: f6811cec84218912d1c7c9b0b8d308834e6e24e3 URL: https://github.com/llvm/llvm-project/commit/f6811cec84218912d1c7c9b0b8d308834e6e24e3 DIFF: https://github.com/llvm/llvm-project/commit/f6811cec84218912d1c7c9b0b8d308834e6e24e3.diff

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. In D107339#3075306 , @steakhal wrote: > Why does `glob_invalid_index7()` and `glob_invalid_index8()` differ in > behavior? > I would expect that the analyzer produces the same `Loc` symbolic value for > both cases thus, th

[PATCH] D112229: Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms

2021-10-21 Thread Lang Hames via Phabricator via cfe-commits
lhames accepted this revision. lhames added a comment. This revision is now accepted and ready to land. LGTM. Thanks Ben. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112229/new/ https://reviews.llvm.org/D112229 __

[PATCH] D112229: Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms

2021-10-21 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added inline comments. Comment at: clang/cmake/caches/CrossWinToARMLinux.cmake:104 set(COMPILER_RT_BUILD_CRT OFF CACHE BOOL "") +set(COMPILER_RT_BUILD_ORC OFF CACHE BOOL "") set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOO

[PATCH] D112229: Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms

2021-10-21 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir created this revision. benlangmuir added a reviewer: lhames. Herald added subscribers: kristof.beyls, mgorny. benlangmuir requested review of this revision. Herald added projects: clang, Sanitizers. Herald added subscribers: Sanitizers, cfe-commits. Reapply 5692ed0cce8c95

[PATCH] D110127: [Clang] Support typedef with btf_decl_tag attributes

2021-10-21 Thread Yonghong Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb396010240cd: [Clang] Support typedef with btf_decl_tag attributes (authored by yonghong-song). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110127/new/ ht

[clang] b396010 - [Clang] Support typedef with btf_decl_tag attributes

2021-10-21 Thread Yonghong Song via cfe-commits
Author: Yonghong Song Date: 2021-10-21T08:41:49-07:00 New Revision: b396010240cda92f5fcfa30cba1b9ad905561eae URL: https://github.com/llvm/llvm-project/commit/b396010240cda92f5fcfa30cba1b9ad905561eae DIFF: https://github.com/llvm/llvm-project/commit/b396010240cda92f5fcfa30cba1b9ad905561eae.diff

[PATCH] D111566: [SYCL] Fix function pointer address space

2021-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: rjmccall, erichkeane, Anastasia. aaron.ballman added a comment. Adding a few more reviewers with more familiarity with codegen and address spaces to make sure we've not missed something here outside of SYCL. Comment at: clang/lib/CodeGen/CodeGenT

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: openmp/libomptarget/DeviceRTL/src/Configuration.cpp:23 -extern uint32_t __omp_rtl_debug_kind; +// extern uint32_t __omp_rtl_debug_kind; Otherwise the missing symbols prevents linking, not clear why it works o

[PATCH] D112227: [libomptarget] Build DeviceRTL for amdgpu

2021-10-21 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield created this revision. Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, yaxunl, mgorny, nhaehnle, jvesely, kzhuravl. JonChesterfield requested review of this revision. Herald added subscribers: openmp-commits, cfe-commits, sstefan1, wdng. Herald added a reviewer: jdoerfert

[PATCH] D107339: [analyzer] Retrieve a character from StringLiteral as an initializer for constant arrays.

2021-10-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 381274. ASDenysPetrov added a comment. Rebased. Improved behavior to make `glob_invalid_index8` case passed and some other cases. Added more tests. Added tests for universal characters. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107339/new/

[PATCH] D90996: [clang-format] Add --staged/--cached option to git-clang-format

2021-10-21 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal added inline comments. Comment at: clang/tools/clang-format/git-clang-format:140 if not opts.diff: die('--diff is required when two commits are given') else: lodato wrote: > Does there need to be an equivalent check that --staged requires

[PATCH] D111100: enable plugins for clang-tidy

2021-10-21 Thread Jameson Nash via Phabricator via cfe-commits
vtjnash added a comment. bump? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D00/new/ https://reviews.llvm.org/D00 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D90996: [clang-format] Add --staged/--cached option to git-clang-format

2021-10-21 Thread Erik Larsson via Phabricator via cfe-commits
ortogonal updated this revision to Diff 381269. ortogonal added a comment. Update description on function `compute_diff` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90996/new/ https://reviews.llvm.org/D90996 Files: clang/tools/clang-format/git

[PATCH] D112221: Mark ATOMIC_VAR_INIT and ATOMIC_FLAG_INIT as deprecated

2021-10-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman created this revision. aaron.ballman added reviewers: rsmith, ldionne, cjdb, erichkeane. aaron.ballman requested review of this revision. Herald added a project: clang. C17 deprecated `ATOMIC_VAR_INIT` with the resolution of DR 485. C++ followed suit when adopting P0883R2 for C++20,

[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

2021-10-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added a comment. In D70172#3077696 , @hokein wrote: > This patch seems to cause a new crash, details are at > https://bugs.llvm.org/show_bug.cgi?id=52250. I will take a look. Thanks. CHANGES SINCE LAST AC

[PATCH] D110925: [clangd] Follow-up on rGdea48079b90d

2021-10-21 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked an inline comment as done. kbobyrev added inline comments. Comment at: llvm/include/llvm/Support/FileSystem/UniqueID.h:68 +return hash_value( +std::pair(Tag.getDevice(), Tag.getFile())); + } ntfshard wrote: > In this line a narrow con

Re: [clang] 2edb89c - Lex arguments for __has_cpp_attribute and friends as expanded tokens

2021-10-21 Thread Aaron Ballman via cfe-commits
On Mon, Oct 18, 2021 at 4:13 PM Richard Smith wrote: > > On Mon, 18 Oct 2021 at 12:56, Aaron Ballman wrote: >> >> On Mon, Oct 18, 2021 at 3:52 PM Richard Smith wrote: >> > >> > On Mon, 18 Oct 2021 at 12:48, Aaron Ballman >> > wrote: >> >> >> >> On Mon, Oct 18, 2021 at 3:33 PM Richard Smith

[PATCH] D111542: [analyzer] Retrieve incomplete array extent from its redeclaration.

2021-10-21 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov updated this revision to Diff 381252. ASDenysPetrov added a comment. Rebased. Updated comment for obscure behaviour of `getAnyInitializer` function. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111542/new/ https://reviews.llvm.org/D111542 Files: clang/lib/StaticAnalyze

[PATCH] D110925: [clangd] Follow-up on rGdea48079b90d

2021-10-21 Thread ntfshard via Phabricator via cfe-commits
ntfshard added a comment. It seems I faced with degradation in compile time. Comment at: llvm/include/llvm/Support/FileSystem/UniqueID.h:68 +return hash_value( +std::pair(Tag.getDevice(), Tag.getFile())); + } In this line a narrow conversion, and M

  1   2   >