[clang] a1a63d6 - [clang][dataflow] Add two repros for non-convergence involving pointers in loops.

2023-08-23 Thread Martin Braenne via cfe-commits
Author: Martin Braenne Date: 2023-08-23T07:03:16Z New Revision: a1a63d68a46882e051eedcb632723e15f2ee331b URL: https://github.com/llvm/llvm-project/commit/a1a63d68a46882e051eedcb632723e15f2ee331b DIFF: https://github.com/llvm/llvm-project/commit/a1a63d68a46882e051eedcb632723e15f2ee331b.diff LOG

[PATCH] D158513: [clang][dataflow] Add two repros for non-convergence involving pointers in loops.

2023-08-23 Thread Martin Böhme 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 rGa1a63d68a468: [clang][dataflow] Add two repros for non-convergence involving pointers in… (authored by mboehme). Repository: rG LLVM Github Monore

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/hipstdpar.c:1 +// RUN: not %clang -### -hipstdpar --compile %s 2>&1 | \ +// RUN: FileCheck --check-prefix=HIPSTDPAR-MISSING-LIB %s Better to use `--hipstdpar` instead of `-hipstdpar`. In GCC, `-h` is

[PATCH] D158252: Fix regression of D157680

2023-08-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/x86-no-gather-no-scatter.cpp:2 /// Tests -mno-gather and -mno-scatter -// RUN: %clang -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s -// RUN: %clang_cl -c /Qgather- -### %s 2>&1 | FileCheck --chec

[PATCH] D158505: [clang-format] Fix weird handling of AfterColon

2023-08-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan accepted this revision. owenpan added inline comments. This revision is now accepted and ready to land. Comment at: clang/unittests/Format/FormatTest.cpp:7954 + verifyFormat( + "Class::Class(int some, int arguments, int loonoog,\n" + "

[PATCH] D158526: [clang] Properly print unnamed members in diagnostics

2023-08-23 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/include/clang/AST/Decl.h:3186 + + void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override; }; shafik wrote: > So it looks like w/o this we would end up using `NamedDecl::printName(...)` >

[PATCH] D158476: [driver] Search for compatible Android runtime directories

2023-08-23 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. This approach LGTM, assuming that https://reviews.llvm.org/D140925 lands as well to ensure that the triple does use `androideabi`, since it would prevent custom build setups from needing additional help. > (Aside: why do we need to produce runtime libraries for differen

[PATCH] D150253: [RISCV] Add Zvfhmin extension for clang.

2023-08-23 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan updated this revision to Diff 552622. jacquesguan added a comment. Herald added subscribers: wangpc, sunshaoce. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150253/new/ https://reviews.llvm.org/D150253 Files: clang/include/cl

[clang] 7037331 - [Coroutines] [CoroElide] Don't think exceptional terminator don't leak coro handle unconditionally any more

2023-08-23 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2023-08-23T16:51:53+08:00 New Revision: 7037331a2f05990cd59f35a7c0f6ce87c0f3cb5f URL: https://github.com/llvm/llvm-project/commit/7037331a2f05990cd59f35a7c0f6ce87c0f3cb5f DIFF: https://github.com/llvm/llvm-project/commit/7037331a2f05990cd59f35a7c0f6ce87c0f3cb5f.diff LO

[clang] 654fa9a - [RISCV] Add Zvfhmin extension for clang

2023-08-23 Thread Jianjian GUAN via cfe-commits
Author: Jianjian GUAN Date: 2023-08-23T17:08:39+08:00 New Revision: 654fa9a7e898ce25a6d18f3a7c7b747e1059395b URL: https://github.com/llvm/llvm-project/commit/654fa9a7e898ce25a6d18f3a7c7b747e1059395b DIFF: https://github.com/llvm/llvm-project/commit/654fa9a7e898ce25a6d18f3a7c7b747e1059395b.diff

[PATCH] D150253: [RISCV] Add Zvfhmin extension for clang

2023-08-23 Thread Jianjian Guan 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 rG654fa9a7e898: [RISCV] Add Zvfhmin extension for clang (authored by jacquesguan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157684: [clang][ASTImporter] Repeated friend templates are partially imported

2023-08-23 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:4087 + + if (TypeSourceInfo *TSI = FD1->getFriendType()) +return Importer.IsStructurallyEquivalent( This can be `const`? Comment at: clang/lib/AST/ASTImporter.cpp:41

[PATCH] D158562: [clang][Sema] Add truncation warning on fortified snprintf

2023-08-23 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Can't say much about the rest of the patch so I'd defer to someone else. Since gcc has `-Wformat-truncation`, can we disable this warning in clang as well? Can you add a test for that? Comment at: clang/lib/Sema/SemaChecking.cpp:1136-1137 + [&](c

[PATCH] D156054: [Clang][Sema] DR722 (nullptr and varargs) and missing -Wvarargs diagnostics

2023-08-23 Thread Mital Ashok via Phabricator via cfe-commits
MitalAshok marked an inline comment as not done. MitalAshok added inline comments. Comment at: clang/test/SemaCXX/varargs.cpp:34 enum Unscoped1 { One = 0x7FFF }; - (void)__builtin_va_arg(ap, Unscoped1); // ok + (void)__builtin_va_arg(ap, Unscoped1); // expected-warning {

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. This is quite exciting! Most of it looks already good enough to me. See inline comment. Comment at: clang/lib/Interpreter/WASM.cpp:79 + int Result = + lld::wasm::link(LinkerArgs, llvm::outs(), llvm::errs(), false, false); + if (!Result) ---

[clang] 6c274ba - [clang-repl] Disambiguate declarations with private typedefs

2023-08-23 Thread Jonas Hahnfeld via cfe-commits
Author: Jonas Hahnfeld Date: 2023-08-23T11:29:26+02:00 New Revision: 6c274ba4108b07358ebd4e8d607c72d6db8c8100 URL: https://github.com/llvm/llvm-project/commit/6c274ba4108b07358ebd4e8d607c72d6db8c8100 DIFF: https://github.com/llvm/llvm-project/commit/6c274ba4108b07358ebd4e8d607c72d6db8c8100.diff

[PATCH] D157838: [clang-repl] Disambiguate declarations with private typedefs

2023-08-23 Thread Jonas Hahnfeld via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6c274ba4108b: [clang-repl] Disambiguate declarations with private typedefs (authored by Hahnfeld). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157838/new/

[PATCH] D158363: [clang-format] Fix segmentation fault when formatting nested namespaces

2023-08-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:389 auto *ClosingLine = AnnotatedLines.begin() + ClosingLineIndex + 1; auto OutdentBy = I[J]->Level - TheLine->Level; for (auto *CompactedLine = I + J; Compacte

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a subscriber: pengfei. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider the following code: #include #include #include #include TRA

[PATCH] D157747: Support Unicode Microsoft predefined macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt planned changes to this revision. RIscRIpt added a comment. While I work at `__LPREFIX`, I remove this revision from review queue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157747/new/ https://reviews.llvm.org/D157747

[PATCH] D158505: [clang-format] Fix weird handling of AfterColon

2023-08-23 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks marked 2 inline comments as done. HazardyKnusperkeks added a comment. Will be fixed on commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158505/new/ https://reviews.llvm.org/D158505 __

[PATCH] D158592: [clang][dataflow] Produce pointer values for callees of member operator calls.

2023-08-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Calls to member operators are a special case in

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1495-1499 + DeclContext *DC = CurContext; + while (DC && !isa(DC) && !isa(DC) && + !isa(DC) && !isa(DC)) +DC = DC->getParent(); + return dyn_cast_or_null(DC); I think this is reimp

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added inline comments. Comment at: clang/lib/Interpreter/WASM.cpp:79 + int Result = + lld::wasm::link(LinkerArgs, llvm::outs(), llvm::errs(), false, false); + if (!Result) v.g.vassilev wrote: > I am not sure how we can solve that dependency here.

[PATCH] D158595: [clang][Interp] Allow zero-ini of primitives with an empty init list

2023-08-23 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added reviewers: pmatos, tlively. v.g.vassilev added a comment. Let's add more reviewers to see if we can figure out how to move forward here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158140/new/ https://reviews.llvm.org/D158140

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked an inline comment as done. RIscRIpt added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1495-1499 + DeclContext *DC = CurContext; + while (DC && !isa(DC) && !isa(DC) && + !isa(DC) && !isa(DC)) +DC = DC->getParent(); + return dyn_cast_or_null(

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Anubhab Ghosh via Phabricator via cfe-commits
argentite added a comment. Here's a demo of it in action with clang and lld linked statically out of tree. https://wasmdemo.argentite.me Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158140/new/ https://reviews.llvm.org/D158140 __

[PATCH] D152752: [MS] Fix passing aligned records by value in some cases

2023-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Intel is seeing some fallout from this change in our downstream (reverting this commit causes our test case to pass). Our test looks like this: #include #include #include #include typedef union { char c[32]; short s[16]; int

[PATCH] D154603: [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker

2023-08-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 552670. gamesh411 added a comment. Add tests for checker option Remove unnecessary const_cast Only model a getenv call if there is a value to model Use getPredecessor to better indicate what happens during EG building Hoist GetEnvCall variable Fix dangling s

[PATCH] D158601: [Clang] Always constant-evaluate operands of comparisons to nullptr

2023-08-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin created this revision. Herald added a project: All. cor3ntin requested review of this revision. Herald added subscribers: cfe-commits, wangpc. Herald added a project: clang. even if we know what the result is going to be. There may be side effects we ought not to ignore, Fixes #64923 R

[clang] f672094 - [Sema] Fix -Wparentheses warning seen with gcc

2023-08-23 Thread Bjorn Pettersson via cfe-commits
Author: Bjorn Pettersson Date: 2023-08-23T14:27:08+02:00 New Revision: f6720947101f2866ca4812056842ada06cf59242 URL: https://github.com/llvm/llvm-project/commit/f6720947101f2866ca4812056842ada06cf59242 DIFF: https://github.com/llvm/llvm-project/commit/f6720947101f2866ca4812056842ada06cf59242.di

[clang] 89bf39b - [clang][CGExprConstant] Resolve unused variable 'C' warning

2023-08-23 Thread Bjorn Pettersson via cfe-commits
Author: Bjorn Pettersson Date: 2023-08-23T14:27:13+02:00 New Revision: 89bf39b068e8bc51f4178d1e794fd78e8e86b508 URL: https://github.com/llvm/llvm-project/commit/89bf39b068e8bc51f4178d1e794fd78e8e86b508 DIFF: https://github.com/llvm/llvm-project/commit/89bf39b068e8bc51f4178d1e794fd78e8e86b508.di

[PATCH] D154603: [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker

2023-08-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 updated this revision to Diff 552676. gamesh411 marked an inline comment as done. gamesh411 added a comment. rebased and squashed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154603/new/ https://reviews.llvm.org/D154603 Files: clang/i

[PATCH] D157385: [clang][CFG] Cleanup functions

2023-08-23 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Looks good to me, but let's wait for the CFG maintainers to approve it. Comment at: clang/lib/Analysis/ThreadSafety.cpp:2429 } + case CFGElement::TemporaryDtor: { Could you remove the added line? CHANGES SINCE L

[PATCH] D158433: [Clang] Do not change the type of captured vars when checking lambda constraints

2023-08-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. @aaron.ballman Should we land that? it already missed rc3... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158433/new/ https://reviews.llvm.org/D158433 ___ cfe-commits mailing l

[PATCH] D157684: [clang][ASTImporter] Repeated friend templates are partially imported

2023-08-23 Thread Ding Fei via Phabricator via cfe-commits
danix800 updated this revision to Diff 552678. danix800 added a comment. Add `const` qualifier & replace `auto` with explicit type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157684/new/ https://reviews.llvm.org/D157684 Files: clang/lib/AST/A

[PATCH] D157684: [clang][ASTImporter] Repeated friend templates are partially imported

2023-08-23 Thread Ding Fei via Phabricator via cfe-commits
danix800 added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:4105 - T TypeOrDecl = GetCanTypeOrDecl(FD); - - for (const FriendDecl *FoundFriend : RD->friends()) { + for (FriendDecl *FoundFriend : RD->friends()) { if (FoundFriend == FD) { ba

[PATCH] D154603: [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker

2023-08-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 marked 8 inline comments as done. gamesh411 added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp:116-117 +const NoteTag *Note = +C.getNoteTag([Region, FunctionName, Message](PathSensitiveBugReport &BR, +

[PATCH] D158601: [Clang] Always constant-evaluate operands of comparisons to nullptr

2023-08-23 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:13312 +!EvaluatePointer(E->getRHS(), Res, Info)) + return false; return Success(CmpResult::Equal, E); I kinda expected the fix for this bug to simply //remove// a special

[PATCH] D158582: [AMDGPU] Respect unresolved symbol option if forwarded to linker

2023-08-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Remember to clang format. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:564-575 + // If the user has manually passed -Wl,--unresolved-symbols=* as a linker + // option, we should not add --no-undefined + bool UnresolvedOpt = false; + for (auto

[PATCH] D154603: [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker

2023-08-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D154603#4580609 , @steakhal wrote: > I'm sorry starting the review of this one only now, but I'm quite booked. > Is it still relevant? If so, I'll continue. Yes thanks for the effort! I would like to go through with this opt

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1495-1499 + DeclContext *DC = CurContext; + while (DC && !isa(DC) && !isa(DC) && + !isa(DC) && !isa(DC)) +DC = DC->getParent(); + return dyn_cast_or_null(DC); RIscRIpt wrote: > cor

[PATCH] D158301: Add back overriding-t-options for -m-version-min diagnostic

2023-08-23 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/test/Driver/darwin-version.c:217 // RUN: FileCheck --check-prefix=CHECK-VERSION-TNO-OSV1 %s -// CHECK-VERSION-TNO-OSV1: overriding '-mmacos-version-min=10.6' option with '-target x86_64-apple-macos10.11.2' +// CHECK-VERSION-TNO-OS

[PATCH] D158318: [Sema] tolerate more promotion matches in format string checking

2023-08-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I just realized that we may need some additional test coverage for `scanf`, as that interface also uses `ArgType::matchesType()`: https://github.com/llvm/llvm-project/blob/5686f06d7fc02b7e2ab1eceb56f3830b6fdf7301/clang/lib/AST/ScanfFormatString.cpp#L511 but I thin

[PATCH] D158601: [Clang] Always constant-evaluate operands of comparisons to nullptr

2023-08-23 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:13312 +!EvaluatePointer(E->getRHS(), Res, Info)) + return false; return Success(CmpResult::Equal, E); tbaeder wrote: > I kinda expected the fix for this bug to simply //r

[PATCH] D154603: [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker

2023-08-23 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In D154603#4609809 , @gamesh411 wrote: > In D154603#4580609 , @steakhal > wrote: > >> I'm sorry starting the review of this one only now, but I'm quite booked. >> Is it still relevant?

[PATCH] D157757: [Headers] Replace __need_STDDEF_H_misc with specific __need_ macros

2023-08-23 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: clang/lib/Headers/stddef.h:118-122 +#ifdef __cplusplus +namespace std { +typedef decltype(nullptr) nullptr_t; +} +using ::std::nullptr_t; iana wrote: > aaron.ballman wrote: > > ldionne wrote: > > > iana wrote: > > > > aa

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked 2 inline comments as done. RIscRIpt added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1495-1499 + DeclContext *DC = CurContext; + while (DC && !isa(DC) && !isa(DC) && + !isa(DC) && !isa(DC)) +DC = DC->getParent(); + return dyn_cast_or_null(

[PATCH] D158612: [flang][driver] Ensure negative flags have the same visibility as positive

2023-08-23 Thread Tom Eccles via Phabricator via cfe-commits
tblah created this revision. tblah added reviewers: awarzynski, bogner, MaskRay. Herald added a reviewer: sscalpone. Herald added projects: Flang, All. tblah requested review of this revision. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. https://reviews.llvm.org

[PATCH] D154603: [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker

2023-08-23 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D154603#4609872 , @gamesh411 wrote: > - try to consolidate the multiple warnings coming from this checker's > `checkLocation` callback > > category based filtering ( example from > lib/StaticAnalyzer/Checkers/GenericTaintChe

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-23 Thread Ying Yi via Phabricator via cfe-commits
MaggieYi created this revision. MaggieYi added reviewers: MaskRay, peter.smith, vitalybuka, probinson, pgousseau, glandium, uabelho. Herald added a project: All. MaggieYi requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. PR for https://githu

[clang] eb0e6c3 - [clang-repl] support code completion at a REPL.

2023-08-23 Thread Vassil Vassilev via cfe-commits
Author: Fred Fu Date: 2023-08-23T14:00:59Z New Revision: eb0e6c3134ef6deafe0a4958e9e1a1214b3c2f14 URL: https://github.com/llvm/llvm-project/commit/eb0e6c3134ef6deafe0a4958e9e1a1214b3c2f14 DIFF: https://github.com/llvm/llvm-project/commit/eb0e6c3134ef6deafe0a4958e9e1a1214b3c2f14.diff LOG: [clan

[PATCH] D154382: [ClangRepl] support code completion at a REPL

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeb0e6c3134ef: [clang-repl] support code completion at a REPL. (authored by capfredf, committed by v.g.vassilev). Changed prior to commit: https://reviews.llvm.org/D154382?vs=552418&id=552696#toc Reposi

[PATCH] D148997: [clang] Add a new annotation token: annot_repl_input_end

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D148997#4607833 , @bnbarham wrote: > In D148997#4561620 , @v.g.vassilev > wrote: > >> So, in that case we should bring back the boolean flag for incremental >> processing and kee

[PATCH] D158601: [Clang] Always constant-evaluate operands of comparisons to nullptr

2023-08-23 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:13312 +!EvaluatePointer(E->getRHS(), Res, Info)) + return false; return Success(CmpResult::Equal, E); cor3ntin wrote: > tbaeder wrote: > > I kinda expected the fix for thi

[PATCH] D158615: [clang] Emit an error if variable ends up with incomplete array type

2023-08-23 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon created this revision. Herald added a project: All. Fznamznon requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This adds an error if variable with incomplete type has initializer with incomplete type, so it is not possible to deduc

[PATCH] D154603: [analyzer][clangsa] Add new option to alpha.security.cert.InvalidPtrChecker

2023-08-23 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. The change looks promising, I only have minor remarks. Comment at: clang/lib/StaticAnalyzer/Checkers/cert/InvalidPtrChecker.cpp:125 - const NoteTag *Note = - C.getNoteTag([SymbolicEnvPtrRegion, FunctionName]( - PathSensi

[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-23 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev accepted this revision. v.g.vassilev added a comment. The pre-merge check seems to fail at clang-format for some reason. This patch does not change anything that should be formatted by clang-format. We will try to add the images as editable graphviz content. We need to see if the i

[PATCH] D158615: [clang] Emit an error if variable ends up with incomplete array type

2023-08-23 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13460 + // initializer. + Diag(VDecl->getLocation(), diag::err_typecheck_decl_incomplete_type) + << VDeclType; Not sure about the error message though, maybe i

[clang] 3edd338 - [clang-repl] Add Documentation for Execution Results Handling.

2023-08-23 Thread Vassil Vassilev via cfe-commits
Author: Krishna-13-cyber Date: 2023-08-23T14:12:12Z New Revision: 3edd338a6407d9410f6a283c5dc32ba676ac0b8f URL: https://github.com/llvm/llvm-project/commit/3edd338a6407d9410f6a283c5dc32ba676ac0b8f DIFF: https://github.com/llvm/llvm-project/commit/3edd338a6407d9410f6a283c5dc32ba676ac0b8f.diff L

[PATCH] D156858: Add Documentation for Execution Results Handling in Clang-REPL

2023-08-23 Thread Vassil Vassilev 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 rG3edd338a6407: [clang-repl] Add Documentation for Execution Results Handling. (authored by Krishna-13-cyber, committed by v.g.vassilev). Repository:

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-23 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 updated this revision to Diff 552701. jp4a50 added a comment. Minor refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://reviews.llvm.org/D156259 Files: clang/lib/Format/ContinuationIndenter.cpp clang/lib/Forma

[PATCH] D158616: To allow RAV to visit initializer when bitfield and initializer both given

2023-08-23 Thread Nouman Amir via Phabricator via cfe-commits
NoumanAmir657 created this revision. NoumanAmir657 added reviewers: nicholas, Eugene.Zelenko. Herald added a project: All. NoumanAmir657 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The RAV does not visit the initializer when the bitfiel

[PATCH] D156259: [clang-format] Fix a bug that erroneously placed function arguments on a new line despite all arguments being able to fit on the same line.

2023-08-23 Thread Jon Phillips via Phabricator via cfe-commits
jp4a50 marked an inline comment as done. jp4a50 added a comment. @owenpan right you are! Missed those somehow. Made a further two changes. Hope I haven't missed anything else! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156259/new/ https://revie

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-23 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment. The PS5 bits LGTM, but as I'm not familiar with the ARM aspects I won't give final approval. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158614/new/ https://reviews.llvm.org/D158614 ___

[PATCH] D158582: [AMDGPU] Respect unresolved symbol option if forwarded to linker

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. The `-Wl` and `-Xlinker` options are intended for the host linker and we intentionally do not pass them to the device linker. If users want to pass options to the device linker, they need to use -Xoffload-linker. There are multiple options affecting the handling of unre

[PATCH] D158293: [NFC][Clang] Fix static code analyzer concern about null value dereference

2023-08-23 Thread Soumi Manna via Phabricator via cfe-commits
Manna updated this revision to Diff 552706. Manna edited the summary of this revision. Manna removed reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158293/new/ https://reviews.llvm.org/D158293 Files: clang/lib/Lex/PPDirecti

[PATCH] D158582: [AMDGPU] Respect unresolved symbol option if forwarded to linker

2023-08-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D158582#4610023 , @yaxunl wrote: > The `-Wl` and `-Xlinker` options are intended for the host linker and we > intentionally do not pass them to the device linker. > > If users want to pass options to the device linker, they ne

[PATCH] D158293: [NFC][Clang] Fix static code analyzer concern about null value dereference

2023-08-23 Thread Soumi Manna via Phabricator via cfe-commits
Manna marked an inline comment as done. Manna added inline comments. Comment at: clang/lib/Lex/PPDirectives.cpp:555 while (true) { CurLexer->Lex(Tok); tahonermann wrote: > I don't think this change is sufficient. If `CurLexer` is null, then the

[PATCH] D158499: [analyzer] Compute FAM dynamic size

2023-08-23 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. In D158499#4608974 , @danix800 wrote: > One of the observable issue with inconsistent size type is > > void clang_analyzer_eval(int); > > typedef unsigned long long size_t; > void *malloc(unsigned long size); > void

[clang] 9e150ad - [NFC][clang] EditedSource::applyRewrites - useless call

2023-08-23 Thread via cfe-commits
Author: Manna, Soumi Date: 2023-08-23T07:39:20-07:00 New Revision: 9e150adaea7be2d87fb13255671584719a560939 URL: https://github.com/llvm/llvm-project/commit/9e150adaea7be2d87fb13255671584719a560939 DIFF: https://github.com/llvm/llvm-project/commit/9e150adaea7be2d87fb13255671584719a560939.diff

[PATCH] D158227: [clang] EditedSource::applyRewrites - useless call

2023-08-23 Thread Soumi Manna 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 rG9e150adaea7b: [NFC][clang] EditedSource::applyRewrites - useless call (authored by Manna). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D158227: [clang] EditedSource::applyRewrites - useless call

2023-08-23 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. The failure seems unrelated to my change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158227/new/ https://reviews.llvm.org/D158227 ___ cfe-commits mailing list cfe-commits@lists.

[PATCH] D155290: [PGO] Use Unique Profile Files when New Processes are Forked

2023-08-23 Thread Qiongsi Wu via Phabricator via cfe-commits
qiongsiwu1 added a comment. Thanks for chiming in @phosek ! In D155290#4587438 , @phosek wrote: > Can we avoid the use of `pthread_atfork` and the dependency on pthreads? > Using pthreads inside the profile runtime implementation is problematic in > th

[clang] f94a937 - Revert "[clang-repl] support code completion at a REPL."

2023-08-23 Thread Vassil Vassilev via cfe-commits
Author: Vassil Vassilev Date: 2023-08-23T14:46:15Z New Revision: f94a937cb37a949cca7a084669c634a87b1d2bb1 URL: https://github.com/llvm/llvm-project/commit/f94a937cb37a949cca7a084669c634a87b1d2bb1 DIFF: https://github.com/llvm/llvm-project/commit/f94a937cb37a949cca7a084669c634a87b1d2bb1.diff LO

[PATCH] D155826: [HIP][Clang][Preprocessor][RFC] Add preprocessor support for C++ Parallel Algorithm Offload

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:590 + Builder.defineMacro("__HIPSTDPAR__"); + if (!LangOpts.CUDAIsDevice) +Builder.defineMacro("__HIPSTDPAR_INTERPOSE_ALLOC__"); We usually prefer defining the mac

[clang] 6f9e53a - Revert "[clang-repl] Add Documentation for Execution Results Handling."

2023-08-23 Thread Vassil Vassilev via cfe-commits
Author: Vassil Vassilev Date: 2023-08-23T14:46:57Z New Revision: 6f9e53a4c3344ceedac29b179be1956e9489c684 URL: https://github.com/llvm/llvm-project/commit/6f9e53a4c3344ceedac29b179be1956e9489c684 DIFF: https://github.com/llvm/llvm-project/commit/6f9e53a4c3344ceedac29b179be1956e9489c684.diff LO

[PATCH] D157385: [clang][CFG] Cleanup functions

2023-08-23 Thread Balázs Benics via Phabricator via cfe-commits
steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed. This is a great improvement. When I saw that clang now supports it and e.g. the CSA operates on the CFG, I also considered adding this. Now I don't need to do it, so many thanks!

[PATCH] D158624: [RISCV] Implement multiVersionSortPriority

2023-08-23 Thread Piyou Chen via Phabricator via cfe-commits
BeMg created this revision. Herald added subscribers: jobnoorman, luke, sunshaoce, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, nio

[PATCH] D158522: [NFC][CLANG] Fix static analyzer bugs about large copy by values

2023-08-23 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. Failure is unrelated to my patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158522/new/ https://reviews.llvm.org/D158522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] 30c60ec - [NFC][CLANG] Fix static analyzer bugs about large copy by values

2023-08-23 Thread via cfe-commits
Author: Manna, Soumi Date: 2023-08-23T07:57:04-07:00 New Revision: 30c60ec52f1551c07a3dbab0316ddccf356c6663 URL: https://github.com/llvm/llvm-project/commit/30c60ec52f1551c07a3dbab0316ddccf356c6663 DIFF: https://github.com/llvm/llvm-project/commit/30c60ec52f1551c07a3dbab0316ddccf356c6663.diff

[PATCH] D158522: [NFC][CLANG] Fix static analyzer bugs about large copy by values

2023-08-23 Thread Soumi Manna 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 rG30c60ec52f15: [NFC][CLANG] Fix static analyzer bugs about large copy by values (authored by Manna). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D158612: [flang][driver] Ensure negative flags have the same visibility as positive

2023-08-23 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski accepted this revision. awarzynski added a comment. This revision is now accepted and ready to land. LGTM, ta! Comment at: clang/include/clang/Driver/Options.td:5314 NegFlag, - PosFlag, + PosFlag, BothFlags<[], [ClangOption], " the integrated assembler">>; --

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-23 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. I think this is also true of `-fsanitize=kcfi`, isn't it? That also works by writing a cookie just before the function entry point. If we're diagnosing incompatibilities with execute-only, then perhaps we should do it for both. Repository: rG LLVM Github Monorep

[PATCH] D155935: [RISCV] Enable multiversion function

2023-08-23 Thread Piyou Chen via Phabricator via cfe-commits
BeMg updated this revision to Diff 552721. BeMg added a comment. Herald added a subscriber: sunshaoce. Rebase and update testcase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155935/new/ https://reviews.llvm.org/D155935 Files: clang/include/cla

[PATCH] D158624: [RISCV] Implement multiVersionSortPriority

2023-08-23 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. I don't think you can just use any arbitrary function? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158624/new/ https://reviews.llvm.org/D158624 ___ cfe-commits mailing list cfe-

[PATCH] D158614: [UBSan] Disable the function sanitizer on an execute-only target.

2023-08-23 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: clang/lib/Basic/Sanitizers.cpp:134-143 + if ((A && + A->getOption().matches(clang::driver::options::OPT_mexecute_only)) || + (std::find(Features.begin(), Features.end(), "+execute-only") != + Features.end())) { +

[PATCH] D155769: [HIP][Clang][docs][RFC] Add documentation for C++ Parallel Algorithm Offload

2023-08-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:232 +execution seamlessly falls back to the host CPU. It is legal to specify multiple +``--offload-arcj``s. All the flags we introduce, as well as a thorough view of +various restrictions and their implications

[PATCH] D158612: [flang][driver] Ensure negative flags have the same visibility as positive

2023-08-23 Thread Tom Eccles via Phabricator via cfe-commits
tblah updated this revision to Diff 552723. tblah added a comment. Thanks for taking a look. Changes: add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158612/new/ https://reviews.llvm.org/D158612 Files: clang/include/clang/Driver/Options.

[PATCH] D158227: [clang] EditedSource::applyRewrites - useless call

2023-08-23 Thread Douglas Yung via Phabricator via cfe-commits
dyung added a comment. In D158227#4610097 , @Manna wrote: > The failure seems unrelated to my change. Hi @Manna, I'm not sure which failure you are referring to, but there is a test failure on at least 2 build bots that seems to have been caused by your

[PATCH] D158626: [AArch64] Add missing vrnd intrinsics

2023-08-23 Thread Max Iyengar via Phabricator via cfe-commits
miyengar created this revision. miyengar added a reviewer: vhscampos. Herald added subscribers: hiraditya, kristof.beyls. Herald added a project: All. miyengar requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This patch add

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-23 Thread Sandeep via Phabricator via cfe-commits
sandeepkosuri updated this revision to Diff 552725. sandeepkosuri added a comment. Added PCH options to the RUN lines in LIT tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 Files: clang/include/cl

[clang] 969df3b - Revert "[NFC][clang] EditedSource::applyRewrites - useless call"

2023-08-23 Thread via cfe-commits
Author: Manna, Soumi Date: 2023-08-23T08:32:30-07:00 New Revision: 969df3ba1076cd7d443e420be8d4fc8d62a13e51 URL: https://github.com/llvm/llvm-project/commit/969df3ba1076cd7d443e420be8d4fc8d62a13e51 DIFF: https://github.com/llvm/llvm-project/commit/969df3ba1076cd7d443e420be8d4fc8d62a13e51.diff

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Very nice idea! Comment at: clang/lib/Interpreter/CMakeLists.txt:21 Value.cpp + WASM.cpp Elsewhere in LLVM either use WebAssembly (spelled out). If you really prefer to keep it short you should use `Wasm` (not all caps). Also,

[PATCH] D158628: [clang][dataflow][WIP] Prototype for pointer value widening (nullable `getPointeeLoc()` flavor)

2023-08-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. DO NOT REVIEW This is a WIP for discussion only

[PATCH] D158629: [ClangRepl] support code completion at the repl

2023-08-23 Thread Fred Fu via Phabricator via cfe-commits
capfredf created this revision. Herald added subscribers: ChuanqiXu, kadircet, arphaman. Herald added a project: All. capfredf requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. This patch enabled code completion for ClangREP

[PATCH] D158140: WIP: [clang-repl] Basic WebAssembly support for running inside a JS engine

2023-08-23 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. I suppose you could build a similar thing that runs under node and uses that `wasi-unknown-unknown` target? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158140/new/ https://reviews.llvm.org/D158140 ___

[PATCH] D158227: [clang] EditedSource::applyRewrites - useless call

2023-08-23 Thread Soumi Manna via Phabricator via cfe-commits
Manna added a comment. In D158227#4610219 , @dyung wrote: > In D158227#4610097 , @Manna wrote: > >> The failure seems unrelated to my change. > > Hi @Manna, I'm not sure which failure you are referring to, but the

[PATCH] D158630: [clang][dataflow][WIP] Prototype for pointer value widening ("unknown storage location" flavor)

2023-08-23 Thread Martin Böhme via Phabricator via cfe-commits
mboehme created this revision. Herald added subscribers: martong, xazax.hun. Herald added a reviewer: NoQ. Herald added a project: All. mboehme requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. DO NOT REVIEW This is a WIP for discussion only

  1   2   3   >