[PATCH] D77178: [Analyzer][WebKit] NoUncountedMembersChecker

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Hi, @jkorous Thanks for working on this analyzer check. Just give you some feedback on this check, it seems to trigger the assertion quite often (we noticed that internally there were a lot of crashes). you can easily reproduce it by running it a LLVM file, e.g.

[PATCH] D80903: [analyzer] Ignore calculated indices of <= 0 in VLASizeChecker

2020-06-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:114-115 // Convert the array length to size_t. NonLoc IndexLength = SVB.evalCast(SizeD, SizeTy, SizeE->getType()).castAs(); // Multiply the array length by

[PATCH] D80896: [clang-tidy][misc-redundant-expression] Support for CXXFoldExpr

2020-06-02 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. @njames93, do you still have any comments? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80896/new/ https://reviews.llvm.org/D80896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D80980: [AST] Fix a null initializer crash for InitListExpr

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:1640 expr = Result.getAs(); // FIXME: Why are we updating the syntactic init list? + if (!VerifyOnly && expr) I have the same question. but if

[PATCH] D80980: [AST] Fix a null initializer crash for InitListExpr

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: clang. hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/Sema/SemaInit.cpp:1640 expr = Result.getAs(); // FIXME: Why are we updating the

[clang] e0bca46 - Options for Basic Block Sections, enabled in D68063 and D73674.

2020-06-02 Thread Sriraman Tallam via cfe-commits
Author: Sriraman Tallam Date: 2020-06-02T00:23:32-07:00 New Revision: e0bca46b0854143b2f93b60aac99e669c9776979 URL: https://github.com/llvm/llvm-project/commit/e0bca46b0854143b2f93b60aac99e669c9776979 DIFF:

[PATCH] D80771: [MTE] Convert StackSafety into analysis

2020-06-02 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 267802. vitalybuka added a comment. remove unneeded pass Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80771/new/ https://reviews.llvm.org/D80771 Files: clang/lib/CodeGen/BackendUtil.cpp

Re: Bug in QualTypeNames.cpp and adding an option to prepend "::" to fully qualified names.

2020-06-02 Thread Jean-Baptiste Lespiau via cfe-commits
Yes it was: https://reviews.llvm.org/D80800#2065643 Thanks to Sam, I understand the situation better, but I have been slowed down quite a lot by the fact that (a) the logic to print types is duplicated both in TypePrinter.cpp and NamedDecl.{h, cpp}. There are 2 different code-paths that are

[PATCH] D68049: Propeller: Clang options for basic block sections

2020-06-02 Thread Sriraman Tallam via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. tmsriram marked 2 inline comments as done. Closed by commit rGe0bca46b0854: Options for Basic Block Sections, enabled in D68063 and D73674. (authored by tmsriram). Changed prior to commit:

[PATCH] D80822: Run syntax tree tests in many language modes

2020-06-02 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko accepted this revision. hlopko added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80822/new/ https://reviews.llvm.org/D80822

[PATCH] D80981: [AST] Fix a crash on accessing a class without definition in constexpr function context.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D80981 Files: clang/lib/AST/ExprConstant.cpp clang/test/SemaCXX/constant-expression-cxx2a.cpp Index:

[PATCH] D77178: [Analyzer][WebKit] NoUncountedMembersChecker

2020-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Looks similar to https://bugs.llvm.org/show_bug.cgi?id=46142. It sounds pretty important to address quickly because it crashes on a fairly large portion of C++ code with default settings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80822: Run syntax tree tests in many language modes

2020-06-02 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:54-63 + bool isCXX() const { +return Language == Lang_CXX || Language == Lang_CXX11 || + Language == Lang_CXX14 || Language == Lang_CXX17 || + Language ==

Re: [PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-06-02 Thread Kadir Çetinkaya via cfe-commits
Hi Jan, I don't think there's much point in running ReplayPreamble with an empty preamble, but this should already be a no-op as there can't be any includes inside the preamble region if size is 0. I can't seem to reproduce a failure with the root causes you've provided. Even when

[PATCH] D80822: Run syntax tree tests in many language modes

2020-06-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr updated this revision to Diff 267814. gribozavr added a comment. Updated according to the code review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80822/new/ https://reviews.llvm.org/D80822 Files:

[PATCH] D80822: Run syntax tree tests in many language modes

2020-06-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 added inline comments. Comment at: clang/unittests/Tooling/Syntax/TreeTest.cpp:54-63 + bool isCXX() const { +return Language == Lang_CXX || Language == Lang_CXX11 || + Language == Lang_CXX14 || Language == Lang_CXX17 || + Language ==

[clang] 44f989e - Run syntax tree tests in many language modes

2020-06-02 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2020-06-02T10:30:01+02:00 New Revision: 44f989e7809633f13bd0420cc1d79660ad982173 URL: https://github.com/llvm/llvm-project/commit/44f989e7809633f13bd0420cc1d79660ad982173 DIFF:

[clang] 97b8dab - [AST] Fix a null initializer crash for InitListExpr

2020-06-02 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-06-02T10:48:48+02:00 New Revision: 97b8dabba5c5c1d799bd8b6856d4a81360361769 URL: https://github.com/llvm/llvm-project/commit/97b8dabba5c5c1d799bd8b6856d4a81360361769 DIFF: https://github.com/llvm/llvm-project/commit/97b8dabba5c5c1d799bd8b6856d4a81360361769.diff

Re: [PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-06-02 Thread Sam McCall via cfe-commits
On Tue, Jun 2, 2020 at 10:38 AM Kadir Çetinkaya wrote: > Hi Jan, > > I don't think there's much point in running ReplayPreamble with an empty > preamble, but this should already be a no-op as there can't be any includes > inside the preamble region if size is 0. > > I can't seem to reproduce a

[PATCH] D80981: [AST] Fix a crash on accessing a class without definition in constexpr function context.

2020-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4320 +if (!RD->hasDefinition()) + return APValue(); APValue Struct(APValue::UninitStruct(), RD->getNumBases(), This doesn't look all that safe - you're using a `None` value

[PATCH] D80980: [AST] Fix a null initializer crash for InitListExpr

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG97b8dabba5c5: [AST] Fix a null initializer crash for InitListExpr (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80980/new/

[PATCH] D74299: [clang-tidy] extend tests of run-clang-tidy

2020-06-02 Thread Alexander Lanin via Phabricator via cfe-commits
AlexanderLanin added a comment. *ping* CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74299/new/ https://reviews.llvm.org/D74299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D80822: Run syntax tree tests in many language modes

2020-06-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG44f989e78096: Run syntax tree tests in many language modes (authored by gribozavr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80822/new/

[PATCH] D80986: [clangd] Prototype for postfix completion.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. hokein edited the summary of this revision. This is a quick proof-of-concept demo for postfix completion. demo (ignore the wrong

[clang] 89d9dba - [OPENMP50]Initial codegen for 'affinity' clauses.

2020-06-02 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2020-06-02T10:50:08-04:00 New Revision: 89d9dba2c6885949887edf4b80e1aabf8d8f3f88 URL: https://github.com/llvm/llvm-project/commit/89d9dba2c6885949887edf4b80e1aabf8d8f3f88 DIFF: https://github.com/llvm/llvm-project/commit/89d9dba2c6885949887edf4b80e1aabf8d8f3f88.diff

[PATCH] D80716: [AArch64]: BFloat Load/Store Intrinsics

2020-06-02 Thread Luke Geeson via Phabricator via cfe-commits
LukeGeeson updated this revision to Diff 267896. LukeGeeson marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80716/new/ https://reviews.llvm.org/D80716 Files: clang/include/clang/Basic/arm_neon.td clang/lib/CodeGen/CGBuiltin.cpp

[PATCH] D80996: [AMDGPU][OpenMP] Fix duplicate copies of arguments in commands

2020-06-02 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal added inline comments. Comment at: clang/lib/Driver/ToolChains/HIP.cpp:389 - for (Arg *A : Args) { -DAL->append(A); + if (DeviceOffloadKind != Action::OFK_OpenMP) { +for (Arg *A : Args) { arsenm wrote: > Needs a comment? I don't understand

[PATCH] D80903: [analyzer] Ignore calculated indices of <= 0 in VLASizeChecker

2020-06-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske accepted this revision. balazske added a comment. This revision is now accepted and ready to land. At least as fast bugfix it is acceptable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80903/new/ https://reviews.llvm.org/D80903

[PATCH] D80716: [AArch64]: BFloat Load/Store Intrinsics

2020-06-02 Thread Luke Geeson via Phabricator via cfe-commits
LukeGeeson added a subscriber: pratlucas. LukeGeeson added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:10366 +auto Alignment = CGM.getNaturalPointeeTypeAlignment( +E->getArg(0)->IgnoreParenCasts()->getType()); Ops[0] =

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. My experience with clang-tidy has been that template instantiations are a double-edged sword. The instantiation is the only place at which you have sufficient information to perform many kinds of analyses, but it's also often not plausible to modify the templated

[PATCH] D80439: Replace separator in OpenMP variant name mangling.

2020-06-02 Thread Lukas Sommer via Phabricator via cfe-commits
LukasSommerTu added a comment. @jdoerfert: I've added a test. I kept it focused on the variants for NVPTX architecture (mangling is currently the same for all archs), let me know if that was what you had in mind. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80439/new/

[PATCH] D80439: Replace separator in OpenMP variant name mangling.

2020-06-02 Thread Lukas Sommer via Phabricator via cfe-commits
LukasSommerTu updated this revision to Diff 267902. LukasSommerTu added a comment. Added a small test checking for functions with the correctly mangled name. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80439/new/ https://reviews.llvm.org/D80439 Files:

[PATCH] D79945: [Sema] Comparison of pointers to complete and incomplete types

2020-06-02 Thread Benson Chu via Phabricator via cfe-commits
pestctrl updated this revision to Diff 267901. pestctrl added a comment. Updated test with new error message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79945/new/ https://reviews.llvm.org/D79945 Files:

[PATCH] D80531: [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro

2020-06-02 Thread Konrad Wilhelm Kleine via Phabricator via cfe-commits
kwk marked 4 inline comments as done. kwk added a comment. Marked more comments as "done" after going through the code again. Comment at: clang-tools-extra/clang-tidy/modernize/ReplaceDisallowCopyAndAssignMacroCheck.cpp:49 +R"cpp({0}(const {0} &) = delete; +const {0}

[PATCH] D80903: [analyzer] Ignore calculated indices of <= 0 in VLASizeChecker

2020-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp:114-115 // Convert the array length to size_t. NonLoc IndexLength = SVB.evalCast(SizeD, SizeTy, SizeE->getType()).castAs(); // Multiply the array length by the

[PATCH] D71199: [clang-tidy] New check cppcoreguidelines-prefer-member-initializer

2020-06-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 4 inline comments as done. baloghadamsoftware added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-prefer-member-initializer-assignment.cpp:29 +public: + Simple2() : n (0) { +x = 0.0;

[PATCH] D80903: [analyzer] Ignore calculated indices of <= 0 in VLASizeChecker

2020-06-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. It is no problem to return instead of the assert. I could fix the problem by using SVal LessThanZeroVal = SVB.evalBinOp(State, BO_LE, SizeD, Zero, SizeTy); in `checkVLAIndexSize` (`BO_LT` is used before). Still the proposed return makes the code more safe.

[PATCH] D71199: [clang-tidy] New check cppcoreguidelines-prefer-member-initializer

2020-06-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 267833. baloghadamsoftware added a comment. Updated according to the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71199/new/ https://reviews.llvm.org/D71199 Files:

[PATCH] D77866: [analyzer][CallAndMessage] Add checker options for each bug category

2020-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. We (me, Valeriy, Devin)'ve just been talking about this and mostly of agreed that `core.CallAndMessage` should ideally be removed (at least as a `Checkers.td` entity) and individual checks moved to the relevant package (null dereference, use of uninitialized value, etc.).

[PATCH] D80925: Fix compiler crash when an expression parsed in the tentative parsing and must be claimed in the another evaluation context.

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1009 + Actions, Sema::ExpressionEvaluationContext::Unevaluated, + Sema::ReuseLambdaContextDecl); + Res =

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2068428 , @mstorsjo wrote: > But as for keeping the old default in mingw environments, would it make sense > to, if on windows, check the default target triple, and if that's a mingw > target

[PATCH] D80996: [AMDGPU][OpenMP] Fix duplicate copies of arguments in commands

2020-06-02 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal created this revision. pdhaliwal added reviewers: yaxunl, msearles, sameerds. Herald added subscribers: cfe-commits, sstefan1, guansong, t-tye, tpr, dstuttard, wdng, kzhuravl. Herald added a reviewer: jdoerfert. Herald added a project: clang. When offloading kind is OFK_OpenMP, the

[PATCH] D80947: Add to the Coding Standard our that single-line bodies omit braces

2020-06-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 267856. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80947/new/ https://reviews.llvm.org/D80947 Files: llvm/docs/CodingStandards.rst Index: llvm/docs/CodingStandards.rst === ---

[PATCH] D80996: [AMDGPU][OpenMP] Fix duplicate copies of arguments in commands

2020-06-02 Thread Pushpinder Singh via Phabricator via cfe-commits
pdhaliwal updated this revision to Diff 267870. pdhaliwal added a comment. Added lit test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80996/new/ https://reviews.llvm.org/D80996 Files: clang/lib/Driver/ToolChains/HIP.cpp

[PATCH] D81003: [clang][Sema] SequenceChecker: Also visit default arguments.

2020-06-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rsmith. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. `SequenceChecker` is currently not visiting default arguments and therefore missing cases like: int a; int foo(int x = a++, int y = a); void

[PATCH] D80733: [AST][RecoveryExpr] Build RecoveryExpr for "undef_var" cases.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG21ccc684ff4c: [AST][RecoveryExpr] Build RecoveryExpr for undef_var cases. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80733/new/

[PATCH] D79945: [Sema] Comparison of pointers to complete and incomplete types

2020-06-02 Thread Benson Chu via Phabricator via cfe-commits
pestctrl updated this revision to Diff 267876. pestctrl added a comment. Updated warning message to be more descriptive Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79945/new/ https://reviews.llvm.org/D79945 Files:

[PATCH] D80733: [AST][RecoveryExpr] Build RecoveryExpr for "undef_var" cases.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:8310 +// to RecoveryExpr. +// FIXME: we lose source locations for RecoveryExpr, as TypoExpr doesn't +// track source locations. sammccall wrote: > This seems reasonably

[PATCH] D80733: [AST][RecoveryExpr] Build RecoveryExpr for "undef_var" cases.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 267873. hokein marked 3 inline comments as done. hokein added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80733/new/ https://reviews.llvm.org/D80733 Files:

[PATCH] D80716: [AArch64]: BFloat Load/Store Intrinsics

2020-06-02 Thread Luke Geeson via Phabricator via cfe-commits
LukeGeeson added a comment. In D80716#2059977 , @stuij wrote: > We need testing for the backend code. @stuij I have added `aarch64-bf16-ldst-intrinsics.ll` to test the backend. Please let me know if this is ok :) CHANGES SINCE LAST ACTION

[clang] 301a6da - AMDGPU: Fix clang side null pointer value for private

2020-06-02 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2020-06-02T09:23:46-04:00 New Revision: 301a6da8c24a09052e3bda10e90b450b7b39ffea URL: https://github.com/llvm/llvm-project/commit/301a6da8c24a09052e3bda10e90b450b7b39ffea DIFF:

[PATCH] D58579: [Sema] SequenceChecker: C++17 sequencing rule for call expressions.

2020-06-02 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 267865. riccibruno added a comment. Updated with the test case from PR20819. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58579/new/ https://reviews.llvm.org/D58579 Files:

[PATCH] D81000: Renamed Lang_C to Lang_C99, Lang_CXX to Lang_CXX03, and 2a to 20

2020-06-02 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko accepted this revision. hlopko added a comment. This revision is now accepted and ready to land. Looks good, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81000/new/ https://reviews.llvm.org/D81000

[PATCH] D80758: [PowerPC] Add -m[no-]power10-vector clang and llvm option

2020-06-02 Thread Lei Huang via Phabricator via cfe-commits
lei accepted this revision. lei added a comment. LGTM. Minor nit can be addressed during commit. Comment at: clang/lib/Basic/Targets/PPC.cpp:413 + Features["power9-vector"] = Features["power10-vector"] = false; +if (Name == "power9-vector") +

[PATCH] D80833: [CodeView] Add full repro to LF_BUILDINFO record

2020-06-02 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked 2 inline comments as done. aganea added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:320 + /// Executable and command-line used to create a given CompilerInvocation. + const char *BuildTool = nullptr; + ArrayRef CommandLineArgs;

[PATCH] D80932: [SYCL] Make default address space a superset of OpenCL address spaces.

2020-06-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Why? Default address space is normally an address space of automatic storage i.e. `private` in OpenCL. If you look at the address space map of targets most of them map default and private address spaces to the same value. Converting between private and other named

[PATCH] D80961: WIP: Ignore template instantiations if not in AsIs mode

2020-06-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel added a comment. Thank you for bringing up this issue. I think it highlights an underlying problem -- editing templates is quite difficult -- that neither setting will address, as Dmitri expanded on above. Given the parallel to macros, I'd say your change is better than the status quo.

[clang] e16a4ef - Remove a comment-out llvm::errs debugging code, NFC.

2020-06-02 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-06-02T15:42:46+02:00 New Revision: e16a4efdc6f429eabfb47ef90d40fcb6b6e362ad URL: https://github.com/llvm/llvm-project/commit/e16a4efdc6f429eabfb47ef90d40fcb6b6e362ad DIFF: https://github.com/llvm/llvm-project/commit/e16a4efdc6f429eabfb47ef90d40fcb6b6e362ad.diff

[clang] 21ccc68 - [AST][RecoveryExpr] Build RecoveryExpr for "undef_var" cases.

2020-06-02 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-06-02T15:58:56+02:00 New Revision: 21ccc684ff4c8563e7b20bed4ae7dc7d18fe03f3 URL: https://github.com/llvm/llvm-project/commit/21ccc684ff4c8563e7b20bed4ae7dc7d18fe03f3 DIFF: https://github.com/llvm/llvm-project/commit/21ccc684ff4c8563e7b20bed4ae7dc7d18fe03f3.diff

[PATCH] D81008: [AST] Record SourceLocation for TypoExpr.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D81008 Files: clang/include/clang/AST/Expr.h clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaExprCXX.cpp

[PATCH] D81009: Reinstate the syntax tree test for 'static' in an array subscript

2020-06-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. gribozavr2 added a reviewer: eduucaldas. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D81009 Files: clang/unittests/Tooling/Syntax/TreeTest.cpp Index:

[PATCH] D80903: [analyzer] Ignore calculated indices of <= 0 in VLASizeChecker

2020-06-02 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 267882. vabridgers added a comment. Address comments from Artem and Balazs. This change just avoids the crash for now until a proper fix can be made. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80903/new/

[PATCH] D80833: [CodeView] Add full repro to LF_BUILDINFO record

2020-06-02 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea marked an inline comment as done. aganea added inline comments. Comment at: clang/test/CodeGen/debug-info-codeview-buildinfo.c:3 +// RUN: llvm-pdbutil dump --types %t.obj | FileCheck %s + +int main() { return 42; } Is there a way to launch an arbitrary

[PATCH] D80996: [AMDGPU][OpenMP] Fix duplicate copies of arguments in commands

2020-06-02 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Driver/ToolChains/HIP.cpp:389 - for (Arg *A : Args) { -DAL->append(A); + if (DeviceOffloadKind != Action::OFK_OpenMP) { +for (Arg *A : Args) { Needs a comment? I don't understand why openmp is any

[PATCH] D80833: [CodeView] Add full repro to LF_BUILDINFO record

2020-06-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:320 + /// Executable and command-line used to create a given CompilerInvocation. + const char *BuildTool = nullptr; + ArrayRef CommandLineArgs; The name BuildTool makes me

[clang] 53c29a4 - Reinstate the syntax tree test for 'static' in an array subscript

2020-06-02 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2020-06-02T17:01:51+02:00 New Revision: 53c29a42d044b167f6b5f28e096c8d9e50d6edc7 URL: https://github.com/llvm/llvm-project/commit/53c29a42d044b167f6b5f28e096c8d9e50d6edc7 DIFF:

[PATCH] D80931: AMDGPU: Fix clang side null pointer value for private

2020-06-02 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. 301a6da8c24a09052e3bda10e90b450b7b39ffea CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80931/new/ https://reviews.llvm.org/D80931

[PATCH] D80366: [Analyzer] Add `getReturnValueUnderConstruction()` to `CallEvent`

2020-06-02 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 267879. baloghadamsoftware added a comment. Incorporated @NoQ's solution. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80366/new/ https://reviews.llvm.org/D80366 Files:

[PATCH] D80833: [CodeView] Add full repro to LF_BUILDINFO record

2020-06-02 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 267880. aganea marked an inline comment as done. aganea added a comment. As requested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80833/new/ https://reviews.llvm.org/D80833 Files:

[PATCH] D80240: [OPENMP50]Initial codegen for 'affinity' clauses.

2020-06-02 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG89d9dba2c688: [OPENMP50]Initial codegen for affinity clauses. (authored by ABataev). Changed prior to commit: https://reviews.llvm.org/D80240?vs=267254=267895#toc Repository: rG LLVM Github Monorepo

[PATCH] D81009: Reinstate the syntax tree test for 'static' in an array subscript

2020-06-02 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG53c29a42d044: Reinstate the syntax tree test for static in an array subscript (authored by gribozavr). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80366: [Analyzer] Add `getReturnValueUnderConstruction()` to `CallEvent`

2020-06-02 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CallEvent.cpp:552 + + Index = StackFrame->getIndex(); + Szelethus wrote: > baloghadamsoftware wrote: > > Szelethus wrote: > > > This mustn't be serious. `StackFrameContext::getIndex()`

[PATCH] D80876: [clang] Default to windows response files when running on windows

2020-06-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D80876#2067532 , @rnk wrote: > This seems wrong for mingw, so check with @mstorsjo. Thanks for the headsup! I agree that this change would make sense and would make things more consistent in general, but @rnk is also right

[clang-tools-extra] a0f13b3 - Revert "[clangd] Copy existing includes in ReplayPreamble"

2020-06-02 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-06-02T14:31:45+02:00 New Revision: a0f13b33742372bf00640eb18a2f3229176fc77d URL: https://github.com/llvm/llvm-project/commit/a0f13b33742372bf00640eb18a2f3229176fc77d DIFF:

[clang-tools-extra] 8506877 - [clangd] Copy existing includes in ReplayPreamble

2020-06-02 Thread Kadir Cetinkaya via cfe-commits
Author: Kadir Cetinkaya Date: 2020-06-02T14:31:45+02:00 New Revision: 8506877c87aa602736aee1fffbd80b886fa40b79 URL: https://github.com/llvm/llvm-project/commit/8506877c87aa602736aee1fffbd80b886fa40b79 DIFF:

[clang] a6a42df - [Sema] Fix -Wunused-variable in CreateBuiltinMatrixSubscriptExpr (NFC).

2020-06-02 Thread Florian Hahn via cfe-commits
Author: Florian Hahn Date: 2020-06-02T10:45:30+01:00 New Revision: a6a42df506ca93df69725f732c396050060f026f URL: https://github.com/llvm/llvm-project/commit/a6a42df506ca93df69725f732c396050060f026f DIFF: https://github.com/llvm/llvm-project/commit/a6a42df506ca93df69725f732c396050060f026f.diff

[PATCH] D80947: Add to the Coding Standard our that single-line bodies omit braces

2020-06-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane marked 6 inline comments as done. erichkeane added inline comments. Comment at: llvm/docs/CodingStandards.rst:1578 +unnecessary and otherwise meaningless code. Braces should be used however +in cases where it significantly improves readability, such as when the single

[PATCH] D79895: Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-06-02 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. Very nice! I only have minor comments. Also I'm curious to see what this will find in Chromium. I guess we'll find out :-) Comment at: clang/include/clang/Analysis/Analyses/UninitializedValues.h:118 + + virtual void

[PATCH] D80383: Add AST_SIGNATURE record to unhashed control block of PCM files

2020-06-02 Thread Daniel Grumberg via Phabricator via cfe-commits
dang added a comment. I made the decision to make all relative offsets relative to the start of the AST block rather than their own sub-block or a neighboring block, in order to prevent adding complexity in `ASTReader`. My reasoning that it would be best if the reader didn't have to keep track

[PATCH] D80941: [PowerPC][Power10] Implement Count Leading/Trailing Zeroes Builtins in LLVM/Clang

2020-06-02 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai requested changes to this revision. nemanjai added a comment. This revision now requires changes to proceed. In D80941#2066931 , @lebedev.ri wrote: > Why not lower it to `@llvm.cttz(and(a, b))`? That's a great idea. Particularly in the back end

[PATCH] D80996: [AMDGPU][OpenMP] Fix duplicate copies of arguments in commands

2020-06-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can we have a lit test? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80996/new/ https://reviews.llvm.org/D80996 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D80981: [AST] Fix a crash on accessing a class without definition in constexpr function context.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added a subscriber: rsmith. hokein added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4320 +if (!RD->hasDefinition()) + return APValue(); APValue Struct(APValue::UninitStruct(), RD->getNumBases(),

[PATCH] D80752: [AArch64]: BFloat MatMul Intrinsics

2020-06-02 Thread Mikhail Maltsev via Phabricator via cfe-commits
miyuki added inline comments. Comment at: clang/test/CodeGen/aarch64-bf16-dotprod-intrinsics.c:8 +// CHECK-LABEL: test_vbfdot_f32 +// CHECK: %0 = bitcast <4 x bfloat> %a to <8 x i8> +// CHECK: %1 = bitcast <4 x bfloat> %b to <8 x i8> Why not `CHECK-NEXT`?

[PATCH] D80952: [FPEnv][Clang][Driver][WIP] Disable constrained floating point on targets lacking support.

2020-06-02 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D80952#2067643 , @arsenm wrote: > In D80952#2067563 , @efriedma wrote: > > > The problem for the command-line arguments in particular is that they > > aren't really new; clang has been

[PATCH] D80758: [PowerPC] Add -m[no-]power10-vector clang and llvm option

2020-06-02 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir updated this revision to Diff 267859. saghir added a comment. Removed `P10Altivec`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80758/new/ https://reviews.llvm.org/D80758 Files: clang/include/clang/Driver/Options.td

[PATCH] D80758: [PowerPC] Add -m[no-]power10-vector clang and llvm option

2020-06-02 Thread Ahsan Saghir via Phabricator via cfe-commits
saghir marked 2 inline comments as done. saghir added inline comments. Comment at: clang/lib/Basic/Targets/PPC.cpp:414 +if (Name == "power9-vector") + Features["power10-vector"] = false; Features[Name] = false; lei wrote: > I think it would be good

[PATCH] D80988: [clangd] Copy existing includes in ReplayPreamble

2020-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:386 // Replay the preamble includes so that clang-tidy checks can see them.

[PATCH] D80986: [clangd] Prototype for postfix completion.

2020-06-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Neat! > The big question: Where should we implement? in clangd, or in Sema? Advantages of Sema: - better access to AST/context so more flexible - available to tools other than clangd Advantages of clangd: - fewer layer of abstraction to traverse - access to the

[PATCH] D80931: AMDGPU: Fix clang side null pointer value for private

2020-06-02 Thread Christudasan Devadasan via Phabricator via cfe-commits
cdevadas accepted this revision. cdevadas added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80931/new/ https://reviews.llvm.org/D80931 ___ cfe-commits mailing list

[PATCH] D80988: [clangd] Copy existing includes in ReplayPreamble

2020-06-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 267848. kadircet marked an inline comment as done. kadircet added a comment. - Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80988/new/ https://reviews.llvm.org/D80988 Files:

[PATCH] D80905: [analyzer] Introduce weak dependencies to express *preferred* checker callback evaluation order

2020-06-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D80905#2068320 , @NoQ wrote: > +Nithin because it may be relevant to the smart pointer checker if > inter-checker communication turns out to be necessary (eg., with the move > checker). If checkers rely on one another,

[PATCH] D77866: [analyzer][CallAndMessage] Add checker options for each bug category

2020-06-02 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D77866#2068394 , @NoQ wrote: > We (me, Valeriy, Devin)'ve just been talking about this and mostly of agreed > that `core.CallAndMessage` should ideally be removed (at least as a > `Checkers.td` entity) and individual checks

[PATCH] D80988: [clangd] Copy existing includes in ReplayPreamble

2020-06-02 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8506877c87aa: [clangd] Copy existing includes in ReplayPreamble (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80988/new/

[PATCH] D80508: [AST] Fix the source range for TagDecl if there is no matched } brace.

2020-06-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang/lib/AST/Decl.cpp:4129 SourceRange TagDecl::getSourceRange() const { - SourceLocation RBraceLoc = BraceRange.getEnd(); - SourceLocation E = RBraceLoc.isValid() ? RBraceLoc : getLocation();

Re: [PATCH] D77644: [clangd] Handle additional includes while parsing ASTs

2020-06-02 Thread Kadir Çetinkaya via cfe-commits
managed to reproduce the issue. sent out https://reviews.llvm.org/D80988 for a fix. On Tue, Jun 2, 2020 at 12:08 PM Sam McCall wrote: > On Tue, Jun 2, 2020 at 10:38 AM Kadir Çetinkaya > wrote: > >> Hi Jan, >> >> I don't think there's much point in running ReplayPreamble with an empty >>

[PATCH] D76791: [Matrix] Implement matrix index expressions ([][]).

2020-06-02 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:4738-4739 +bool ConversionOk = tryConvertToTy(*this, Context.getSizeType(), ); +assert(ConversionOk && + "should be able to convert any integer type to

[PATCH] D80905: [analyzer] Introduce weak dependencies to express *preferred* checker callback evaluation order

2020-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a reviewer: vrnithinkumar. NoQ added a comment. +Nithin because it may be relevant to the smart pointer checker if inter-checker communication turns out to be necessary (eg., with the move checker). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80517: [analyzer] CmpRuns.py: Refactor and add type annotations

2020-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I guess this one's stuck on the discussion about whether we need to retain python2 support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80517/new/ https://reviews.llvm.org/D80517

[PATCH] D80366: [Analyzer] Add `getReturnValueUnderConstruction()` to `CallEvent`

2020-06-02 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added reviewers: vrnithinkumar, vsavchenko, xazax.hun. NoQ added a comment. +GSoC gang because it'll ultimately help Nithin's future checker track smart pointers returned from functions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80366/new/ https://reviews.llvm.org/D80366

[PATCH] D80301: [yaml][clang-tidy] Fix new line YAML serialization

2020-06-02 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin added reviewers: Eugene.Zelenko, thegameg. DmitryPolukhin marked an inline comment as done. DmitryPolukhin added subscribers: thegameg, Eugene.Zelenko. DmitryPolukhin added a comment. + @gribozavr, @Eugene.Zelenko, @thegameg who touched/reviewed this code, please take a look.

  1   2   3   >