[PATCH] D104619: [clang] [WIP] Fix for https://bugs.llvm.org/show_bug.cgi?id=50774

2021-06-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D104619 Files: clang/lib/AST/TypePrinter.cpp Index: clang/lib/AST/TypePrinter.cpp

[PATCH] D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace

2021-06-21 Thread Darwin Xu via Phabricator via cfe-commits
darwin marked an inline comment as done. darwin added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:281 + CustomStyle)); + EXPECT_EQ("/* something */ namespace N\n" +"{\n" MyDeveloperDay wrote: > What does > >

[PATCH] D104617: [clangd] Type hints for structured bindings

2021-06-21 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added inline comments. Comment at: clang-tools-extra/clangd/InlayHints.cpp:40 +// types would be "tuple_element::type". +TypeHintPolicy.PrintCanonicalTypes = true; } While playing around with this, it did occur to me that in some cases it's more

[PATCH] D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added

2021-06-21 Thread Mikael Holmén via Phabricator via cfe-commits
uabelho added a comment. Hi, I'm seeing a failed assertion with this patch. Reproduce with clang --analyze bbi-57338.c Result: clang: /repo/uabelho/master-github/llvm/include/llvm/ADT/APSInt.h:148: bool llvm::APSInt::operator<(const llvm::APSInt &) const: Assertion `IsUnsigned == RHS.IsU

[PATCH] D103943: [X86] Add -mgeneral-regs-only support.

2021-06-21 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added inline comments. Comment at: clang/include/clang/Driver/Options.td:3214 -def mgeneral_regs_only : Flag<["-"], "mgeneral-regs-only">, Group, - HelpText<"Generate code which only uses the general purpose registers (AArch64 only)">; +def mgeneral_regs_only : Flag<

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 353290. MyDeveloperDay added a comment. Ensure git clang-format can handle json CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93528/new/ https://reviews.llvm.org/D93528 Files: clang/docs/ClangFormat.rst clang/docs/ClangFormatStyleOption

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:1395 + + if (Min > Max) { +// This implies that an overflow has occured as either boundary would have I commented on this part previously, you shouldn't ge

[PATCH] D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D103314#2829806 , @uabelho wrote: > Hi, > > I'm seeing a failed assertion with this patch. > Reproduce with > > clang --analyze bbi-57338.c > > Result: > > clang: /repo/uabelho/master-github/llvm/include/llvm/ADT/APSInt.

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D104616#2829705 , @RedDocMD wrote: > The only method that I think can be realistically modelled is `==` (and thus > `!=`). If both the operands refer to the same `unique_ptr`, we know `==` > returns true. If they are not t

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 353295. MyDeveloperDay added a comment. Add more unit tests and ensure clang-format-diff is setup to check json CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93528/new/ https://reviews.llvm.org/D93528 Files: clang/docs/ClangFormat.rst cl

[PATCH] D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:280 + "}", + CustomStyle)); + EXPECT_EQ("/* something */ namespace N\n" I'm not sure I understand this.. why is this not ``` namespace N

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-21 Thread Manas Gupta via Phabricator via cfe-commits
manas added inline comments. Comment at: clang/test/Analysis/constant-folding.c:280-281 + if (c < 0 && c != INT_MIN && d < 0) { +clang_analyzer_eval((c + d) == -1); // expected-warning{{FALSE}} +clang_analyzer_eval((c + d) == 0); // expected-warning{{FALSE}} +clang_a

[PATCH] D95588: [RISCV] Implement the MC layer support of P extension

2021-06-21 Thread Jim Lin via Phabricator via cfe-commits
Jim added a comment. ping? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95588/new/ https://reviews.llvm.org/D95588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D104500: [clang] Apply P1825 as Defect Report from C++11 up to C++20.

2021-06-21 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 353320. mizvekov added a comment. remove unnecessary qualification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104500/new/ https://reviews.llvm.org/D104500 Files: clang/include/clang/Basic/DiagnosticSema

[PATCH] D103612: [flang][driver] Add `-funparse-typed-exprs-as-fortran`

2021-06-21 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. In D103612#2827468 , @klausler wrote: > Kind suffixes are described in subclause 7.4.3 of Fortran 2018, e.g. R708 on > p. 58. Many thanks for this reference. So when calling `Unparse,` one specifes `AnalyzedObjectsAsFortran`

[PATCH] D103440: [WIP][analyzer] Introduce range-based reasoning for addition operator

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/test/Analysis/constant-folding.c:280-281 + if (c < 0 && c != INT_MIN && d < 0) { +clang_analyzer_eval((c + d) == -1); // expected-warning{{FALSE}} +clang_analyzer_eval((c + d) == 0); // expected-warning{{FALSE}} +cl

[PATCH] D93528: [clang-format] Add basic support for formatting JSON

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. something @sammccall said about support `foo["name"]` made me realise that our javascript support doesn't always support what all the options x = { "firstName" : "John", "lastName" : "Smith", "isAlive" : true, "age" : 27, "address" : {

[clang] 325b670 - [Sema][SVE] Properly match builtin ID when using aux target

2021-06-21 Thread Bradley Smith via cfe-commits
Author: Bradley Smith Date: 2021-06-21T12:52:18+01:00 New Revision: 325b6707942dc295a0d7fc9bc23a8242d7a3824f URL: https://github.com/llvm/llvm-project/commit/325b6707942dc295a0d7fc9bc23a8242d7a3824f DIFF: https://github.com/llvm/llvm-project/commit/325b6707942dc295a0d7fc9bc23a8242d7a3824f.diff

[PATCH] D104539: [Sema][SVE] Properly match builtin ID when using aux target

2021-06-21 Thread Bradley Smith 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 rG325b6707942d: [Sema][SVE] Properly match builtin ID when using aux target (authored by bsmith). Changed prior to commit: https://reviews.llvm.org/

[PATCH] D100118: [clang] Add support for new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-06-21 Thread Joerg Sonnenberger via Phabricator via cfe-commits
joerg added a comment. Thanks, that's better. The clang front-end option is not directly relevant for the semantic of the intrinsic, so it would be better to explicitly specify it was not being fuseable unless the operand degenerates into a single operand. Otherwise the specification sounds rea

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 353343. vsavchenko added a comment. Support GotoLabel Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104550/new/ https://reviews.llvm.org/D104550 Files: clang/include/clang/StaticAnalyzer/Core/PathSensitiv

[clang] 9e7329e - [AArch64][SVE] Wire up vscale_range attribute to SVE min/max vector queries

2021-06-21 Thread Bradley Smith via cfe-commits
Author: Bradley Smith Date: 2021-06-21T13:00:36+01:00 New Revision: 9e7329e37edee0b4e6e212c90c76014a09dc6d90 URL: https://github.com/llvm/llvm-project/commit/9e7329e37edee0b4e6e212c90c76014a09dc6d90 DIFF: https://github.com/llvm/llvm-project/commit/9e7329e37edee0b4e6e212c90c76014a09dc6d90.diff

[PATCH] D103702: [AArch64][SVE] Wire up vscale_range attribute to SVE min/max vector queries

2021-06-21 Thread Bradley Smith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9e7329e37ede: [AArch64][SVE] Wire up vscale_range attribute to SVE min/max vector queries (authored by bsmith). Changed prior to commit: https://reviews.llvm.org/D103702?vs=352101&id=353345#toc Reposit

[PATCH] D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace

2021-06-21 Thread Darwin Xu via Phabricator via cfe-commits
darwin marked 2 inline comments as done. darwin added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:280 + "}", + CustomStyle)); + EXPECT_EQ("/* something */ namespace N\n" MyDeveloperDay wrote: > I'm not s

[PATCH] D104616: [analyzer][WIP] Model comparision methods of std::unique_ptr

2021-06-21 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. In D104616#2829705 , @RedDocMD wrote: > If `(ptr1 == ptr2)` is false, we can't say anything really. Well, I think it depends. If one of the pointers is null, for some platforms, we can. E.g. null < non-null is probably true on

[PATCH] D104299: Handle interactions between reserved identifier and user-defined suffixes

2021-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:2639 // or a ud-suffix from the string literal. +const bool isUDSuffix = !Literal.getUDSuffix().empty(); IdentifierInfo *II = nullptr; Minor style nits =

[PATCH] D104387: [clang-cl] Implement /external:I, /external:env, and EXTERNAL_INCLUDE support (PR36003)

2021-06-21 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/Driver/ToolChains/MSVC.cpp:1273 + +if (include_var) { + StringRef(*include_var) thakis wrote: > Why not keep the definition of include_var in the if condition like it was on > the rhs? (And do it for ext

[PATCH] D104299: Handle interactions between reserved identifier and user-defined suffixes

2021-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. > Does that look good to you? That fix-it looks correct to me. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104299/new/ https://reviews.llvm.org/D104299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 3063a54 - [clang-cl] Implement /external:I, /external:env, and EXTERNAL_INCLUDE support (PR36003)

2021-06-21 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2021-06-21T15:36:14+02:00 New Revision: 3063a5472266f05add4e5b85f34141ba2e66fa2e URL: https://github.com/llvm/llvm-project/commit/3063a5472266f05add4e5b85f34141ba2e66fa2e DIFF: https://github.com/llvm/llvm-project/commit/3063a5472266f05add4e5b85f34141ba2e66fa2e.diff

[PATCH] D104387: [clang-cl] Implement /external:I, /external:env, and EXTERNAL_INCLUDE support (PR36003)

2021-06-21 Thread Hans Wennborg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3063a5472266: [clang-cl] Implement /external:I, /external:env, and EXTERNAL_INCLUDE support… (authored by hans). Changed prior to commit: https://reviews.llvm.org/D104387?vs=352695&id=353354#toc Reposi

[PATCH] D104640: [clang][Analyzer] Track null stream argument in alpha.unix.Stream .

2021-06-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: manas, steakhal, ASDenysPetrov, martong, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Herald added a reviewer: Szelethus. balazske requested review of this revisio

[PATCH] D104044: [clang-format] Fix the issue that empty lines being removed at the beginning of namespace

2021-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104044/new/ https://reviews.llvm.org/D104044 ___

[PATCH] D104643: [AArch64][SVE] Add missing target require to test

2021-06-21 Thread Bradley Smith via Phabricator via cfe-commits
bsmith created this revision. bsmith added a reviewer: peterwaller-arm. Herald added subscribers: psnobl, kristof.beyls, tschuett. Herald added a reviewer: efriedma. bsmith requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LL

[clang] ed31ff9 - [AArch64][SVE] Add missing target require to test

2021-06-21 Thread Bradley Smith via cfe-commits
Author: Bradley Smith Date: 2021-06-21T15:36:44+01:00 New Revision: ed31ff9c7a9e538ead1fa4feecf09987998621b4 URL: https://github.com/llvm/llvm-project/commit/ed31ff9c7a9e538ead1fa4feecf09987998621b4 DIFF: https://github.com/llvm/llvm-project/commit/ed31ff9c7a9e538ead1fa4feecf09987998621b4.diff

[PATCH] D104643: [AArch64][SVE] Add missing target require to test

2021-06-21 Thread Bradley Smith 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 rGed31ff9c7a9e: [AArch64][SVE] Add missing target require to test (authored by bsmith). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D103702: [AArch64][SVE] Wire up vscale_range attribute to SVE min/max vector queries

2021-06-21 Thread Phil Camp via Phabricator via cfe-commits
FlameTop added a comment. This commit is failing the test on non-arm targets (e.g. https://lab.llvm.org/buildbot/#/builders/139/builds/5932). I think the test needs a 'requires' line for aarch64. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D10370

[PATCH] D103702: [AArch64][SVE] Wire up vscale_range attribute to SVE min/max vector queries

2021-06-21 Thread Bradley Smith via Phabricator via cfe-commits
bsmith added a comment. Yup, just committed a fix in ed31ff9c7a9e538ead1fa4feecf09987998621b4 , sorry for the noise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103702/new/ ht

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 353371. vsavchenko added a comment. Support ConcreteInt, LocAsInteger, and GotoLabel Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104550/new/ https://reviews.llvm.org/D104550 Files: clang/include/clang/S

[PATCH] D104647: [analyzer] Support SVal::getType for pointer-to-member values

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko created this revision. vsavchenko added reviewers: NoQ, xazax.hun, martong, steakhal, Szelethus, ASDenysPetrov, manas, RedDocMD. Herald added subscribers: dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. vsavchenko requested review of this revision.

[PATCH] D104647: [analyzer] Support SVal::getType for pointer-to-member values

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. This one is a bit more invasive, so I decided to put it into a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104647/new/ https://reviews.llvm.org/D104647 ___ c

[PATCH] D93373: [Flang][Openmp] Upgrade TASKGROUP construct to 5.0.

2021-06-21 Thread Chirag Khandelwal via Phabricator via cfe-commits
AMDChirag updated this revision to Diff 353379. AMDChirag added a comment. Herald added a reviewer: sscalpone. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fixes the clang test cases Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D104649: Thread safety analysis: Rename parameters of ThreadSafetyAnalyzer::intersectAndWarn (NFC)

2021-06-21 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: aaron.ballman, delesley. Herald added subscribers: manas, steakhal, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, a.sidorin, baloghadamsoftware. aaronpuchert requested review of this revision. Herald added a project: clang. Herald a

[PATCH] D104261: Thread safety analysis: Always warn when dropping locks on back edges

2021-06-21 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: clang/lib/Analysis/ThreadSafety.cpp:2227-2228 /// \param LEK2 The error message to report if a mutex is missing from Lset2 void ThreadSafetyAnalyzer::intersectAndWarn(FactSet &FSet1, co

[PATCH] D102507: [HIP] Support in device code

2021-06-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D102507#2792087 , @rsmith wrote: > @ldionne How should we go about establishing whether libc++ would be prepared > to officially support CUDA? Right now, Clang's CUDA support is patching in > attributes onto libc++ functions f

[clang] 5958dc7 - Try to fix clang/test/Driver/cl-include.c failure

2021-06-21 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2021-06-21T17:19:00+02:00 New Revision: 5958dc75ced482228ae4489df1eb5e255e04e5eb URL: https://github.com/llvm/llvm-project/commit/5958dc75ced482228ae4489df1eb5e255e04e5eb DIFF: https://github.com/llvm/llvm-project/commit/5958dc75ced482228ae4489df1eb5e255e04e5eb.diff

[clang] a427390 - [OpenCL] Add support of __opencl_c_images feature macro

2021-06-21 Thread Anton Zabaznov via cfe-commits
Author: Anton Zabaznov Date: 2021-06-21T18:24:07+03:00 New Revision: a4273905583559b613e1f23336978007af5849be URL: https://github.com/llvm/llvm-project/commit/a4273905583559b613e1f23336978007af5849be DIFF: https://github.com/llvm/llvm-project/commit/a4273905583559b613e1f23336978007af5849be.diff

[PATCH] D103911: [OpenCL] Add support of __opencl_c_images feature macro

2021-06-21 Thread Anton Zabaznov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa42739055835: [OpenCL] Add support of __opencl_c_images feature macro (authored by azabaznov). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103911/new/ htt

[PATCH] D103702: [AArch64][SVE] Wire up vscale_range attribute to SVE min/max vector queries

2021-06-21 Thread Matt D. via Phabricator via cfe-commits
Matt added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64TargetMachine.cpp:161 EnableBranchTargets("aarch64-enable-branch-targets", cl::Hidden, cl::desc("Enable the AAcrh64 branch target pass"), cl::init(true));

[clang] 186f2ac - [HIP] Add support functions for C++ polymorphic types

2021-06-21 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2021-06-21T11:41:07-04:00 New Revision: 186f2ac612ad3cd551dee649e3097f4284774ba0 URL: https://github.com/llvm/llvm-project/commit/186f2ac612ad3cd551dee649e3097f4284774ba0 DIFF: https://github.com/llvm/llvm-project/commit/186f2ac612ad3cd551dee649e3097f4284774ba0.dif

[PATCH] D104392: [HIP] Add support functions for C++ polymorphic types

2021-06-21 Thread Yaxun Liu 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 rG186f2ac612ad: [HIP] Add support functions for C++ polymorphic types (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D10439

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-21 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko marked an inline comment as done. vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SVals.cpp:151 + Optional VisitNonLocLazyCompoundVal(nonloc::LazyCompoundVal LCV) { +return Visit(LCV.getRegion()); + } NoQ wrote: > This

[PATCH] D103314: [Analyzer][solver] Simplify existing constraints when a new constraint is added

2021-06-21 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D103314#2829806 , @uabelho wrote: > Hi, > > I'm seeing a failed assertion with this patch. > Reproduce with > > clang --analyze bbi-57338.c > > Result: > > clang: /repo/uabelho/master-github/llvm/include/llvm/ADT/APSInt.h:1

[PATCH] D103612: [flang][driver] Add `-funparse-typed-exprs-as-fortran`

2021-06-21 Thread Peter Klausler via Phabricator via cfe-commits
klausler added a comment. In D103612#2830111 , @awarzynski wrote: > In D103612#2827468 , @klausler > wrote: > >> Kind suffixes are described in subclause 7.4.3 of Fortran 2018, e.g. R708 on >> p. 58. > > Many t

[PATCH] D103380: [C++20] Support for lambdas in unevaluated context

2021-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. I think this is incremental progress that LGTM, but let's wait a few days in case @rsmith has concerns before landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103380/new/ h

[PATCH] D103849: Fix undeduced type when instanciating template member

2021-06-21 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. This LGTM as far as the fix seems like an improvement, though I'm not 100% certain that the fix is in the right place. Please give a few more days for @rsmith to consider the cha

[PATCH] D103615: [Clang] Add option for vector compare compatibility.

2021-06-21 Thread Bardia Mahjour via Phabricator via cfe-commits
bmahjour added a comment. Sorry I didn't mention this in my earlier comment about the option name, but I think that all inconsistencies in handling vector bool/pixel types should be controlled by a single compatibility option. For example the current special handling of initialization (splat vs

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353410. jcai19 edited the summary of this revision. jcai19 added a comment. The original implementation was indeed flawed. The failed test does not specify target triple so on X86 machines the issue won't happen unless I explicitly specify "-target aarch64".

[PATCH] D104505: [HIP] Defer operator overloading errors

2021-06-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I don't think we want to do this. struct S { S& operator <<(int x); }; __device__ void foo() { S s; s<<1; } :7:6: error: invalid operands to binary expression ('S' and 'int') s<<1; ~^ ~ :2:8: note: candidate function not viable:

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 created this revision. Herald added subscribers: danielkiss, kristof.beyls. jcai19 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 closed this revision. jcai19 added a comment. Sorry it's probably clearer to use a new differential review for relanding. I've created https://reviews.llvm.org/D104656. Sorry for the noises. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1031

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. > This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931 > Shouldn't that be `This relands commit fd11a26d368c5a909fb88548fef2cee7a6c2c931`? It's pretty hard to see what's different in

[PATCH] D103615: [Clang] Add option for vector compare compatibility.

2021-06-21 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai added a comment. I haven't had time to review this yet, but I just wanted to chime in on the option spelling and description. I think we should go with: -faltivec-src-compat={xl|gcc|mixed} Source-level compatibility for Altivec vectors (for PowerPC targets). This includes resu

[PATCH] D95588: [RISCV] Implement the MC layer support of P extension

2021-06-21 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:950 + assert(Reg >= RISCV::X0 && Reg <= RISCV::X31 && "Invalid register"); + if ((Reg - RISCV::X0) % 2 || Reg == RISCV::X0) +return false; I think this can ju

[PATCH] D104553: [compiler-rt][hwasan] Add InitState options to thread initialization

2021-06-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 353421. leonardchan marked an inline comment as done. leonardchan added a comment. Updated and rebased. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104553/new/ https://reviews.llvm.org/D104553 Files: c

[PATCH] D104658: [Clang][Codegen] rename no_profile fn attr no_profile_instrument_function

2021-06-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers created this revision. nickdesaulniers added reviewers: MaskRay, void, phosek, aaron.ballman. nickdesaulniers requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GCC has had this function attribute since GCC 7.1 for this purpose

[PATCH] D104475: [Clang][Codegen] Add GNU function attribute 'no_profile' and lower it to noprofile

2021-06-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. It looks like GCC has had `no_profile_instrument_function` since GCC 7.1 for this purpose. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223#c11 Follow up: https://reviews.llvm.org/D104658. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353427. jcai19 added a comment. Use the original flawed code for future reference. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103184/new/ https://reviews.llvm.org/D103184 Files: clang/lib/Driver/ToolChains

[PATCH] D104658: [Clang][Codegen] rename no_profile fn attr no_profile_instrument_function

2021-06-21 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104658/new/ https://reviews.llvm.org/D104658

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353431. jcai19 added a comment. Add comments explaning the difference with D103184 . The implementation in D103184 unconditionally calls getAArch64ArchFeaturesFromMarch, which returns false

[PATCH] D104656: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 added a comment. In D104656#2831034 , @nickdesaulniers wrote: >> This reverts commit fd11a26d368c5a909fb88548fef2cee7a6c2c931 >> > > Shouldn't that be `This relands commit > f

[PATCH] D104658: [Clang][Codegen] rename no_profile fn attr no_profile_instrument_function

2021-06-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. (This was why I suggested we waited a bit on GCC's response...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104658/new/ https://reviews.llvm.org/D104658 ___

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers requested changes to this revision. nickdesaulniers added a comment. This revision now requires changes to proceed. removing LGTM until the reland is posted for review here so we can use the history tab to observe the changes. Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] a63d4f6 - [Clang][Codegen] rename no_profile fn attr no_profile_instrument_function

2021-06-21 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2021-06-21T11:42:06-07:00 New Revision: a63d4f6cbab133b0f1ce9afb562546fcc5bb2680 URL: https://github.com/llvm/llvm-project/commit/a63d4f6cbab133b0f1ce9afb562546fcc5bb2680 DIFF: https://github.com/llvm/llvm-project/commit/a63d4f6cbab133b0f1ce9afb562546fcc5bb2680.di

[PATCH] D103184: [AArch64] handle -Wa,-march=

2021-06-21 Thread Jian Cai via Phabricator via cfe-commits
jcai19 updated this revision to Diff 353440. jcai19 added a comment. After chatting with @nickdesaulniers, we have decided to abondoned D104656 in favor of keeping all the updates to this differential review for consistency. Appologies for any inconvenience cau

[PATCH] D103426: Clang: Extend format string checking to wprintf/wscanf

2021-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I had some time to look into this a bit more today. My review still isn't complete, but there's enough here to warrant some discussion. Comment at: clang/include/clang/AST/Expr.h:1846-1871 + std::string getStringAsChar() const { +assert(getC

[PATCH] D103426: Clang: Extend format string checking to wprintf/wscanf

2021-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added subscribers: cor3ntin, tahonermann. aaron.ballman added a comment. Adding some subscribers from WG21 SG16 who know far more about character encodings and their APIs than I do, as they may have feedback on the design aspects of this. Repository: rG LLVM Github Monorepo CH

[PATCH] D103426: Clang: Extend format string checking to wprintf/wscanf

2021-06-21 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/AST/OSLog.cpp:214 +std::u16string U16 = Lit->getStringAsChar16(); +String = Convert.to_bytes(U16); // u"char16_t String" + } else if (Lit->isUTF32()) { If `getStringAsChar16` contains the string after

[PATCH] D104505: [HIP] Defer operator overloading errors

2021-06-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D104505#2830996 , @tra wrote: > I don't think we want to do this. > > struct S { > S& operator <<(int x); > }; > > __device__ void foo() { > S s; > s<<1; > } > > :7:6: error: invalid operands to

[clang] 5013131 - [SYCL][NFC] Ensure SYCL kernel for unique-stable-name is unqualified.

2021-06-21 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2021-06-21T12:51:23-07:00 New Revision: 5013131875402539a249dca47c58cca7c359baf8 URL: https://github.com/llvm/llvm-project/commit/5013131875402539a249dca47c58cca7c359baf8 DIFF: https://github.com/llvm/llvm-project/commit/5013131875402539a249dca47c58cca7c359baf8.diff L

[PATCH] D103426: Clang: Extend format string checking to wprintf/wscanf

2021-06-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/OSLog.cpp:212 + } else if (Lit->isUTF16()) { +std::wstring_convert, char16_t> Convert; +std::u16string U16 = Lit->getStringAsChar16(); cor3ntin wrote: > I'm not sure I have a better suggestio

[clang] d9cf829 - Create install targets for scan-build-py.

2021-06-21 Thread Marco Vanotti via cfe-commits
Author: Daniel Hwang Date: 2021-06-21T13:08:34-07:00 New Revision: d9cf8291e7ef26317c13ed9a4e9bd88855166d5d URL: https://github.com/llvm/llvm-project/commit/d9cf8291e7ef26317c13ed9a4e9bd88855166d5d DIFF: https://github.com/llvm/llvm-project/commit/d9cf8291e7ef26317c13ed9a4e9bd88855166d5d.diff

[PATCH] D104138: Create install targets for scan-build-py.

2021-06-21 Thread Marco Vanotti 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 rGd9cf8291e7ef: Create install targets for scan-build-py. (authored by Daniel Hwang , committed by charco). Changed prior to commit:

[PATCH] D103184: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:201-205 + // Call getAArch64ArchFeaturesFromMarch only if "-Wa,-march=" or + // "-Xassembler -march" is detected. Otherwise it may return false + // and causes Clang to error out. +

[PATCH] D102094: [AIX][PowerPC] Remove error when specifying mabi=vec-default on AIX

2021-06-21 Thread Bardia Mahjour via Phabricator via cfe-commits
bmahjour added a comment. LGTM...I'll approve this change unless there are any objections by EOD tomorrow. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102094/new/ https://reviews.llvm.org/D102094 ___ cfe-commits mailing list cfe-commits@lis

[clang] b3634d3 - Revert "[SYCL][NFC] Ensure SYCL kernel for unique-stable-name is unqualified."

2021-06-21 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2021-06-21T13:23:52-07:00 New Revision: b3634d3e88b7f26534a5057bff182b7dced584fc URL: https://github.com/llvm/llvm-project/commit/b3634d3e88b7f26534a5057bff182b7dced584fc DIFF: https://github.com/llvm/llvm-project/commit/b3634d3e88b7f26534a5057bff182b7dced584fc.diff L

[PATCH] D102094: [AIX][PowerPC] Remove error when specifying mabi=vec-default on AIX

2021-06-21 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. > The default Altivec ABI was implemented Please include the patches or commits that implement the default ABI. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4779 CmdArgs.push_back("-mabi=vec-extabi"); +else if (A->getOption().getID() == op

[PATCH] D103184: Reland "[AArch64] handle -Wa,-march="

2021-06-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Thanks for following up on a fix! Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:201-205 + // Call getAArch64ArchFeaturesFromMarch only if "-Wa,-

[PATCH] D103986: [PowerPC] Floating Point Builtins for XL Compat.

2021-06-21 Thread Quinn Pham via Phabricator via cfe-commits
quinnp updated this revision to Diff 353475. quinnp added a comment. Addressing comments and updating tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103986/new/ https://reviews.llvm.org/D103986 Files: clang/include/clang/Basic/BuiltinsPPC.d

[clang] 2bfe053 - [UpdateCCTestChecks] Fix --replace-value-regex across RUN lines

2021-06-21 Thread Joel E. Denny via cfe-commits
Author: Joel E. Denny Date: 2021-06-21T17:01:17-04:00 New Revision: 2bfe0536e5143caad80f7a9691fa775cf451317b URL: https://github.com/llvm/llvm-project/commit/2bfe0536e5143caad80f7a9691fa775cf451317b DIFF: https://github.com/llvm/llvm-project/commit/2bfe0536e5143caad80f7a9691fa775cf451317b.diff

[PATCH] D104566: [UpdateCCTestChecks] Fix --replace-value-regex across RUN lines

2021-06-21 Thread Joel E. Denny 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 rG2bfe0536e514: [UpdateCCTestChecks] Fix --replace-value-regex across RUN lines (authored by jdenny). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D104505: [HIP] Defer operator overloading errors

2021-06-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D104505#2831555 , @tra wrote: > In NVCC's compilation only device-side compilation is aware of "semantics' of > `__host__`/`__device__` attributes. HOST-side compilation is not aware of GPU > existence. `cudafe++` massages th

[PATCH] D104550: [analyzer] Implement getType for SVal

2021-06-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/SVals.cpp:151 + Optional VisitNonLocLazyCompoundVal(nonloc::LazyCompoundVal LCV) { +return Visit(LCV.getRegion()); + } vsavchenko wrote: > NoQ wrote: > > This is correct except you need to

[PATCH] D104667: Improve the diagnostic of DiagnosticInfoResourceLimit (and warn-stack-size in particular)

2021-06-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 353497. MaskRay added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. stack size -> stack frame size The former is ambiguous (it could mean the full stack size). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D104342: [IR] convert warn-stack-size from module flag to fn attr

2021-06-21 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers updated this revision to Diff 353499. nickdesaulniers marked 2 inline comments as done. nickdesaulniers edited the summary of this revision. nickdesaulniers added a comment. - fix langref, delete inline and linker tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D104342: [IR] convert warn-stack-size from module flag to fn attr

2021-06-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D104342#2831733 , @nickdesaulniers wrote: > In D104342#2831717 , @dblaikie > wrote: > >> I don't know that there's a good answer (in more extreme cases - like >> different optimizat

[clang] 8ace121 - [IR] convert warn-stack-size from module flag to fn attr

2021-06-21 Thread Nick Desaulniers via cfe-commits
Author: Nick Desaulniers Date: 2021-06-21T15:09:25-07:00 New Revision: 8ace12130526f450c822ca232d1f865b247d7434 URL: https://github.com/llvm/llvm-project/commit/8ace12130526f450c822ca232d1f865b247d7434 DIFF: https://github.com/llvm/llvm-project/commit/8ace12130526f450c822ca232d1f865b247d7434.di

[PATCH] D104601: [Preprocessor] Implement -fnormalize-whitespace.

2021-06-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. This is probably more @aaron.ballman 's wheelhouse, but for my money this seems pretty problematic - will make quoted text in compiler diagnostics weird/difficult to read, etc. Do you have a particular use case that has exceptionally frequent whitespace-only changes?

[PATCH] D104667: Improve the diagnostic of DiagnosticInfoResourceLimit (and warn-stack-size in particular)

2021-06-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Misc/backend-resource-limit-diagnostics.cl:4 -// CHECK: error: local memory limit exceeded (48) in use_huge_lds +// CHECK: error: local memory (48) exceeds limit in function 'use_huge_lds' kernel void use_huge_lds()

[PATCH] D100139: [ifs][elfabi] Merge llvm-ifs/elfabi tools

2021-06-21 Thread Haowei Wu via Phabricator via cfe-commits
haowei updated this revision to Diff 353507. haowei marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100139/new/ https://reviews.llvm.org/D100139 Files: clang/cmake/caches/Fuchsia-stage2.cmake clang/lib/Driver/Tool

[PATCH] D104505: [HIP] Defer operator overloading errors

2021-06-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D104505#2831644 , @yaxunl wrote: > However, this does cause source level incompatibilities, i.e. CUDA code that > passes nvcc does not pass clang. This patch somehow addresses that without > compromising clang's more sophisticate

  1   2   >