[clang] [clang][analyzer] Fix StreamChecker `ftell` and `fgetpos` at indeterminate file position. (PR #84191)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes These functions should not be allowed if the file position is indeterminate (they return the file position). This condition is now checked, and tests are improved to check it. --- Full diff: https://github.c

[clang] d4687fe - [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (#83585)

2024-03-06 Thread via cfe-commits
Author: Exile Date: 2024-03-06T17:01:30+01:00 New Revision: d4687fe7d1639ea5d16190c89a54de1f2c6e2a9a URL: https://github.com/llvm/llvm-project/commit/d4687fe7d1639ea5d16190c89a54de1f2c6e2a9a DIFF: https://github.com/llvm/llvm-project/commit/d4687fe7d1639ea5d16190c89a54de1f2c6e2a9a.diff LOG: [a

[clang] [analyzer] Fix crash on dereference invalid return value of getAdjustedParameterIndex() (PR #83585)

2024-03-06 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/83585 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -63,17 +67,17 @@ void Sema::ActOnOpenACCConstruct(OpenACCDirectiveKind K, // here as these constructs do not take any arguments. break; default: -Diag(StartLoc, diag::warn_acc_construct_unimplemented) << K; +Sema.Diag(StartLoc, diag::warn_acc_construct_unim

[clang] 28e30b4 - [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (#84181)

2024-03-06 Thread via cfe-commits
Author: ZERO-N Date: 2024-03-07T00:07:15+08:00 New Revision: 28e30b4042742bb79cc66b92a16a8508aa35cb92 URL: https://github.com/llvm/llvm-project/commit/28e30b4042742bb79cc66b92a16a8508aa35cb92 DIFF: https://github.com/llvm/llvm-project/commit/28e30b4042742bb79cc66b92a16a8508aa35cb92.diff LOG: [

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 Thread via cfe-commits
https://github.com/yronglin closed https://github.com/llvm/llvm-project/pull/84181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][NFC]Use isa_and_nonnull to simplify the code and avoid build warning (PR #84181)

2024-03-06 Thread via cfe-commits
github-actions[bot] wrote: @ZERO-N Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build,

[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for LLDB tuning, unless -ggnu-pubnames is specified. (PR #83331)

2024-03-06 Thread Alexander Yermolovich via cfe-commits
ayermolo wrote: @dwblaikie ping https://github.com/llvm/llvm-project/pull/83331 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-06 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [InstrFDO][TypeProf] Implement binary instrumentation and profile read/write (PR #66825)

2024-03-06 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/66825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix OMPT ident flag in combined distribute parallel for pragma (PR #80987)

2024-03-06 Thread via cfe-commits
mikaoP wrote: @alexey-bataev is it okay to integrate this? https://github.com/llvm/llvm-project/pull/80987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix OMPT ident flag in combined distribute parallel for pragma (PR #80987)

2024-03-06 Thread Alexey Bataev via cfe-commits
@@ -3812,6 +3812,8 @@ class CodeGenFunction : public CodeGenTypeCache { Expr *NextLB = nullptr; /// Update of UB after a whole chunk has been executed Expr *NextUB = nullptr; +/// Distinguish between the for distribute and sections +OpenMPDirectiveKind DKind

[clang] [clang] Fix OMPT ident flag in combined distribute parallel for pragma (PR #80987)

2024-03-06 Thread Alexey Bataev via cfe-commits
@@ -2647,6 +2647,8 @@ void CGOpenMPRuntime::emitDistributeStaticInit( void CGOpenMPRuntime::emitForStaticFinish(CodeGenFunction &CGF, SourceLocation Loc, OpenMPDirectiveKind DKind) { + assert(D

[clang] [FMV] Remove duplicate features from mangled name. (PR #84165)

2024-03-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/84165 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84176 From 143ed8ccf592be46181fb3dcd814b4afa1b39833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Wed, 6 Mar 2024 12:37:50 +0100 Subject: [PATCH 1/2] [clang-repl] Refactor locking of run

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-06 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail edited https://github.com/llvm/llvm-project/pull/84176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail commented: Yes sure! It requires access to the interface, but IMHO that makes a lot of sense anyway. https://github.com/llvm/llvm-project/pull/84176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Stefan Gränitz via cfe-commits
@@ -137,9 +136,10 @@ class Interpreter { Expr *SynthesizeExpr(Expr *E); -private: size_t getEffectivePTUSize() const; + void finalizeInitPTUStack(); weliveindetail wrote: We could also consider renaming this to `getNumUndoSteps()` and `setUndoBarrier(

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Andreas Fertig via cfe-commits
https://github.com/andreasfertig created https://github.com/llvm/llvm-project/pull/84193 Fix #84064 According to http://eel.is/c++draft/dcl.fct.def.coroutine#9 the first parameter for overload resolution of `operator new` is `size_t` followed by the arguments of the coroutine function. http:/

[clang] [clang] Fix OMPT ident flag in combined distribute parallel for pragma (PR #80987)

2024-03-06 Thread via cfe-commits
@@ -3812,6 +3812,8 @@ class CodeGenFunction : public CodeGenTypeCache { Expr *NextLB = nullptr; /// Update of UB after a whole chunk has been executed Expr *NextUB = nullptr; +/// Distinguish between the for distribute and sections +OpenMPDirectiveKind DKind

[clang] [clang] Fix OMPT ident flag in combined distribute parallel for pragma (PR #80987)

2024-03-06 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/80987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 67c82d6 - [Frontend] Add leaf constructs and association to OpenMP/ACC directives (#83625)

2024-03-06 Thread via cfe-commits
Author: Krzysztof Parzyszek Date: 2024-03-06T10:46:26-06:00 New Revision: 67c82d6ffb4bbc21212116a11f390761d859297a URL: https://github.com/llvm/llvm-project/commit/67c82d6ffb4bbc21212116a11f390761d859297a DIFF: https://github.com/llvm/llvm-project/commit/67c82d6ffb4bbc21212116a11f390761d859297a

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Stefan Gränitz via cfe-commits
https://github.com/weliveindetail updated https://github.com/llvm/llvm-project/pull/84150 From 27ff0ddc0d736f4959abe61c9fd43b9c48ffb6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=A4nitz?= Date: Wed, 28 Feb 2024 15:45:53 +0100 Subject: [PATCH 1/9] Add test cases for variable definit

[clang] [llvm] [Frontend] Add leaf constructs and association to OpenMP/ACC directives (PR #83625)

2024-03-06 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz closed https://github.com/llvm/llvm-project/pull/83625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Names declared in if conditions and for-init statements are local to the inner context (C++ 3.3.2p4) (PR #84150)

2024-03-06 Thread Stefan Gränitz via cfe-commits
@@ -41,3 +40,23 @@ for (; i > 4; --i) { printf("i = %d\n", i); }; int j = i; printf("j = %d\n", j); // CHECK-NEXT: j = 4 + +{++i; printf("i = %d (global scope)\n", i);} +// CHECK-NEXT: i = 5 + +while (int i = 1) { printf("i = %d (while condition)\n", i--); break; } +// CHECK-N

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-03-06 Thread via cfe-commits
pizzud wrote: Yep. I've been slammed at work with other stuff and also ran into a knotty problem I haven't managed to find a solution for: when shared_ptr::operator* and/or get() are defined in a parent of shared_ptr, the returned class from the matchers is the parent, not the class in the config

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -6898,10 +6898,18 @@ class Sema final { BinaryOperatorKind Operator); ActOnCXXThis - Parse 'this' pointer. - ExprResult ActOnCXXThis(SourceLocation loc); + /// + /// \param SkipLambdaCaptureCheck Whether to skip the 'this' check

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -1378,8 +1379,21 @@ bool CoroutineStmtBuilder::makeReturnOnAllocFailure() { static bool collectPlacementArgs(Sema &S, FunctionDecl &FD, SourceLocation Loc, SmallVectorImpl &PlacementArgs) { if (auto *MD = dyn_cast(&FD)) { -if (MD->isImp

[clang] [clang] Fix standalone execution in TableGen/target-builtins-prototype-parser.td (PR #84186)

2024-03-06 Thread Francesco Petrogalli via cfe-commits
https://github.com/fpetrogalli approved this pull request. https://github.com/llvm/llvm-project/pull/84186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-06 Thread Xiang Li via cfe-commits
@@ -0,0 +1,257 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-03-06 Thread Balazs Benics via cfe-commits
steakhal wrote: I'm thinking of backporting this to clang-18, but given that it's only developer-facing, I don't think it worth it. WDYT @NagyDonat? https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [analyzer] Avoid a crash in a debug printout function (PR #79446)

2024-03-06 Thread via cfe-commits
NagyDonat wrote: Yup, there is no need to backport this. https://github.com/llvm/llvm-project/pull/79446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-06 Thread Xiang Li via cfe-commits
@@ -0,0 +1,257 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [clang][dataflow] Make optional checker work for types derived from optional. (PR #84138)

2024-03-06 Thread Gábor Horváth via cfe-commits
@@ -64,38 +64,53 @@ static bool hasOptionalClassName(const CXXRecordDecl &RD) { return false; } +static const CXXRecordDecl *getOptionalBaseClass(const CXXRecordDecl *RD) { + if (RD == nullptr) +return nullptr; + if (hasOptionalClassName(*RD)) +return RD; + + if (

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-06 Thread Zahira Ammarguellat via cfe-commits
@@ -1635,6 +1635,17 @@ void TypePrinter::printElaboratedBefore(const ElaboratedType *T, if (T->getKeyword() != ElaboratedTypeKeyword::None) OS << " "; NestedNameSpecifier *Qualifier = T->getQualifier(); +if (!Policy.SuppressTagKeyword && Policy.SuppressScope

[clang] [Clang][C++23] Implement P2448R2: Relaxing some constexpr restrictions (PR #77753)

2024-03-06 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you for the implementation! https://github.com/llvm/llvm-project/pull/77753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-06 Thread Gábor Horváth via cfe-commits
Xazax-hun wrote: > Yes, significantly faster, and fewer SAT solver timeouts. The Clang Static Analyzer is going one step further. It is pruning the analysis state really aggressively, it is relying on liveness analysis, and whenever the value of a variable is dead (would not be read in future

[clang] [clang-cl] Fix value of __FUNCTION__ in MSVC mode. (PR #84014)

2024-03-06 Thread Aaron Ballman via cfe-commits
@@ -1635,6 +1635,17 @@ void TypePrinter::printElaboratedBefore(const ElaboratedType *T, if (T->getKeyword() != ElaboratedTypeKeyword::None) OS << " "; NestedNameSpecifier *Qualifier = T->getQualifier(); +if (!Policy.SuppressTagKeyword && Policy.SuppressScope

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/82611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-06 Thread Gábor Horváth via cfe-commits
@@ -94,6 +94,38 @@ static llvm::BitVector findReachableBlocks(const CFG &Cfg) { return BlockReachable; } +static llvm::DenseSet +buildContainsExprConsumedInDifferentBlock( +const CFG &Cfg, +const llvm::DenseMap &StmtToBlock) { + llvm::DenseSet Result; --

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-06 Thread Gábor Horváth via cfe-commits
@@ -94,6 +94,38 @@ static llvm::BitVector findReachableBlocks(const CFG &Cfg) { return BlockReachable; } +static llvm::DenseSet +buildContainsExprConsumedInDifferentBlock( +const CFG &Cfg, +const llvm::DenseMap &StmtToBlock) { + llvm::DenseSet Result; + + auto Chec

[clang] [clang][nullability] Don't discard expression state before end of full-expression. (PR #82611)

2024-03-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/82611 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver,CrossWindows] Remove -isystem-after (PR #84121)

2024-03-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I'm not so sure that it is that simple. `-idirafter` and `-isystem-after` > have slightly different semantics. They impact ordering and warning > suppression. If there are alternative flags that can be used to control > those, that might be reasonable. Do we know the users o

[clang] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-06 Thread via cfe-commits
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/84201 The checker alpha.security.ArrayBoundV2 performs bounds checking in two steps: first it checks for underflow, and if it isn't guaranteed then it assumes that there is no underflow. After this, it checks for ov

[clang] [flang] [flang][draft] Improve debug info generation. (PR #84202)

2024-03-06 Thread via cfe-commits
https://github.com/abidh created https://github.com/llvm/llvm-project/pull/84202 This PR adds initial support for generation of debug information for variables and types. The aim is that it can be the basis of discussion on the design of debug information generation. It is complete enough to al

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/84135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread Shilei Tian via cfe-commits
https://github.com/shiltian approved this pull request. LG with one nit https://github.com/llvm/llvm-project/pull/84135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Mention possibility of underflow in array overflow errors (PR #84201)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (NagyDonat) Changes The checker alpha.security.ArrayBoundV2 performs bounds checking in two steps: first it checks for underflow, and if it isn't guaranteed then it assumes that there is no underflow. After this, it checks for overfl

[clang] [Clang][OpenMP] throw compilation error instead of crash in Stmt::OMPScopeDirectiveClass case (#77535) (PR #84135)

2024-03-06 Thread Shilei Tian via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -emit-obj -verify -fopenmp %s shiltian wrote: `emit-obj` is not needed https://github.com/llvm/llvm-project/pull/84135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang][dataflow] When analyzing ctors, don't initialize fields of `*this` with values. (PR #84164)

2024-03-06 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/84164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] `isOnlyUsedAsConst`: Handle static method calls. (PR #84005)

2024-03-06 Thread Clement Courbet via cfe-commits
legrosbuffle wrote: > LGTM, verify if some release notes shouldn't be updated. This is very minor, I've only seen a few instances in the Google codebase, but it was trivial enough to include. https://github.com/llvm/llvm-project/pull/84005 ___ cfe-co

[clang] [clang] Factor out OpenACC part of `Sema` (PR #84184)

2024-03-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/84184 >From 23f4208fb9978370f59cae16db0747acb3e2c906 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Wed, 6 Mar 2024 18:01:35 +0300 Subject: [PATCH 1/3] [clang] Factor out OpenACC part of `Sema` This patch mov

[clang-tools-extra] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2024-03-06 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: @pizzud don't worry much about this one, this can be easily solved by using hasType instead of ofClass. Next branch out is in ~5 months, so there is some time. https://github.com/llvm/llvm-project/pull/67467 ___ cfe-commits mailing lis

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -6898,10 +6898,18 @@ class Sema final { BinaryOperatorKind Operator); ActOnCXXThis - Parse 'this' pointer. - ExprResult ActOnCXXThis(SourceLocation loc); + /// + /// \param SkipLambdaCaptureCheck Whether to skip the 'this' check

[clang] 8277e30 - [clang] Fix standalone execution in TableGen/target-builtins-prototype-parser.td (#84186)

2024-03-06 Thread via cfe-commits
Author: Tulio Magno Quites Machado Filho Date: 2024-03-06T14:53:05-03:00 New Revision: 8277e308c04b2157ea1076276e3eb5d08f533bac URL: https://github.com/llvm/llvm-project/commit/8277e308c04b2157ea1076276e3eb5d08f533bac DIFF: https://github.com/llvm/llvm-project/commit/8277e308c04b2157ea1076276e3

[clang] [clang] Fix standalone execution in TableGen/target-builtins-prototype-parser.td (PR #84186)

2024-03-06 Thread Tulio Magno Quites Machado Filho via cfe-commits
https://github.com/tuliom closed https://github.com/llvm/llvm-project/pull/84186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] dcd08da - [NFC][Docs] Documenting __builtin_cpu_supports. (#84098)

2024-03-06 Thread via cfe-commits
Author: Pavel Iliin Date: 2024-03-06T17:59:31Z New Revision: dcd08daed5fb9928fedb09c2a84d1e9d2ab59630 URL: https://github.com/llvm/llvm-project/commit/dcd08daed5fb9928fedb09c2a84d1e9d2ab59630 DIFF: https://github.com/llvm/llvm-project/commit/dcd08daed5fb9928fedb09c2a84d1e9d2ab59630.diff LOG: [

[clang] [NFC][Docs] Documenting __builtin_cpu_supports. (PR #84098)

2024-03-06 Thread Pavel Iliin via cfe-commits
https://github.com/ilinpv closed https://github.com/llvm/llvm-project/pull/84098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-06 Thread Namhyung Kim via cfe-commits
@@ -5636,6 +5636,31 @@ void CGDebugInfo::EmitExternalVariable(llvm::GlobalVariable *Var, Var->addDebugInfo(GVE); } +void CGDebugInfo::EmitPseudoVariable(llvm::AllocaInst *Alloca, QualType Ty, + SourceLocation Loc) { + llvm::DIFile *Unit

[clang] [clang-repl] Expose RuntimeInterfaceBuilder to allow customization (PR #83126)

2024-03-06 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= , Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: https://github.com/vgvassilev approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/83126 __

[clang] [llvm] Implement a subset of builtin_cpu_supports() features (PR #82809)

2024-03-06 Thread zhijian lin via cfe-commits
https://github.com/diggerlin edited https://github.com/llvm/llvm-project/pull/82809 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][draft] Improve debug info generation. (PR #84202)

2024-03-06 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: Thanks for this patch to improve debug support in Flang. If you are planning to work long-time on enabling full debug support then it would be good to write a design document (in flang/docs), get it agreed upon by everyone and then proceed. I attempted some time ago at

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/84214 With #83470 it reduces UBSAN overhead from 52.5% to 12.6%. Measured as "Geomean difference" on "test-suite/MultiSource/Benchmarks" with PGO+ThinLTO build. On real server apps we see 95% of code instrumented, w

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Vitaly Buka (vitalybuka) Changes With #83470 it reduces UBSAN overhead from 52.5% to 12.6%. Measured as "Geomean difference" on "test-suite/MultiSource/Benchmarks" with PGO+ThinLTO build. On real server apps we see 95% of code inst

[clang] Add option to generate additional debug info for expression dereferencing pointer to pointers. (PR #81545)

2024-03-06 Thread Namhyung Kim via cfe-commits
namhyung wrote: Also I think it generates variables for destination of pointers, not the source. For example, if we have `a->b->c`, what we need is variables for `a` and `b`. Usually it would already have one for `a`, so it can skip generating it (unless there's a difference like due to type

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/84214 >From f915a90962986cf20a9903ac9995cfee3b8ba990 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 6 Mar 2024 10:03:46 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/84214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/84214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/84214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Andreas Fertig via cfe-commits
@@ -6898,10 +6898,18 @@ class Sema final { BinaryOperatorKind Operator); ActOnCXXThis - Parse 'this' pointer. - ExprResult ActOnCXXThis(SourceLocation loc); + /// + /// \param SkipLambdaCaptureCheck Whether to skip the 'this' check

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/84214 >From f915a90962986cf20a9903ac9995cfee3b8ba990 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 6 Mar 2024 10:03:46 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UT

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Erich Keane via cfe-commits
@@ -6898,10 +6898,18 @@ class Sema final { BinaryOperatorKind Operator); ActOnCXXThis - Parse 'this' pointer. - ExprResult ActOnCXXThis(SourceLocation loc); + /// + /// \param SkipLambdaCaptureCheck Whether to skip the 'this' check

[clang] [clang] Add optional pass to remove UBSAN traps using PGO (PR #84214)

2024-03-06 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Please ignore buildkite for now, as the patch depends on #83471 which I uploaded without stacked review. https://github.com/llvm/llvm-project/pull/84214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gränitz?= Message-ID: In-Reply-To: @@ -137,9 +136,10 @@ class Interpreter { Expr *SynthesizeExpr(Expr *E); -private: vgvassilev wrote: We can befriend the test to the interpreter. Alternatively, we probably have a second option to make

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Vassil Vassilev via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= Message-ID: In-Reply-To: @@ -137,9 +136,10 @@ class Interpreter { Expr *SynthesizeExpr(Expr *E); -private: size_t getEffectivePTUSize() const; + void finalizeInitPTUStack(); vgvassilev wrote: Maybe something like `mar

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Andreas Fertig via cfe-commits
@@ -6898,10 +6898,18 @@ class Sema final { BinaryOperatorKind Operator); ActOnCXXThis - Parse 'this' pointer. - ExprResult ActOnCXXThis(SourceLocation loc); + /// + /// \param SkipLambdaCaptureCheck Whether to skip the 'this' check

[clang] [DFSan] Add missing documentation for -dfsan-reaches-function-callbacks. (PR #84218)

2024-03-06 Thread Andrew Browne via cfe-commits
https://github.com/browneee created https://github.com/llvm/llvm-project/pull/84218 None >From f23dd8ed555c57a37957a12fcb81bd383bc69254 Mon Sep 17 00:00:00 2001 From: Andrew Browne Date: Wed, 6 Mar 2024 18:00:27 + Subject: [PATCH] [DFSan] Add missing documentation for -dfsan-reaches-funct

[clang] [DFSan] Add missing documentation for -dfsan-reaches-function-callbacks. (PR #84218)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andrew Browne (browneee) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/84218.diff 1 Files Affected: - (modified) clang/docs/DataFlowSanitizer.rst (+24) ``diff diff --git a/clang/docs/DataFlowSanitizer.rst

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
@@ -0,0 +1,625 @@ +//===-- NullPointerAnalysisModel.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
@@ -0,0 +1,112 @@ +//===-- NullPointerAnalysisModel.h --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
@@ -0,0 +1,625 @@ +//===-- NullPointerAnalysisModel.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
@@ -0,0 +1,625 @@ +//===-- NullPointerAnalysisModel.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
@@ -0,0 +1,625 @@ +//===-- NullPointerAnalysisModel.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
@@ -0,0 +1,625 @@ +//===-- NullPointerAnalysisModel.cpp *- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
https://github.com/gribozavr edited https://github.com/llvm/llvm-project/pull/84166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
https://github.com/gribozavr edited https://github.com/llvm/llvm-project/pull/84166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
https://github.com/gribozavr edited https://github.com/llvm/llvm-project/pull/84166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy][dataflow] Add `bugprone-null-check-after-dereference` check (PR #84166)

2024-03-06 Thread Dmitri Gribenko via cfe-commits
https://github.com/gribozavr edited https://github.com/llvm/llvm-project/pull/84166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Andreas Fertig via cfe-commits
https://github.com/andreasfertig edited https://github.com/llvm/llvm-project/pull/84193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DFSan] Add missing documentation for -dfsan-reaches-function-callbacks. (PR #84218)

2024-03-06 Thread Andrew Browne via cfe-commits
https://github.com/browneee updated https://github.com/llvm/llvm-project/pull/84218 >From bc9a6eb322ee3b2cea45789ede8c1e0799583157 Mon Sep 17 00:00:00 2001 From: Andrew Browne Date: Wed, 6 Mar 2024 18:00:27 + Subject: [PATCH] [DFSan] Add missing documentation for -dfsan-reaches-function-ca

[clang] [C++20][Coroutines] Lambda-coroutine with operator new in promise_type (PR #84193)

2024-03-06 Thread Andreas Fertig via cfe-commits
https://github.com/andreasfertig edited https://github.com/llvm/llvm-project/pull/84193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-06 Thread Paul Kirth via cfe-commits
@@ -740,7 +740,8 @@ bool tools::isTLSDESCEnabled(const ToolChain &TC, SupportedArgument = V == "desc" || V == "trad"; EnableTLSDESC = V == "desc"; } else if (Triple.isX86()) { -SupportedArgument = V == "gnu"; +SupportedArgument = V == "gnu" || V == "gnu2"; +

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-06 Thread Xiang Li via cfe-commits
@@ -8545,6 +8545,11 @@ def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, Group, Visibility<[DXCOption]>, HelpText<"Entry point name">; +def dxc_hlsl_version : Option<["/", "-"], "HV", KIN

[clang] [llvm] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-03-06 Thread Jun Wang via cfe-commits
@@ -137,6 +137,12 @@ Removed Compiler Flags Attribute Changes in Clang -- +- Introduced a new function attribute ``__attribute__((amdgpu_max_num_work_groups(x, y, z)))`` or jwanggit86 wrote: There are existing attributes that have wor

[clang] [llvm] [HLSL] Add -HV option translation to clang-dxc.exe (PR #83938)

2024-03-06 Thread Joshua Batista via cfe-commits
@@ -8545,6 +8545,11 @@ def dxc_entrypoint : Option<["--", "/", "-"], "E", KIND_JOINED_OR_SEPARATE>, Group, Visibility<[DXCOption]>, HelpText<"Entry point name">; +def dxc_hlsl_version : Option<["/", "-"], "HV", KIN

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Stefan Gränitz via cfe-commits
@@ -137,9 +136,10 @@ class Interpreter { Expr *SynthesizeExpr(Expr *E); -private: weliveindetail wrote: Ok, let me play with it a little more. https://github.com/llvm/llvm-project/pull/84176 ___ cfe-commits mail

[clang] [ClangOffloadBundler] fix unbundling archive (PR #84195)

2024-03-06 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/84195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CLANG][DWARF] Do not emit -ggnu-pubnames for LLDB tuning, unless -ggnu-pubnames is specified. (PR #83331)

2024-03-06 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Yeah, still not sure why something like `%clang -### -c -target x86_64 -g -gsplit-dwarf %s` wouldn't change behavior on a darwin host and cause the check for gnu-pubnames to fail there but if you say that works, guess that's OK & if

[clang] [clang-repl] Refactor locking of runtime PTU stack (NFC) (PR #84176)

2024-03-06 Thread Stefan Gränitz via cfe-commits
@@ -137,9 +136,10 @@ class Interpreter { Expr *SynthesizeExpr(Expr *E); -private: size_t getEffectivePTUSize() const; + void finalizeInitPTUStack(); weliveindetail wrote: Hm, why restore point? Do you mean sth like `markMaxRestorePoint` as in "the las

<    1   2   3   4   5   6   >