[PATCH] D75951: Keep a list of already-included pragma-once files for mods.

2020-03-26 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo updated this revision to Diff 252761. oontvoo added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75951/new/ https://reviews.llvm.org/D75951 Files: clang/include/clang/Lex/HeaderSearch.h clang/include/clang/Lex/Preprocesso

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-26 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 252758. hliao added a comment. Fix windows build and revise header change. - When including `drivers_types.h` or `host_defines.h` with `__CUDACC__`, the only difference is the additional attributes added. No additional change. - After including `host_defines.h

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-26 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Headers/__clang_cuda_runtime_wrapper.h:82-94 #undef __CUDACC__ #if CUDA_VERSION < 9000 #define __CUDABE__ #else +#define __CUDACC__ #define __CUDA_LIBDEVICE__ #endif

[PATCH] D75951: Keep a list of already-included pragma-once files for mods.

2020-03-26 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo updated this revision to Diff 252760. oontvoo added a comment. . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75951/new/ https://reviews.llvm.org/D75951 Files: clang/include/clang/Lex/HeaderSearch.h clang/include/clang/Lex/Preprocesso

[clang] a3f4d17 - [Analyzer] Use note tags to track container begin and and changes

2020-03-26 Thread Adam Balogh via cfe-commits
Author: Adam Balogh Date: 2020-03-26T07:56:28+01:00 New Revision: a3f4d17a1a53c4144a5bb7c14620a5d2790f36ea URL: https://github.com/llvm/llvm-project/commit/a3f4d17a1a53c4144a5bb7c14620a5d2790f36ea DIFF: https://github.com/llvm/llvm-project/commit/a3f4d17a1a53c4144a5bb7c14620a5d2790f36ea.diff L

[clang] a9ab11d - [AST] Build recovery expressions for nonexistent member exprs.

2020-03-26 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-03-26T08:50:33+01:00 New Revision: a9ab11d40830cc01c3a6ff97633140e8bd1e431e URL: https://github.com/llvm/llvm-project/commit/a9ab11d40830cc01c3a6ff97633140e8bd1e431e DIFF: https://github.com/llvm/llvm-project/commit/a9ab11d40830cc01c3a6ff97633140e8bd1e431e.diff LO

[PATCH] D76764: [AST] Build recovery expressions for nonexistent member exprs.

2020-03-26 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa9ab11d40830: [AST] Build recovery expressions for nonexistent member exprs. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76764/new/

[PATCH] D73720: [Analyzer] Use note tags to track container begin and and changes

2020-03-26 Thread Balogh, Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa3f4d17a1a53: [Analyzer] Use note tags to track container begin and and changes (authored by baloghadamsoftware). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D76801: [AST] Print a> without extra spaces in C++11 or later.

2020-03-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet marked an inline comment as done. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks ! Comment at: clang/unittests/AST/DeclPrinterTest.cpp:1161 "A", -"Z > A")); -// Should be: with semic

[PATCH] D76572: Replace `T(x)` with `reinterpret_cast(x)` everywhere it means reinterpret_cast. No functional change

2020-03-26 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. In D76572#1942024 , @Quuxplusone wrote: > Btw, @jhenderson and @rsmith, if you wanted to land your own files' pieces of > this patch while waiting on whoever-it-is to approve the pieces in other > files, that'd be cool. As I m

[PATCH] D53272: Add target requirement to profile remap test.

2020-03-26 Thread Yvan Roux via Phabricator via cfe-commits
yroux closed this revision. yroux added a comment. Herald added a subscriber: danielkiss. This was closed by commit r344593 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53272/new/ https://reviews.llvm.org/D53272 ___

[PATCH] D76770: [CodeComplete] Don't replace the rest of line in #include completion.

2020-03-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D76770#1941603 , @sammccall wrote: > Does this regress the case where you complete a file rather than a directory? > e.g. `#include "foo/^one.h"` > If you select "two.h", then we definitely want to replace "one.h", right? yes

[clang] 1a27d63 - [Analyzer] Only add container note tags to the operations of the affected container

2020-03-26 Thread Adam Balogh via cfe-commits
Author: Adam Balogh Date: 2020-03-26T09:44:16+01:00 New Revision: 1a27d63a8891076ad9176f1a70f372003bc55c2f URL: https://github.com/llvm/llvm-project/commit/1a27d63a8891076ad9176f1a70f372003bc55c2f DIFF: https://github.com/llvm/llvm-project/commit/1a27d63a8891076ad9176f1a70f372003bc55c2f.diff L

[clang] 159a9f7 - [AST] Print a> without extra spaces in C++11 or later.

2020-03-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-26T09:53:54+01:00 New Revision: 159a9f7e76307734bcdcae3357640e42e0733194 URL: https://github.com/llvm/llvm-project/commit/159a9f7e76307734bcdcae3357640e42e0733194 DIFF: https://github.com/llvm/llvm-project/commit/159a9f7e76307734bcdcae3357640e42e0733194.diff LO

[clang-tools-extra] 6324912 - [clangd] Simplify "preferred" vs "definition" logic a bit in XRefs AST code.

2020-03-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-26T09:52:48+01:00 New Revision: 6324912592a1ff8d672e55e02ca63f769decb154 URL: https://github.com/llvm/llvm-project/commit/6324912592a1ff8d672e55e02ca63f769decb154 DIFF: https://github.com/llvm/llvm-project/commit/6324912592a1ff8d672e55e02ca63f769decb154.diff LO

[PATCH] D76770: [CodeComplete] Don't replace the rest of line in #include completion.

2020-03-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. In D76770#1943077 , @hokein wrote: > yes, it has a regression, but we don't change the behavior for the above > case. A regression case is like

[PATCH] D75951: Keep a list of already-included pragma-once files for mods.

2020-03-26 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo updated this revision to Diff 252768. oontvoo added a comment. Handle textual headers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75951/new/ https://reviews.llvm.org/D75951 Files: clang/include/clang/Lex/HeaderSearch.h clang/include/

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp:146 return IntValue.getSExtValue(); } The function was changed to get the numeric value from the end of the macro in any

[PATCH] D75514: [Analyzer] Only add container note tags to the operations of the affected container

2020-03-26 Thread Balogh, Ádám via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1a27d63a8891: [Analyzer] Only add container note tags to the operations of the affected… (authored by baloghadamsoftware). Herald added a subscriber: ASDenysPetrov. Changed prior to commit: https://revi

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: cfe-commits, ASDenysPetrov, martong, Charusso, gamesh411, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a project: clang. balazske added a

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske added a comment. FIXME: There is a test file "kmalloc-linux.c" but it seems to be non-maintained and buggy (has no //-verify// option so it passes always but produces multiple warnings). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76830

[PATCH] D76801: [AST] Print a> without extra spaces in C++11 or later.

2020-03-26 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG159a9f7e7630: [AST] Print a> without extra spaces in C++11 or later. (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76801/new/

[PATCH] D73369: [clangd] Simplify "preferred" vs "definition" logic a bit in XRefs AST code.

2020-03-26 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6324912592a1: [clangd] Simplify "preferred" vs "definition" logic a bit in XRefs AST code. (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[clang] 71ae267 - [PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support

2020-03-26 Thread Ties Stuij via cfe-commits
Author: Ties Stuij Date: 2020-03-26T09:17:20Z New Revision: 71ae267d1f4117473eb00d9fd3391733b843ca3c URL: https://github.com/llvm/llvm-project/commit/71ae267d1f4117473eb00d9fd3391733b843ca3c DIFF: https://github.com/llvm/llvm-project/commit/71ae267d1f4117473eb00d9fd3391733b843ca3c.diff LOG: [P

[clang] 4bd1d55 - [AST] Fix thinlto testcase missed in 159a9f7e76307734bcdcae3357640e42e0733194

2020-03-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-26T10:28:54+01:00 New Revision: 4bd1d55884aaeb582aa8f313e45823fe0f60b32d URL: https://github.com/llvm/llvm-project/commit/4bd1d55884aaeb582aa8f313e45823fe0f60b32d DIFF: https://github.com/llvm/llvm-project/commit/4bd1d55884aaeb582aa8f313e45823fe0f60b32d.diff LO

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:396 + /// yes was the value obtained or not. + mutable Optional> KernelZeroSizePtrValue; + Which one is referred to the lazy initialization? The inner or the outer? T

[PATCH] D76062: [PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support

2020-03-26 Thread Ties Stuij via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG71ae267d1f41: [PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support (authored by stuij). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76062/new/ http

[PATCH] D69585: PerformPendingInstatiations() already in the PCH

2020-03-26 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. In D69585#1942431 , @rsmith wrote: > This needs to be done behind a flag. It's an explicit design goal that > compilation behavior using a PCH or precompiled preamble behaves identically > to compilation not using a PCH / precompi

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1687 + if (ArgValKnown) { +if (!KernelZeroSizePtrValue) + KernelZeroSizePtrValue = martong wrote: > This is a bit confusing for me. Perhaps alternatively we c

[PATCH] D76831: [AST] Preserve the DeclRefExpr when it refers to an invalid decl.

2020-03-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: sammccall, adamcz. Herald added a project: clang. Previously, clang refused to build the AST nodes for them. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76831 Files: clang/lib/AST/ComputeDependence.cpp clang/lib/Sema

[clang-tools-extra] 297a9da - [CodeComplete] Don't replace the rest of line in #include completion.

2020-03-26 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-03-26T11:03:04+01:00 New Revision: 297a9dac43f31cdbc811de5ec63ad20812433f98 URL: https://github.com/llvm/llvm-project/commit/297a9dac43f31cdbc811de5ec63ad20812433f98 DIFF: https://github.com/llvm/llvm-project/commit/297a9dac43f31cdbc811de5ec63ad20812433f98.diff LO

[clang-tools-extra] 7055cd4 - Remove extra ';', NFC

2020-03-26 Thread Karl-Johan Karlsson via cfe-commits
Author: Karl-Johan Karlsson Date: 2020-03-26T11:23:59+01:00 New Revision: 7055cd42b5ffc88757eb3d12192047abe63a3714 URL: https://github.com/llvm/llvm-project/commit/7055cd42b5ffc88757eb3d12192047abe63a3714 DIFF: https://github.com/llvm/llvm-project/commit/7055cd42b5ffc88757eb3d12192047abe63a3714

[clang] a945037 - Tools emit the bug report URL on crash

2020-03-26 Thread via cfe-commits
Author: gbreynoo Date: 2020-03-26T10:26:59Z New Revision: a945037e8fd0c30e250a62211469eea6765a36ae URL: https://github.com/llvm/llvm-project/commit/a945037e8fd0c30e250a62211469eea6765a36ae DIFF: https://github.com/llvm/llvm-project/commit/a945037e8fd0c30e250a62211469eea6765a36ae.diff LOG: Tool

[PATCH] D74324: Tools emit the bug report URL on crash

2020-03-26 Thread Owen Reynolds via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa945037e8fd0: Tools emit the bug report URL on crash (authored by gbreynoo). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAS

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 2 inline comments as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:396 + /// yes was the value obtained or not. + mutable Optional> KernelZeroSizePtrValue; + martong wrote: > Which one is r

[PATCH] D76770: [CodeComplete] Don't replace the rest of line in #include completion.

2020-03-26 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG297a9dac43f3: [CodeComplete] Don't replace the rest of line in #include completion. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76770

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1687 + if (ArgValKnown) { +if (!KernelZeroSizePtrValue) + KernelZeroSizePtrValue = balazske wrote: > martong wrote: > > martong wrote: > > > This is a bit con

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:396 + /// yes was the value obtained or not. + mutable Optional> KernelZeroSizePtrValue; + balazske wrote: > martong wrote: > > Which one is referred to the lazy init

[PATCH] D75951: Keep a list of already-included pragma-once files for mods.

2020-03-26 Thread Vy Nguyen via Phabricator via cfe-commits
oontvoo updated this revision to Diff 252791. oontvoo added a comment. Handle includes/import from outer mods Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75951/new/ https://reviews.llvm.org/D75951 Files: clang/include/clang/Lex/HeaderSearch.h

[clang] 38798d0 - Revert "[AST] Fix thinlto testcase missed in 159a9f7e76307734bcdcae3357640e42e0733194"

2020-03-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-26T12:38:33+01:00 New Revision: 38798d03061ad400e0b900288cb9613907b2011a URL: https://github.com/llvm/llvm-project/commit/38798d03061ad400e0b900288cb9613907b2011a DIFF: https://github.com/llvm/llvm-project/commit/38798d03061ad400e0b900288cb9613907b2011a.diff LO

[clang] 13dc21e - [AST] Make thinlto testcase robust to 159a9f7e76307734bcdcae3357640e42e0733194

2020-03-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-26T12:47:39+01:00 New Revision: 13dc21e84168b73c0157fd909ba7f130f06ae0f5 URL: https://github.com/llvm/llvm-project/commit/13dc21e84168b73c0157fd909ba7f130f06ae0f5 DIFF: https://github.com/llvm/llvm-project/commit/13dc21e84168b73c0157fd909ba7f130f06ae0f5.diff LO

[PATCH] D73649: [CodeComplete] Member completion for concept-constrained types.

2020-03-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang/include/clang/Sema/Scope.h:323 /// declared in. - bool isDeclScope(Decl *D) { -return DeclsInScope.count(D) != 0; - } + bool isDeclScope(const Decl *D) { return DeclsInScope.count(D) != 0; } also mark

[PATCH] D75286: [clangd] Handle clang-tidy suppression comments for diagnostics inside macro expansions

2020-03-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Sorry for taking a while to come back to this again. A bit chaotic right now :-) Looks good, some further simplification possible. Comment at: clang-tools-extra/clang-

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:396 + /// yes was the value obtained or not. + mutable Optional> KernelZeroSizePtrValue; + martong wrote: > balazske wrote

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 252804. balazske added a comment. Improved documentation and handling of `KernelZeroSizePtrValue`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76830/new/ https://reviews.llvm.org/D76830 Files: clang/lib/S

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:12 +// WINDOWS: define dso_local void @"?test1@@YAXU?$ocl_pipe@H$00@__clang@@@Z" +// UNMANGLED: define {{.*}}void @test1( +} Anastasia wrote: > erichkeane wrote: > > Anas

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:12 +// WINDOWS: define dso_local void @"?test1@@YAXU?$ocl_pipe@H$00@__clang@@@Z" +// UNMANGLED: define {{.*}}void @test1( +} erichkeane wrote: > Anastasia wrote: > > eric

[PATCH] D76663: [clangd] Support new semanticTokens request from LSP 3.16.

2020-03-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D76663#1942273 , @sammccall wrote: > For some context here, I was doing some digging as Heyward Fann is looking at > hooking up our existing syntax highlighting to coc.nvim, and he and Jack Guo > (of jackguo380/vim-lsp-cxx-high

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-26 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm accepted this revision. arsenm added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/CodeGenCUDA/amdgpu-workgroup-size.cu:2 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \ +// RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \ +/

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-26 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 252828. hliao added a comment. Rebase to the master code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76365/new/ https://reviews.llvm.org/D76365 Files: clang/include/clang/AST/Type.h clang/include/clang/Bas

[PATCH] D76546: [Hexagon] MaxAtomicPromoteWidth, MaxAtomicInlineWidth are not getting set.

2020-03-26 Thread Brian Cain via Phabricator via cfe-commits
bcain accepted this revision. bcain 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/D76546/new/ https://reviews.llvm.org/D76546 ___ c

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. Herald added a subscriber: rnkovacs. LGTM! Comment at: clang/test/Analysis/kmalloc-linux-1.c:15 + +// FIXME: malloc checker expects kfree with 2 arguments, is this correct?

[PATCH] D76696: [AST] Build recovery expressions by default for C++.

2020-03-26 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. We found an odd case in our downstream fork after this patch landed. We have a diagnostic in `CheckVariableDeclarationType` that checks for automatic variables that are too large for the stack address space, and it chokes on the testcase `Parser/objcxx11-invalid-lambda.

[PATCH] D74054: [clangd] Include the underlying decls in go-to-definition.

2020-03-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Sorry about being late coming back to this. Comment at: clang-tools-extra/clangd/XRefs.cpp:307 +// alias. +if (llvm::isa(D)) { + llvm::for_each(targetDecl(ast_type_traits::DynTypedNode::create(*D), I believe this is going

[PATCH] D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107)

2020-03-26 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76850/new/ https://reviews.llvm.org/D76850 ___ cfe-commits mailing li

[PATCH] D76725: [clangd] Build ASTs only with fresh preambles or after building a new preamble

2020-03-26 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 252841. kadircet added a comment. - Invalidate cached AST in case of preamble/input changes when building golden ASTs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76725/new/ https://reviews.llvm.org/D76725

[PATCH] D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107)

2020-03-26 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. hans added reviewers: sammccall, MyDeveloperDay, thakis. MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM This fixes a regression from D69573 which broke the

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-03-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Could the default be `Style.IndentExternBlock = Style.BraceWrapping.AfterExternBlock` Then it would match the prior behaviour off AddLevel being `true` when AfterExternBlock is `true` extern "C" { int a; } extern "C" { int a; } CHANGES SINC

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-03-26 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D74183#1941741 , @efriedma wrote: > If it's just tramp3d-v4, I'm not that concerned... but that's a weird result. > On x86 in particular, alignment markings have almost no effect on > optimization, generally. I've just looked

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Yeah, if emitting alignment assumptions in inlining is causing regressions when frontends provide better information, those assumptions need to be reverted until they can be fixed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D74183: [IRGen] Add an alignment attribute to underaligned sret parameters

2020-03-26 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added subscribers: hfinkel, jdoerfert. efriedma added a comment. That makes sense. I would slightly lean towards not generating the assumptions, given the current state of assumptions and the likely benefit in this context. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[clang] 0cff81c - Add a release note for attribute plugins

2020-03-26 Thread John Brawn via cfe-commits
Author: John Brawn Date: 2020-03-26T15:01:57Z New Revision: 0cff81cff05d8e0a24391e3dec5b97174351ea55 URL: https://github.com/llvm/llvm-project/commit/0cff81cff05d8e0a24391e3dec5b97174351ea55 DIFF: https://github.com/llvm/llvm-project/commit/0cff81cff05d8e0a24391e3dec5b97174351ea55.diff LOG: Ad

[PATCH] D76197: clang-format: Use block indentation for braced initializations

2020-03-26 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. > New implementation that breaks fewer tests. `fewer` is not an option, `no` is all thats going to get accepted. Please add tests for you own use case CHANGES SINCE

[PATCH] D76724: Prevent immediate evaluations inside of decltype

2020-03-26 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders abandoned this revision. wchilders added a comment. Thanks Tyker, you're right, there is a general problem that needs handled, if this is to be handled; I had a bit of tunnel vision here. However, I'm retracting/abandoning this patch entirely as upon further review, it's not standard

[PATCH] D76818: [clang-tidy] Add check llvmlibc-implementation-in-namespace.

2020-03-26 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. If you want to make it a general check, you should consider making the default module options set the correct namespace RequiredNamespace ClangTidyOptions getModuleOptions() override { ClangTidyOptions Options; Options.CheckOptions["llvmlibc-implementation-in

[PATCH] D75677: [Analyzer] Only add iterator note tags to the operations of the affected iterators

2020-03-26 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:541-542 +BR.markInteresting(It1); +if (const auto &LCV1 = It1.getAs()) { + BR.markInteresting

[PATCH] D76696: [AST] Build recovery expressions by default for C++.

2020-03-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D76696#1943657 , @ebevhan wrote: > However, this just means that `baz` has a very odd type; it's a variable of > closure type that contains a dependent member that will never be resolved. > Our diagnostic breaks, since the v

[clang] 2aac0c4 - Reland "[analyzer][NFC] Tie CheckerRegistry to CheckerManager, allow CheckerManager to be constructed for non-analysis purposes"

2020-03-26 Thread Kirstóf Umann via cfe-commits
Author: Kristóf Umann Date: 2020-03-26T16:12:38+01:00 New Revision: 2aac0c47aed8d1eff7ab6d858173c532b881d948 URL: https://github.com/llvm/llvm-project/commit/2aac0c47aed8d1eff7ab6d858173c532b881d948 DIFF: https://github.com/llvm/llvm-project/commit/2aac0c47aed8d1eff7ab6d858173c532b881d948.diff

[clang] 62dea6e - Revert "[AST] Build recovery expressions by default for C++."

2020-03-26 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-03-26T16:25:32+01:00 New Revision: 62dea6e9be31b100962f9ad41c1b79467a53f6cd URL: https://github.com/llvm/llvm-project/commit/62dea6e9be31b100962f9ad41c1b79467a53f6cd DIFF: https://github.com/llvm/llvm-project/commit/62dea6e9be31b100962f9ad41c1b79467a53f6cd.diff LO

[PATCH] D75360: [analyzer][NFC] Tie CheckerRegistry to CheckerManager, allow CheckerManager to be constructed for non-analysis purposes

2020-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Tried to recommit -- I'll keep a close eye on this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75360/new/ https://reviews.llvm.org/D75360 ___ cfe-commits mailing list cfe-

[PATCH] D31343: Add an attribute plugin example

2020-03-26 Thread John Brawn via Phabricator via cfe-commits
john.brawn added a comment. Release note added: https://reviews.llvm.org/rG0cff81cff05d Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31343/new/ https://reviews.llvm.org/D31343 ___ cfe-commits mailing

[PATCH] D76197: clang-format: Use block indentation for braced initializations

2020-03-26 Thread Daan De Meyer via Phabricator via cfe-commits
DaanDeMeyer added a comment. Of course, if there's interest in adding this I'll fix all the tests but I wanted to make sure there was interest in adding this since it changes clang-format's behavior. Can you confirm that this change in behavior is a good thing and might be merged if I fix all t

[PATCH] D75677: [Analyzer] Only add iterator note tags to the operations of the affected iterators

2020-03-26 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:541-542 +BR.markInteresting(It1); +if (const auto &LCV1 = It1.getAs()) { + BR.markInteresting

[PATCH] D76696: [AST] Build recovery expressions by default for C++.

2020-03-26 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the test case. Reverted in https://github.com/llvm/llvm-project/commit/62dea6e9be31b100962f9ad41c1b79467a53f6cd for now. Adding the error-bit to type looks like a right direction. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revi

[PATCH] D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107)

2020-03-26 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. I think this is an improvement. Accepting with a nit. Thank you! Comment at: clang/lib/Format/TokenAnnotator.cpp:2806 + if (Previous->is(tok::identifier) || Previous->isSimpleTypeSpecifier()) { +Previous =

[PATCH] D76850: clang-format: Fix pointer alignment for overloaded operators (PR45107)

2020-03-26 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @MyDeveloperDay : sorry, I must have not refreshed this page and didn't realize you already gave an LGTM until I posted the comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76850/new/ https://reviews.llvm.org/D76850 ___

[PATCH] D74144: [OPENMP50]Add basic support for array-shaping operation.

2020-03-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 252859. ABataev added a comment. Rebase + fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74144/new/ https://reviews.llvm.org/D74144 Files: clang/include/clang-c/Index.h clang/include/clang/AST/ASTCon

[PATCH] D75360: [analyzer][NFC] Tie CheckerRegistry to CheckerManager, allow CheckerManager to be constructed for non-analysis purposes

2020-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2aac0c47aed8: Reland "[analyzer][NFC] Tie CheckerRegistry to CheckerManager, allow… (authored by Szelethus). Changed prior to commit: https://reviews.llvm.org/D75360?vs=252073&id=252861#toc Repository:

[clang] 0766d1d - Make a windows buildbot happy

2020-03-26 Thread Kirstóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-03-26T17:04:23+01:00 New Revision: 0766d1dca8685e77e8672b13f26797a5d4c8b4d7 URL: https://github.com/llvm/llvm-project/commit/0766d1dca8685e77e8672b13f26797a5d4c8b4d7 DIFF: https://github.com/llvm/llvm-project/commit/0766d1dca8685e77e8672b13f26797a5d4c8b4d7.diff

[PATCH] D75677: [Analyzer] Only add iterator note tags to the operations of the affected iterators

2020-03-26 Thread Balogh, Ádám via Phabricator via cfe-commits
baloghadamsoftware marked an inline comment as done. baloghadamsoftware added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/IteratorModeling.cpp:541-542 +BR.markInteresting(It1); +if (const auto &LCV1 = It1.getAs()) { + BR.markInteresting

[PATCH] D74144: [OPENMP50]Add basic support for array-shaping operation.

2020-03-26 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74144/new/ https://reviews.llvm.org/D74144 __

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. In D76830#1943133 , @balazske wrote: > FIXME: There is a test file "kmalloc-linux.c" but it seems to be > non-maintained and buggy (has no //-verify// option so it passes always but > produces multiple warnings). Crap, even I

[PATCH] D76856: Fix TBAA for unsigned fixed-point types

2020-03-26 Thread mattias.v.eriks...@ericsson.com via Phabricator via cfe-commits
materi created this revision. materi added reviewers: ebevhan, leonardchan. Herald added a subscriber: kosarev. Herald added a project: clang. Unsigned types can alias the corresponding signed types. I don't see that this is explicitly mentioned in the Embedded-C specification, but I think it shou

[PATCH] D76140: [InlineFunction] update attributes during inlining

2020-03-26 Thread Anna Thomas via Phabricator via cfe-commits
anna updated this revision to Diff 252868. anna added a comment. NFC w.r.t prev diff. Use VMap.lookup instead of a lambda which does the same. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76140/new/ https://reviews.llvm.org/D76140 Files: clang/

[PATCH] D76696: [AST] Build recovery expressions by default for C++.

2020-03-26 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. We have also encountered crashes in downstream testing caused by this using just the vanilla source from trunk. When there is a proposed fix, please let us know so we can test. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked an inline comment as done. balazske added inline comments. Comment at: clang/test/Analysis/kmalloc-linux-1.c:15 + +// FIXME: malloc checker expects kfree with 2 arguments, is this correct? +// (recent kernel source code contains a `kfree(const void *)`) --

[clang] 40076c1 - CUDA: Fix broken test run lines

2020-03-26 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2020-03-26T12:19:34-04:00 New Revision: 40076c14fef509d0304cbdad49ba64113f4816fd URL: https://github.com/llvm/llvm-project/commit/40076c14fef509d0304cbdad49ba64113f4816fd DIFF: https://github.com/llvm/llvm-project/commit/40076c14fef509d0304cbdad49ba64113f4816fd.diff

[clang] 4dc8472 - [analyzer] Add the Preprocessor to CheckerManager

2020-03-26 Thread Kirstóf Umann via cfe-commits
Author: Kirstóf Umann Date: 2020-03-26T17:29:52+01:00 New Revision: 4dc8472942ce60f29de9587b9451cc3d49df7abf URL: https://github.com/llvm/llvm-project/commit/4dc8472942ce60f29de9587b9451cc3d49df7abf DIFF: https://github.com/llvm/llvm-project/commit/4dc8472942ce60f29de9587b9451cc3d49df7abf.diff

[PATCH] D76862: HIP: Ensure new denormal mode attributes are set

2020-03-26 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, gregrodgers. Herald added subscribers: kerbowa, tpr, nhaehnle, wdng, jvesely. Apparently HIPToolChain does not subclass from AMDGPUToolChain, so this was not applying the new denormal attributes. I'm not sure why this doesn't subclass.

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/test/Analysis/kmalloc-linux-1.c:15 + +// FIXME: malloc checker expects kfree with 2 arguments, is this correct? +// (recent kernel source code contains a `kfree(const void *)`) balazske wrote: > Szelethus wrote:

[PATCH] D76830: [Analyzer][MallocChecker] No warning for kfree of ZERO_SIZE_PTR.

2020-03-26 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp:1687 + if (ArgValKnown) { +if (!KernelZeroSizePtrValue) + KernelZeroSizePtrValue = Szelethus wrote: > martong wrote: > > balazske wrote: > > > martong wrote

[PATCH] D76416: [WIP][ASan] Apply -ffile-prefix-map mappings to ASan instrumentation

2020-03-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. > Putting this on hold for now. Although this implementation works for ASan, it > would be have to be repeated for other tools like SourceBasedCoverage or > other sanitizers. (You can click "Add Action..."->"Plan Changes" so that this Differential will disappear from o

[PATCH] D76725: [clangd] Build ASTs only with fresh preambles or after building a new preamble

2020-03-26 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/TUScheduler.cpp:8 //===--===// // For each file, managed by TUScheduler, we create a single ASTWorker that +// manages an AST and a preambl

[PATCH] D74934: [Clang interpreter] Rename Block.{h,cpp} to InterpBlock.{h,cpp}

2020-03-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. @gribozavr2 - hey, an annoying quirk of Phabricator is that it doesn't send mail to the mailing list on state changes with no text, which means reviews like these look like tehy were committed without approval (on the mailing list there's no record of the approval). In

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-26 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM. Next step is to figure out what various __nv_tex_surf_handler(...) maps to for various strings (there are ~110 of them in CUDA-10.2) and implement its replacement. I think we should be able t

[PATCH] D74324: Tools emit the bug report URL on crash

2020-03-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Support/PrettyStackTrace.cpp:145 +static const char* customBugReportMsg; + jhenderson wrote: > jhenderson wrote: > > `static const char *BugReportMsg;` > > > > Why not just have this set to the default in the

[PATCH] D76360: [PPC][AIX] Emit correct Vaarg for 32BIT-AIX in clang

2020-03-26 Thread Jason Liu via Phabricator via cfe-commits
jasonliu added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4205 -CharUnits PPC32_SVR4_ABIInfo::getParamTypeAlignment(QualType Ty) const { +CharUnits PowerPC32ABIInfo::getParamTypeAlignment(QualType Ty) const { // Complex types are passed just like their ele

[clang] 47e7bdb - Test that would have caught recovery-expr crashes in 0788acbccbec. NFC

2020-03-26 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-26T18:43:29+01:00 New Revision: 47e7bdb10732e6f140adce39a1bc34e3ee2a6ea6 URL: https://github.com/llvm/llvm-project/commit/47e7bdb10732e6f140adce39a1bc34e3ee2a6ea6 DIFF: https://github.com/llvm/llvm-project/commit/47e7bdb10732e6f140adce39a1bc34e3ee2a6ea6.diff LO

[PATCH] D76772: [AMDGPU] Add __builtin_amdgcn_workgroup_size_x/y/z

2020-03-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-workgroup-size.cu:2 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa \ +// RUN: -fcuda-is-device -emit-llvm -o - -x hip %s \ +// RUN: | FileCheck %s -

[PATCH] D74324: Tools emit the bug report URL on crash

2020-03-26 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Support/PrettyStackTrace.cpp:145 +static const char* customBugReportMsg; + MaskRay wrote: > jhenderson wrote: > > jhenderson wrote: > > > `static const char *BugReportMsg;` > > > > > > Why not just have this

  1   2   >