[clang] e190b7c - [Coroutines] Maintain the position of final suspend

2022-08-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-12T13:05:08+08:00 New Revision: e190b7cc90ca5ee712ca3982bf476afa9e8acb3b URL: https://github.com/llvm/llvm-project/commit/e190b7cc90ca5ee712ca3982bf476afa9e8acb3b DIFF: https://github.com/llvm/llvm-project/commit/e190b7cc90ca5ee712ca3982bf476afa9e8acb3b.diff

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Basic/TypeTraits.cpp:64 +#define TYPE_TRAIT_N(Spelling, Name, Key) 0, +#include "clang/Basic/TokenKinds.def" +}; inclyc wrote: > shafik wrote: > > @aaron.ballman do we really have to include this three times?

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Basic/TypeTraits.cpp:64 +#define TYPE_TRAIT_N(Spelling, Name, Key) 0, +#include "clang/Basic/TokenKinds.def" +}; shafik wrote: > @aaron.ballman do we really have to include this three times? We are defining >

[PATCH] D131639: [OpenMP] Remove 'stdbool.h' from OpenMP header wrappers

2022-08-11 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. I'm fine with the change. @JonChesterfield WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131639/new/ https://reviews.llvm.org/D131639 ___ cfe-commits mailing list

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D129694#3717208 , @jhuber6 wrote: > In D129694#3717166 , @ssquare08 > wrote: > >> The OpenMP kernel names you mentioned are also generated separately by the >> host and the device.

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/Basic/TypeTraits.cpp:64 +#define TYPE_TRAIT_N(Spelling, Name, Key) 0, +#include "clang/Basic/TokenKinds.def" +}; @aaron.ballman do we really have to include this three times? We are defining different macros

[PATCH] D123967: Disable update_cc_test_checks.py tests in stand-alone builds

2022-08-11 Thread Tom Stellard via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG74384c7fcec7: Disable update_cc_test_checks.py tests in stand-alone builds (authored by tstellar). Repository: rG LLVM

[clang] 74384c7 - Disable update_cc_test_checks.py tests in stand-alone builds

2022-08-11 Thread Tom Stellard via cfe-commits
Author: Tom Stellard Date: 2022-08-11T20:53:37-07:00 New Revision: 74384c7fcec71cb040b0c874743e5fc38b2cd7a6 URL: https://github.com/llvm/llvm-project/commit/74384c7fcec71cb040b0c874743e5fc38b2cd7a6 DIFF: https://github.com/llvm/llvm-project/commit/74384c7fcec71cb040b0c874743e5fc38b2cd7a6.diff

[PATCH] D131651: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

2022-08-11 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0bc993edf4ec: [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported… (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 0bc993e - [AST] [Modules] Introduce Decl::getNonTransparentDeclContext to handle exported friends

2022-08-11 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-08-12T11:50:35+08:00 New Revision: 0bc993edf4ec57993c8fc11ea511b3d62ffd3c93 URL: https://github.com/llvm/llvm-project/commit/0bc993edf4ec57993c8fc11ea511b3d62ffd3c93 DIFF: https://github.com/llvm/llvm-project/commit/0bc993edf4ec57993c8fc11ea511b3d62ffd3c93.diff

[PATCH] D127641: [clang-cl][MSVC] Enable /Zc:alignedNew for C++17 and /Zc:sizedDealloc by default

2022-08-11 Thread Stephen Long via Phabricator via cfe-commits
steplong updated this revision to Diff 452062. steplong added a comment. - Change (1|2) to [12]. Test is failing because () isn't supported Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127641/new/ https://reviews.llvm.org/D127641 Files:

[PATCH] D125418: [Arm64EC 6/?] Implement C/C++ mangling for Arm64EC function definitions.

2022-08-11 Thread chenglin.bi via Phabricator via cfe-commits
bcl5980 added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5128 +// to the function itself; it points to a stub for the compiler. +// FIXME: We also need to emit an entry thunk. +SmallString<256> MangledName; efriedma wrote: >

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-11 Thread dongjunduo via Phabricator via cfe-commits
dongjunduo updated this revision to Diff 452058. dongjunduo added a comment. Add assert messages Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131469/new/ https://reviews.llvm.org/D131469 Files: clang/lib/Driver/Driver.cpp

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-11 Thread Whitney Tsang via Phabricator via cfe-commits
Whitney added inline comments. Comment at: clang/tools/driver/cc1_main.cpp:260 +SmallString<128> TracePath(Clang->getFrontendOpts().TimeTracePath); +assert(!TracePath.empty()); if (auto profilerOutput = Clang->createOutputFile( According to llvm

[PATCH] D131469: [Clang] change default storing path of `-ftime-trace`

2022-08-11 Thread dongjunduo via Phabricator via cfe-commits
dongjunduo updated this revision to Diff 452054. dongjunduo added a comment. Add necessary asserts Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131469/new/ https://reviews.llvm.org/D131469 Files: clang/lib/Driver/Driver.cpp

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-08-11 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 added a comment. Right, I think we can fix this in the same way. I'll look into it soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127873/new/ https://reviews.llvm.org/D127873 ___

[PATCH] D129771: [clang-format] distinguish multiplication after brace-init from pointer

2022-08-11 Thread Jack Huang via Phabricator via cfe-commits
jackhong12 added a comment. Right, I think we can fix this in the same way. I'll look into it soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129771/new/ https://reviews.llvm.org/D129771 ___

[PATCH] D131677: [clang][RISCV] Fix incorrect ABI lowering for inherited structs under hard-float ABIs

2022-08-11 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/test/CodeGen/RISCV/riscv-abi.cpp:1 // RUN: %clang_cc1 -triple riscv32 -emit-llvm -x c++ %s -o - \ // RUN: | FileCheck -check-prefixes=ILP32,ILP32-ILP32F,ILP32-ILP32F-ILP32D %s Not sure why you need -x c++ when

[PATCH] D129570: [clang-tidy] Add new clang-tidy check to find implicit conversions from enum to integer.

2022-08-11 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. > What is the motivation for requiring these to be the arguments of call or > construct expressions? It is to just to try and limit the possible false positives at first. Usually a function call it is not clear locally that it will be converted to an integer but

[PATCH] D127873: [clang-format] Fix misplacement of `*` in declaration of pointer to struct

2022-08-11 Thread Ben Smith via Phabricator via cfe-commits
binji added a comment. This change seems to have also regressed code like this: // before bool b = 3 == int{3} && true; // after bool b = 3 == int{3}&& true; I suppose a similar fix to the one done for multiply should be done for `&&` too? Repository: rG LLVM Github Monorepo

[PATCH] D131704: [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D131704#3717774 , @akhuang wrote: > We're seeing this warning in code with global constants, e.g. > > const Enum x = static_cast(-1); > > is this intended? This is constant initialization, so this is indeed expected.

[PATCH] D131739: Fix some clang-doc issues.

2022-08-11 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. would you mind splitting this patch into separate patches? I'd like to keep the fix for the assertion in SmallString separate. the rest seems to make sense together. otherwise LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I guess the other way to test for pod-for-purposes-of-ABI is IRgen. Looks like MSVC isn't observable based on sizeof or alignof on these issues (the previous godbolt shows MSVC's answer to alignment for the packed and size for the trailing packing don't change based

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452037. python3kgae added a comment. Add fixit for case like space 1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/clang/Basic/Attr.td

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. > So I could test this other ways that actually impact layout - like whether > things can be packed in tail padding (can pack in tail padding for non-pod, > right?). Or we could ast dump and inspect the property directly? Maybe there > are some other options? Here's

[PATCH] D131739: Fix some clang-doc issues.

2022-08-11 Thread Brett Wilson via Phabricator via cfe-commits
brettw created this revision. brettw added a reviewer: paulkirth. brettw added a project: clang-tools-extra. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. brettw requested review of this revision. Herald added a subscriber: cfe-commits. Always emit the TagType for

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. I guess the other packed behavior/ABI checking 277123376ce08c98b07c154bf83e4092a5d4d3c6 In D119051#3715939 , @aaron.ballman wrote: > In D119051#3714645

[PATCH] D131704: [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Amy Huang via Phabricator via cfe-commits
akhuang added a comment. We're seeing this warning in code with global constants, e.g. const Enum x = static_cast(-1); is this intended? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131704/new/ https://reviews.llvm.org/D131704

[PATCH] D131675: [clang] SIGSEGV fix at clang::ASTContext::getRawCommentForDeclNoCacheImpl

2022-08-11 Thread Ivan Murashko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG557e32e002ed: [clang] SIGSEGV fix at clang::ASTContext::getRawCommentForDeclNoCacheImpl (authored by ivanmurashko). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 557e32e - [clang] SIGSEGV fix at clang::ASTContext::getRawCommentForDeclNoCacheImpl

2022-08-11 Thread Ivan Murashko via cfe-commits
Author: Ivan Murashko Date: 2022-08-12T00:05:59+01:00 New Revision: 557e32e002edd2a5a9e728d96b098bffa33e34d0 URL: https://github.com/llvm/llvm-project/commit/557e32e002edd2a5a9e728d96b098bffa33e34d0 DIFF: https://github.com/llvm/llvm-project/commit/557e32e002edd2a5a9e728d96b098bffa33e34d0.diff

[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie updated this revision to Diff 452023. dblaikie added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D118511/new/ https://reviews.llvm.org/D118511 Files: clang/include/clang/Basic/DiagnosticASTKinds.td

[PATCH] D118511: Add a warning for not packing non-POD members in packed structs

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D118511#3373181 , @dblaikie wrote: > In D118511#3373173 , @tstellar > wrote: > >> In D118511#3373082 , @dblaikie >> wrote: >> >>> In

[PATCH] D131717: [ADT] Replace STLForwardCompat.h's C++17 equivalents

2022-08-11 Thread Joe Loser via Phabricator via cfe-commits
jloser updated this revision to Diff 452022. jloser added a comment. Fix unqualified use of `in_place` so the delegating constructor in `Optional` calls the one taking the `std::in_place_t` tag. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131717: [ADT] Replace STLForwardCompat.h's C++17 equivalents

2022-08-11 Thread Scott Linder via Phabricator via cfe-commits
scott.linder accepted this revision. scott.linder added a comment. LGTM, thank you! I have some pending changes which would add C++20 "compat" types, but removing it until those land sounds fine to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D119051: Extend the C++03 definition of POD to include defaulted functions

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. >> There could be more testing than only the indirect result of the packing >> problem that first inspired this patch. Any suggestions on what might be the >> most direct way to test whether the type's been considered pod in this sense? > > I would have thought use

[clang] 1067745 - [Clang] Fix for Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-11T15:34:58-07:00 New Revision: 106774515b77d55edeab6e80555c410efc1f586a URL: https://github.com/llvm/llvm-project/commit/106774515b77d55edeab6e80555c410efc1f586a DIFF:

[PATCH] D131655: [analyzer] Nullability: Enable analysis of non-inlined nullable objc properties.

2022-08-11 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:85-86 - PostStmt PS(CallExpr, LCtx); + SimpleProgramPointTag T{"ExprEngine", "Trivial Copy"}; + PostStmt PS(CallExpr, LCtx, ); for (ExplodedNodeSet::iterator I = Dst.begin(), E =

[PATCH] D129570: [clang-tidy] Add new clang-tidy check to find implicit conversions from enum to integer.

2022-08-11 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EnumToIntCheck.cpp:31 + diag(MatchedExpr->getBeginLoc(), + "Enum is implictly converted to an integral.") + << MatchedExpr->getSourceRange(); diagnostics in clang

[PATCH] D129570: [clang-tidy] Add new clang-tidy check to find implicit conversions from enum to integer.

2022-08-11 Thread Nathan James via Phabricator via cfe-commits
njames93 removed reviewers: artem.tamazov, yaxunl, carlosgalvezp, MaskRay, mstorsjo, balazske. njames93 added a comment. This revision now requires review to proceed. What is the motivation for requiring these to be the arguments of call or construct expressions? Would be nice to add a note

[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

2022-08-11 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:13069 - // therefore don't strictly fit into a signed bitfield of width 1. - if (FieldWidth == 1 && Value == 1) -return false; This was to suppress false positives. All instances

[PATCH] D131730: __has_trivial_copy should map to __is_trivially_copyable

2022-08-11 Thread Zachary Henkel via Phabricator via cfe-commits
zahen created this revision. zahen added reviewers: royjacobson, aaron.ballman, cor3ntin, erichkeane. Herald added a project: All. zahen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Found during clang 15 RC1 testing due to the new

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-11 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem added a comment. In D131528#3717509 , @shafik wrote: > In D131528#3717141 , @gulfem wrote: > >> Can somebody please clarify this? Is the following code results in >> `undefined` behavior? >> >> enum E1

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D131528#3717141 , @gulfem wrote: > Can somebody please clarify this? Is the following code results in > `undefined` behavior? > > enum E1 {e11=-4, e12=4}; > E1 x2b = static_cast(8); > > `constexpr E1 x2 = static_cast(8)`

[PATCH] D131704: [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. Ok it looks like this is a bit more subtle, I broke the llvm-test-suite file `paq8p.cpp` again. We need both conditions to be true `Info.EvalMode == EvalInfo::EM_ConstantExpression && Info.InConstantContext`. We need to be in a context that requires a constant value but

[PATCH] D131616: [clang][dataflow] Generalise match switch utility to other AST types and add a `CFGMatchSwitch` which currently handles `CFGStmt` and `CFGInitializer`.

2022-08-11 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added a comment. LGTM so far, please finish the patch and tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131616/new/ https://reviews.llvm.org/D131616 ___ cfe-commits mailing list

[PATCH] D131448: Introduce iterator sentinel to make graph traversal implementation more efficient and cleaner

2022-08-11 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: llvm/include/llvm/ADT/SCCIterator.h:165-170 + SCCProxy operator*() const { assert(!CurrentSCC.empty() && "Dereferencing END SCC iterator!"); return CurrentSCC; } + SCCProxy operator->() const { return operator*(); }

[PATCH] D126907: Deferred Concept Instantiation Implementation Take 2

2022-08-11 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I think I've proved to myself that there IS a compile-time regression, but it is reasonably minor. I suspect a lot of it is going to be the 'friend' comparisons not caching, which I might look into doing. CHANGES SINCE LAST ACTION

[PATCH] D131724: [pseudo] Eliminate an ambiguity for the empty member declaration.

2022-08-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a subscriber: alextsao1999. Herald added a project: clang-tools-extra. We happened to introduce a `member-declaration := ;` rule when inlining the

[PATCH] D131717: [ADT] Replace STLForwardCompat.h's C++17 equivalents

2022-08-11 Thread Joe Loser via Phabricator via cfe-commits
jloser added a comment. In D131717#3717363 , @MaskRay wrote: > The llvm/include/llvm/ADT/STLForwardCompat.h and > llvm/unittests/ADT/STLForwardCompatTest.cpp removal can be in a separate > patch. Sure. I just split them out of this patch and I'll do

[PATCH] D131717: [ADT] Replace STLForwardCompat.h's C++17 equivalents

2022-08-11 Thread Joe Loser via Phabricator via cfe-commits
jloser updated this revision to Diff 451977. jloser added a comment. Revert removal of these utilities and type traits from STLForwardCompat.h and their corresponding unit tests. The removal of these will be done in a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D131388: [docs] Add "C++20 Modules"

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/docs/CPlusPlus20Modules.rst:395-396 + +Roughly, this theory is correct. But the problem is that it is too rough. Let's see what actually happens. +For example, the behavior also depends on the optimization level, as we will

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 451974. beanz added a comment. Adding missing test coverage for 64-bit types Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131718/new/ https://reviews.llvm.org/D131718 Files:

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Headers/hlsl/hlsl_intrinsics.h:17 +__attribute__((clang_builtin_alias(__builtin_labs))) int64_t abs(int64_t In); +__attribute__((clang_builtin_alias(__builtin_fabsf))) float abs(float In);

[PATCH] D131717: [ADT] Replace STLForwardCompat.h's C++17 equivalents

2022-08-11 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. The llvm/include/llvm/ADT/STLForwardCompat.h and llvm/unittests/ADT/STLForwardCompatTest.cpp removal can be in a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D131720: [pseudo] Apply the function-declarator to member functions.

2022-08-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a subscriber: alextsao1999. Herald added a project: clang-tools-extra. A followup patch of d489b3807f096584175c321ce7f20e9dcd49b1da

[PATCH] D131718: [HLSL] Add abs library function

2022-08-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: tex3d, python3kgae, bogner, pow2clk, bob80905. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This change exposes the abs library function for HLSL

[PATCH] D131704: [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Shafik Yaghmour via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2608f553b8fd: [Clang] Tighten restrictions on enum out of range diagnostic (authored by shafik). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 2608f55 - [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Shafik Yaghmour via cfe-commits
Author: Shafik Yaghmour Date: 2022-08-11T13:44:26-07:00 New Revision: 2608f553b8fd02bfd5a81d9e45406cee0c2dfe26 URL: https://github.com/llvm/llvm-project/commit/2608f553b8fd02bfd5a81d9e45406cee0c2dfe26 DIFF:

[PATCH] D131717: [ADT] Replace STLForwardCompat.h's C++17 equivalents

2022-08-11 Thread Joe Loser via Phabricator via cfe-commits
jloser created this revision. jloser added reviewers: scott.linder, MaskRay, bkramer, zero9178, dblaikie. Herald added a subscriber: StephenFan. Herald added a project: All. jloser requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits,

[PATCH] D129833: Use @llvm.threadlocal.address intrinsic to access TLS

2022-08-11 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Note that this change caused LLVM to no longer be aware that a TLS variable cannot be NULL. Thus, code like: __thread int x; int main() { int* y = return *y; } built with `clang -O -fsanitize=null` emits a null-pointer check, when it wouldn't

[PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.

2022-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_is_device_ptr_codegen.cpp:296 +// CK2-DAG: [[A8:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST* [[THIS1]], i32 0, i32 0 +// CK2-DAG: [[B9:%.*]] = getelementptr inbounds [[STRUCT_ST]], %struct.ST*

[PATCH] D131448: Introduce iterator sentinel to make graph traversal implementation more efficient and cleaner

2022-08-11 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: llvm/include/llvm/ADT/BreadthFirstIterator.h:128-131 + bool operator==(iterator_sentinel) const { return VisitQueue.empty(); } + + bool operator!=(iterator_sentinel RHS) const { return !(*this == RHS); } +

[PATCH] D131623: [clang-tidy] Improve modernize-use-emplace check

2022-08-11 Thread Joey Watts via Phabricator via cfe-commits
joeywatts updated this revision to Diff 451960. joeywatts added a comment. Address code review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131623/new/ https://reviews.llvm.org/D131623 Files:

[PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.

2022-08-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 451959. jyu2 added a comment. Thanks Alexey. This to fix test format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129608/new/ https://reviews.llvm.org/D129608 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D131678: hicpp-signed-bitwise - Return location of the operand (and not of the operator beginning)

2022-08-11 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The pre-merge bot is failing because clang-format hasn't been run. Can you please update the diff by running git clang-format first. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131678/new/

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. AFAICT, on Apple's platforms, `__eprintf` is needed only on OSX and only if the version is older than 10.7. https://opensource.apple.com/source/Libc/Libc-1439.40.11/include/assert.h.auto.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131590: Fixed page title for abseil-no-internal-dependencies check documentation

2022-08-11 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6c7b049f6eb7: [clang-tidy][docs] Fixed page title for abseil-no-internal-dependencies check… (authored by vladimir.plyashkun, committed by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang-tools-extra] 6c7b049 - [clang-tidy][docs] Fixed page title for abseil-no-internal-dependencies check documentation

2022-08-11 Thread Nathan James via cfe-commits
Author: Vladimir Plyashkun Date: 2022-08-11T21:09:39+01:00 New Revision: 6c7b049f6eb78edf83506a858c7b211a7c70afd8 URL: https://github.com/llvm/llvm-project/commit/6c7b049f6eb78edf83506a858c7b211a7c70afd8 DIFF:

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D129694#3717166 , @ssquare08 wrote: > The OpenMP kernel names you mentioned are also generated separately by the > host and the device. Would you be okay generating declare target mangle names > separately by host and device

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: compiler-rt/lib/builtins/CMakeLists.txt:702 set(BUILTIN_CFLAGS "") + add_security_warnings(BUILTIN_CFLAGS -1) I'm passing -1 here since I wasn't sure whether the definition of `eprintf` is needed on non-apple

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 marked an inline comment as not done. ssquare08 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9439 const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule ) const { + // Make sure any variable with OpenMP declare target is visible to

[PATCH] D131714: [compiler-rt][builtins] Add compiler flags to catch potential errors that can lead to security vulnerabilities

2022-08-11 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: dcoughlin, kubamracek, ravikandhadai, compnerd. Herald added subscribers: Enna1, mgorny, dberris. Herald added a project: All. ahatanak requested review of this revision. Herald added a project: Sanitizers. Herald added a subscriber:

[PATCH] D131646: [clang][dataflow] Restructure loops to call widen on back edges

2022-08-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:228-234 + // If we are at the start of a loop, we will have two precessors, but we don't + // want to join these two predecessors. Instead, we want to take the back

[PATCH] D131533: [Flang][Driver] Enable PIC in the frontend

2022-08-11 Thread Usman Nadeem via Phabricator via cfe-commits
mnadeem added inline comments. Comment at: flang/test/Driver/pic-flags.f90:3 -! RUN: %flang -### %s --target=aarch64-linux-gnu 2>&1 | FileCheck %s --check-prefix=CHECK-NOPIE -! RUN: %flang -### %s --target=aarch64-linux-gnu -fno-pie 2>&1 | FileCheck %s

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D129694#3717008 , @ssquare08 wrote: > In D129694#3708297 , @jhuber6 wrote: > >> In D129694#3708214 , @ssquare08 >> wrote: >> >>> If that's

[PATCH] D131532: [Sema] Avoid isNullPointerConstant invocation

2022-08-11 Thread Justin Stitt via Phabricator via cfe-commits
justinstitt updated this revision to Diff 451955. justinstitt added a comment. move return to new line, as per clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131532/new/ https://reviews.llvm.org/D131532 Files:

[PATCH] D131704: [Clang] Tighten restrictions on enum out of range diagnostic

2022-08-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM presuming precommit CI comes back clean. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131704/new/ https://reviews.llvm.org/D131704

[PATCH] D125418: [Arm64EC 6/?] Implement C/C++ mangling for Arm64EC function definitions.

2022-08-11 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:5128 +// to the function itself; it points to a stub for the compiler. +// FIXME: We also need to emit an entry thunk. +SmallString<256> MangledName; bcl5980 wrote: >

[PATCH] D131646: [clang][dataflow] Restructure loops to call widen on back edges

2022-08-11 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:228-234 + // If we are at the start of a loop, we will have two precessors, but we don't + // want to join these two predecessors. Instead, we want to take the back

[PATCH] D131528: [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

2022-08-11 Thread Gulfem Savrun Yeniceri via Phabricator via cfe-commits
gulfem added a comment. Can somebody please clarify this? Is the following code results `undefined` behavior? enum E1 {e11=-4, e12=4}; E1 x2b = static_cast(8); `constexpr E1 x2 = static_cast(8)` seems like `undefined`, so `-Wenum-constexpr-conversion` is triggered. We started seeing

[PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.

2022-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9080 +DeclComponentLists.emplace_back( +MCL, OMPC_MAP_to, OMPC_MAP_MODIFIER_unknown, /*IsImpicit = */ true, +nullptr, nullptr); Shall it be

[PATCH] D131646: [clang][dataflow] Restructure loops to call widen on back edges

2022-08-11 Thread Eric Li via Phabricator via cfe-commits
li.zhe.hua marked an inline comment as done. li.zhe.hua added inline comments. Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:168-169 +// back edge block. (That is, all paths from the entry block to the back edge +// block must go through `Block`.)

[PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.

2022-08-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9076 +// DeclComponentLists for generating components info. +auto It = DevPointersMap.find(VD); +if (It != DevPointersMap.end()) ABataev wrote: > VD is still nullptr here,

[PATCH] D129694: [OPENMP] Make declare target static global externally visible

2022-08-11 Thread Sunil Shrestha via Phabricator via cfe-commits
ssquare08 added a comment. In D129694#3708297 , @jhuber6 wrote: > In D129694#3708214 , @ssquare08 > wrote: > >> If that's the preference I can make changes as suggested. You mentioned CUDA >> and HIP mangle the

[PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.

2022-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9076 +// DeclComponentLists for generating components info. +auto It = DevPointersMap.find(VD); +if (It != DevPointersMap.end()) VD is still nullptr here, why do we need

[PATCH] D131708: [RISCV] Change how mtune aliases are implemented.

2022-08-11 Thread Craig Topper via Phabricator via cfe-commits
craig.topper created this revision. craig.topper added reviewers: jrtc27, asb, luismarques, kito-cheng. Herald added subscribers: sunshaoce, VincentWu, luke957, jeroen.dobbelaere, StephenFan, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o,

[PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.

2022-08-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9073 SmallVector DeclComponentLists; +if (DevPointersMap.count(VD)) { + // For member fields list in is_device_ptr, store it in ABataev wrote: > If VD is nullptr, why do

[PATCH] D129608: [Clang][OpenMP] Fix segmentation fault when data field is used in is_device_pt.

2022-08-11 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 451939. jyu2 added a comment. Thanks Alexey! Address the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129608/new/ https://reviews.llvm.org/D129608 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-08-11 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov marked an inline comment as done. mizvekov added a comment. In D112374#3716944 , @alexfh wrote: > One more problem related to this patch: it changes the behavior of > __PRETTY_FUNCTION__: https://gcc.godbolt.org/z/Mvnj9j74E. There may be >

[PATCH] D131707: [analyzer]{NFC} Cache the result of getLocationType in TypedValueRegion

2022-08-11 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov created this revision. ASDenysPetrov added reviewers: steakhal, martong, NoQ, xazax.hun, isuckatcs. ASDenysPetrov added a project: clang. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. Herald added a

[PATCH] D131677: [clang][RISCV] Fix incorrect ABI lowering for inherited structs under hard-float ABIs

2022-08-11 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:10986 +bool Ret = detectFPCCEligibleStructHelper( +B.getType(), CurOff, Field1Ty, Field1Off, Field2Ty, Field2Off); +if (!Ret) craig.topper wrote: > jrtc27

[PATCH] D131590: Fixed page title for abseil-no-internal-dependencies check documentation

2022-08-11 Thread Vladimir Plyashkun via Phabricator via cfe-commits
vladimir.plyashkun added a comment. In D131590#3716471 , @njames93 wrote: > In D131590#3716358 , > @vladimir.plyashkun wrote: > >> Sure it's up to you, it's my github >>

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:3783 - if (Arity && Args.size() != Arity) { -Diag(EndLoc, diag::err_type_trait_arity) Before this patch, we check the `Arity` here, so using type traits with unexpected number of

[PATCH] D131677: [clang][RISCV] Fix incorrect ABI lowering for inherited structs under hard-float ABIs

2022-08-11 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:10986 +bool Ret = detectFPCCEligibleStructHelper( +B.getType(), CurOff, Field1Ty, Field1Off, Field2Ty, Field2Off); +if (!Ret) jrtc27 wrote: > jrtc27

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 451932. inclyc added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 Files: clang/include/clang/Basic/TypeTraits.h

[clang] adcd4b1 - [analyzer] [NFC] Fix comments into more regular form.

2022-08-11 Thread Denys Petrov via cfe-commits
Author: Denys Petrov Date: 2022-08-11T21:28:23+03:00 New Revision: adcd4b1c0bd43c89e579bf07daff7ffb02848012 URL: https://github.com/llvm/llvm-project/commit/adcd4b1c0bd43c89e579bf07daff7ffb02848012 DIFF: https://github.com/llvm/llvm-project/commit/adcd4b1c0bd43c89e579bf07daff7ffb02848012.diff

[PATCH] D112374: [clang] Implement ElaboratedType sugaring for types written bare

2022-08-11 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. One more problem related to this patch: it changes the behavior of __PRETTY_FUNCTION__: https://gcc.godbolt.org/z/Mvnj9j74E. There may be dependencies upon the specific format of expansions of this macro: tests, log processing tools, libraries like ctti, and probably

[PATCH] D131423: [clang] fix frontend crash when evaluating type trait

2022-08-11 Thread YingChi Long via Phabricator via cfe-commits
inclyc updated this revision to Diff 451931. inclyc added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131423/new/ https://reviews.llvm.org/D131423 Files: clang/include/clang/Basic/TypeTraits.h

[PATCH] D131706: [clangd][unittests][IncludeCleaner] Don't call findReferencedFiles() if the result is not used

2022-08-11 Thread Aleksandr Platonov via Phabricator via cfe-commits
ArcsinX created this revision. ArcsinX added reviewers: kbobyrev, sammccall, kadircet. Herald added subscribers: usaxena95, arphaman. Herald added a project: All. ArcsinX requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project:

[PATCH] D131677: [clang][RISCV] Fix incorrect ABI lowering for inherited structs under hard-float ABIs

2022-08-11 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:10986 +bool Ret = detectFPCCEligibleStructHelper( +B.getType(), CurOff, Field1Ty, Field1Off, Field2Ty, Field2Off); +if (!Ret) jrtc27 wrote: > With multiple

  1   2   3   >