[PATCH] D137227: [asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

2022-11-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. At least for WebAssembly object files, it looks like the symbol table now contains (what look like) demangled symbols. e.g.: $ llvm-nm /tmp/emscripten_temp/command_0.o 3ef5 D __odr_asan_gen__numargs 41a6 D __odr_asan_gen__stdcmd<1068>::init 41c3 D __

[PATCH] D137227: [asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

2022-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D137227#3908994 , @sbc100 wrote: > At least for WebAssembly object files, it looks like the symbol table now > contains (what look like) demangled symbols. e.g.: > > $ llvm-nm /tmp/emscripten_temp/command_0.o > 3ef5

[PATCH] D137458: [clang] Add __decay as a builtin template

2022-11-04 Thread Troy Johnson via Phabricator via cfe-commits
troyj created this revision. troyj added a reviewer: bruno. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. troyj requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. `__decay(T)` exists as a bui

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-04 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 473316. tbaeder added a comment. It's not really all that interesting since the current interpreter already does all the work, but it works like this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 Files

[PATCH] D136786: Fix `unsafe-fp-math` attribute emission.

2022-11-04 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D136786#3907235 , @michele.scandale wrote: > In D136786#3903646 , @zahiraam > wrote: > >> The changes in this patch look good to me. >> @michele.scandale please make sure not to dro

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. On the topic of supporting BF16 arithmetic, note my comment here: https://github.com/itanium-cxx-abi/cxx-abi/pull/147#issuecomment-1254078916. To summarize, according to Steve Canon, we really shouldn't implement arithmetic directly in the BF16 format, because the pre

[PATCH] D137227: [asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

2022-11-04 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. > The asan instrumentation just prepends `__odr_asan_gen_` to the symbol name > to form a new symbol name. For ELF every byte except `\0` can be used in a > symbol name, and this is totally fine. > > I am unfamiliar with WebAssembly. Does the aforementioned parsing tool

[PATCH] D137329: [flang] Add -f[no-]associative-math and -mreassociate

2022-11-04 Thread Valentin Clement via Phabricator via cfe-commits
clementval added a comment. Herald added a subscriber: jdoerfert. Wouldn't it be good to have a RFC for all these options and what they will do in Flang instead of just adding them all? Or did I miss the RFC? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D105584: [MLIR][OpenMP] Distribute Construct Operation

2022-11-04 Thread Valentin Clement via Phabricator via cfe-commits
clementval added inline comments. Comment at: mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td:449 ParentOneOf<["WsLoopOp", "ReductionDeclareOp", - "AtomicUpdateOp", "SimdLoopOp"]>]> { + "AtomicUpdateOp", "SimdLoopOp","DistributeOp"]>]> { let summary = "loop yield

[PATCH] D134859: [clang][Interp] Implement basic support for floating point values

2022-11-04 Thread Joshua Cranmer via Phabricator via cfe-commits
jcranmer-intel added inline comments. Comment at: clang/lib/AST/Interp/Interp.cpp:487 + if (S.inConstantContext()) +return true; + Not sure I understand the conditions that cause `S.inConstantContext()` to be true, which gives me some cause for concern. Add

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-11-04 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 473321. samitolvanen marked 6 inline comments as done. samitolvanen added a comment. Addressed Fangrui's feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135411/new/ https://reviews.llvm.org/D135411

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-11-04 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:61 + if (F.hasFnAttribute("patchable-function-prefix")) +report_fatal_error("-fpatchable-function-entry=N,M, where M>0 is not " + "compatible with -fsanitize=kc

[PATCH] D137227: [asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

2022-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D137227#3909056 , @sbc100 wrote: >> The asan instrumentation just prepends `__odr_asan_gen_` to the symbol name >> to form a new symbol name. For ELF every byte except `\0` can be used in a >> symbol name, and this is totally

[PATCH] D134816: [OpenMP] Account for the possibility of multiple target regions per line

2022-11-04 Thread Mike Rice via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc954cfeb57a1: Some uses of the preprocessor can result in multiple target regions on the (authored by mikerice). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLV

[clang] c954cfe - Some uses of the preprocessor can result in multiple target regions on the

2022-11-04 Thread Mike Rice via cfe-commits
Author: Mike Rice Date: 2022-11-04T12:54:22-07:00 New Revision: c954cfeb57a1c8c0996a34da64243bc7f7fe1107 URL: https://github.com/llvm/llvm-project/commit/c954cfeb57a1c8c0996a34da64243bc7f7fe1107 DIFF: https://github.com/llvm/llvm-project/commit/c954cfeb57a1c8c0996a34da64243bc7f7fe1107.diff LOG

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:61 + if (F.hasFnAttribute("patchable-function-prefix")) +report_fatal_error("-fpatchable-function-entry=N,M, where M>0 is not " + "compatible with -fsanitize=kcfi on

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-04 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D136919#3909044 , @rjmccall wrote: > If Steve's argument is true, that suggests that it would be a waste for NVPTX > to directly support BF16 arithmetic, at least not the same way it would > support `float` or `double`. (Providi

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Alex Brachet via Phabricator via cfe-commits
abrachet added a comment. Hi, we're hitting an assertion failure after this patch llvm-project/clang/lib/Sema/SemaDecl.cpp:15589: Decl *clang::Sema::ActOnFinishFunctionBody(Decl *, Stmt *, bool): Assertion `MaybeODRUseExprs.empty() && "Leftover expressions for odr-use checking"' failed. Her

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D136554#3909196 , @abrachet wrote: > Hi, we're hitting an assertion failure after this patch > > llvm-project/clang/lib/Sema/SemaDecl.cpp:15589: Decl > *clang::Sema::ActOnFinishFunctionBody(Decl *, Stmt *, bool): Assertion

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Alex Brachet via Phabricator via cfe-commits
abrachet added a comment. In D136554#3909198 , @cor3ntin wrote: > In D136554#3909196 , @abrachet > wrote: > >> Hi, we're hitting an assertion failure after this patch >> >> llvm-project/clang/lib/Sema/SemaDecl.

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Fascinating. Looking more at the error it seems slightly different than what we fixed this morning. I'll revert soon when I'm at a computer. Feel free to do it earlier if it's urgent for you Sorry for the inconvenience. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Reverting now, just re-running the tests to be sure Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 ___ cfe-commits mailing list cfe-c

[PATCH] D137458: [clang] Add __decay as a builtin template

2022-11-04 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added a comment. I worry about this mangling issue https://github.com/llvm/llvm-project/issues/54993. For std::make_index_sequence that wasn't that big of a deal, since nobody really uses that as return type of (template) functions, but my guess is that enough people do things like

[clang] 35a870c - Revert "Implement CWG2631"

2022-11-04 Thread Corentin Jabot via cfe-commits
Author: Corentin Jabot Date: 2022-11-04T22:10:50+01:00 New Revision: 35a870c30aaa9b16ccb45a9222471433b43ae66c URL: https://github.com/llvm/llvm-project/commit/35a870c30aaa9b16ccb45a9222471433b43ae66c DIFF: https://github.com/llvm/llvm-project/commit/35a870c30aaa9b16ccb45a9222471433b43ae66c.diff

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-11-04 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 473340. samitolvanen marked 4 inline comments as done. samitolvanen added a comment. Added `KCFIDiagnosticInfo` and switched from `report_fatal_error` to `LLVMContext::diagnose`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @abrachet Reverted, sorry again @aaron.ballman @shafik feel free to investigate the issue, i won't have the opportunity over the next two weeks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llv

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 473341. cor3ntin added a comment. Reopening with subsequent changes merged. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 Files: clang/docs/ReleaseNotes.rst cl

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/KCFI.cpp:42 +namespace { +class KCFIDiagnosticInfo : public DiagnosticInfo { + const Twine &Msg; If you look at existing DiagnosticInfo subclasses, the

[PATCH] D137458: [clang] Add __decay as a builtin template

2022-11-04 Thread Troy Johnson via Phabricator via cfe-commits
troyj added a comment. > Also, it would be nice to have some numbers for the 'measurably faster' claim > :) Sure. Here's an example of a library change that started using builtins for `__make_integer_seq` and `__type_pack_element` https://github.com/facebook/fatal/commit/58102a3f7e66ad122d7d33

[PATCH] D128457: [clangd] Add new IncludeType to IncludeHeaderWithReferences

2022-11-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 473347. dgoldman marked an inline comment as done. dgoldman added a comment. Fixes for review - Swap over IncludeType to IncludeDirective and update the protos accordingly Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D128457: [clangd] Add new IncludeType to IncludeHeaderWithReferences

2022-11-04 Thread David Goldman via Phabricator via cfe-commits
dgoldman marked 4 inline comments as done. dgoldman added a comment. Also LMK if you want more in this change (such as a flag to control it, just not sure where it should live + what it should be called). Comment at: clang-tools-extra/clangd/index/Symbol.h:116 +/// this he

[PATCH] D135411: Add generic KCFI operand bundle lowering

2022-11-04 Thread Sami Tolvanen via Phabricator via cfe-commits
samitolvanen updated this revision to Diff 473348. samitolvanen added a comment. Addressed more feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135411/new/ https://reviews.llvm.org/D135411 Files: clang/lib/CodeGen/BackendUtil.cpp clang

[clang] de14bef - Remove redundant loads.

2022-11-04 Thread Jennifer Yu via cfe-commits
Author: Jennifer Yu Date: 2022-11-04T15:22:25-07:00 New Revision: de14befa7730093ff3d46c7628fa1084f251e98d URL: https://github.com/llvm/llvm-project/commit/de14befa7730093ff3d46c7628fa1084f251e98d DIFF: https://github.com/llvm/llvm-project/commit/de14befa7730093ff3d46c7628fa1084f251e98d.diff L

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-04 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 closed this revision. jyu2 added a comment. de14befa7730093ff3d46c7628fa1084f251e98d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137313/new/ https://reviews.llvm.org/D137

[PATCH] D137470: [Offloading] Initial support for registering offloading entries on COFF targets

2022-11-04 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, jdoerfert, tianshilei1992, JonChesterfield, yaxunl, rnk. Herald added a subscriber: hiraditya. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. Herald

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added subscribers: rsmith, dblaikie. dblaikie added a comment. fwiw, @rsmith came up with a crasher reproducer from this patch here: template struct F { template F(const U&) {} }; struct A { static constexpr auto x = [] {}; F f = x; }; void f(A a = A())

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Looks like it's distinct from the other reported crash, this one crashes with: clang-16: /usr/local/google/home/blaikie/dev/llvm/src/clang/lib/CodeGen/CGExpr.cpp:2811: clang::CodeGen::LValue clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(const clang::DeclRefExpr

[PATCH] D136554: Implement CWG2631

2022-11-04 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D136554#3909488 , @dblaikie wrote: > fwiw, @rsmith came up with a crasher reproducer from this patch here: > > template struct F { > template F(const U&) {} > }; > > struct A { > static constexpr auto x =

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-04 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a comment. [AMD Official Use Only - General] Please look into AMDGPU bot fail https://lab.llvm.org/buildbot/#/builders/193/builds/21319 Get Outlook for iOShttps://aka.ms/o0ukef From: Jennifer Yu via Phabricator Sent: Friday, November 4, 2022 5:40

[PATCH] D119493: Fixing surplus assert condition in EvaluateTemporary

2022-11-04 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. In D119493#3403458 , @efriedma wrote: > Thank Eli for your comment and guidance and sorry to have carelessly neglected your comment for 7 months! > I'm not sure this is the right fix. If we were handling the pseudo-destruct

[PATCH] D137263: add boundary check for ASTUnresolvedSet::erase

2022-11-04 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. Thank Ray for editing the summary for me ;-) I learned to use fenced code blocks now from your example. Thank you both! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137263/new/ https://reviews.llvm.org/D137263 __

[PATCH] D137473: [vfs] Allow root paths relative to the directory of the vfsoverlay YAML file

2022-11-04 Thread Haowei Wu via Phabricator via cfe-commits
haowei created this revision. haowei added reviewers: phosek, abrachet. Herald added a subscriber: hiraditya. Herald added a project: All. haowei requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. VFS overlay file allow using

[PATCH] D137223: [clang-format] Remove special case for kw_operator when aligning decls

2022-11-04 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel marked 3 inline comments as done. rymiel added inline comments. Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:441-456 + Tokens = annotate("int operator+(int);"); + ASSERT_EQ(Tokens.size(), 8u) << Tokens; + EXPECT_TOKEN(Tokens[1], tok::kw_operator, TT_Functio

[PATCH] D137223: [clang-format] Remove special case for kw_operator when aligning decls

2022-11-04 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel updated this revision to Diff 473380. rymiel added a comment. Remove format test, relying only on annotator tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137223/new/ https://reviews.llvm.org/D137223 Files: clang/lib/Format/Whitespac

[PATCH] D137474: [clang-format] Defer formatting of operator< to honor paren spacing

2022-11-04 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel created this revision. rymiel added reviewers: HazardyKnusperkeks, owenpan, MyDeveloperDay. Herald added a project: All. rymiel requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. I'm not exactly sure what the intent of that section of `

[PATCH] D137475: Explicitely initialize opaque pointer mode when -fthinlto-index is used

2022-11-04 Thread Matthias Braun via Phabricator via cfe-commits
MatzeB created this revision. MatzeB added reviewers: weiwang, aeubanks, nikic, MaskRay. Herald added subscribers: ormris, StephenFan, modimo, wenlei, arphaman, steven_wu, hiraditya, inglorion, mcrosier. Herald added a project: All. MatzeB requested review of this revision. Herald added a project:

[PATCH] D125860: [clang] Only use major version in resource dir

2022-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LGTM. Considering https://discourse.llvm.org/t/should-we-continue-embed-the-full-llvm-version-in-lib-clang/62094 and this thread, I think overall people favor this patch. If a distribution

[PATCH] D137263: add boundary check for ASTUnresolvedSet::erase

2022-11-04 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. We need a regression test. See `clang/test/SemaCXX/using-decl*` for some other using declaration tests. Find a file which is appropriate and add a reduced case there. Use `ninja check-clang-semacxx` to run `clang/test/SemaCXX` tests. Use `$build/bin/llvm-lit -v clang/te

[PATCH] D137263: add boundary check for ASTUnresolvedSet::erase

2022-11-04 Thread zhouyizhou via Phabricator via cfe-commits
zhouyizhou added a comment. In D137263#3909722 , @MaskRay wrote: > Thank Ray for your guidance! > We need a regression test. See `clang/test/SemaCXX/using-decl*` for some > other using declaration tests. Study some tests, find a file which is > appro

[PATCH] D137223: [clang-format] Remove special case for kw_operator when aligning decls

2022-11-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137223/new/ https://reviews.llvm.org/D137223 _

<    1   2