[PATCH] D54222: [clang-tidy] Add a check to detect returning static locals in public headers

2020-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/bugprone-problematic-statics.rst:7-8 +Detects functions defined in headers that return the address of a static +local variable. These are not guaranteed to have the same addresss across +shared

[PATCH] D87962: [clang] Change the multi-character character constants from extension to implementation-defined.

2020-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D87962#2306043 , @aaron.ballman wrote: > That doesn't sound like the right approach to me -- Remarks are usually for > reporting backend decision-making to the frontend for things like > optimization passes. To be clear:

[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl

2020-10-01 Thread Luboš Luňák via Phabricator via cfe-commits
llunak added a comment. > I tried pretty hard to get a small repro for these failures, but couldn't. Can you get at least some testcase, even if not small? You can use -E -frewrite-includes to create a single large file from all the input. Although the patch looks fine to me as such, I

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2020-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks great, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63640/new/ https://reviews.llvm.org/D63640

[PATCH] D75574: RFC: Implement objc_direct_protocol attribute to remove protocol metadata

2020-10-01 Thread Nathan Lanza via Phabricator via cfe-commits
lanza requested review of this revision. lanza marked an inline comment as done. lanza added inline comments. Comment at: clang/lib/CodeGen/CGObjC.cpp:490 + llvm::UniqueVector FoundProtocols; + std::set DeclaredProtocols; + rjmccall wrote: > You should use

[PATCH] D75574: RFC: Implement objc_direct_protocol attribute to remove protocol metadata

2020-10-01 Thread Nathan Lanza via Phabricator via cfe-commits
lanza updated this revision to Diff 295729. lanza added a comment. Update with John's suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75574/new/ https://reviews.llvm.org/D75574 Files: clang/include/clang/AST/DeclObjC.h

[PATCH] D85528: [analyzer] Fix cast evaluation on scoped enums in ExprEngine

2020-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Aha, ok, thanks, I now understand what the problem is because I was able to run the test before the patch and see how the patch changes the behavior. What do you think about flattening the enum type out entirely? I.e., instead of `(unsigned char) conj_$2{enum

[PATCH] D88477: [analyzer] Overwrite cast type in getBinding only if that was null originally

2020-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > A value of an expression should have the same type and value-kind as the > expression. F13121967: roflbot.jpg Unfortunately i'm pretty worried about our ability to actually achieve that in the near future; as of now we don't even

[PATCH] D88477: [analyzer] Overwrite cast type in getBinding only if that was null originally

2020-10-01 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. No, you got it all wrong again. I don't want to explain this one more time so let's talk about some basics: //A value of an expression should have the same type and value-kind as the expression//. Can we get there? How? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D88278: [PowerPC] Add builtins for xvtdiv(dp|sp) and xvtsqrt(dp|sp).

2020-10-01 Thread EsmeYi via Phabricator via cfe-commits
Esme added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCInstrVSX.td:2584 +// Vector test software functions. +def : Pat<(i32 (int_ppc_vsx_xvtdivdp v2f64:$A, v2f64:$B)), steven.zhang wrote: > Vector test for software divide and sqrt I'll update it

[PATCH] D88278: [PowerPC] Add builtins for xvtdiv(dp|sp) and xvtsqrt(dp|sp).

2020-10-01 Thread EsmeYi via Phabricator via cfe-commits
Esme added a comment. In D88278#2306618 , @amyk wrote: > Overall I think this LGTM. > > Please correct me if I am wrong but I think the description of the functions > need to be updated to: > > int vec_test_swdiv(vector double v1, vector double v2); >

[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl

2020-10-01 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 added a comment. In D88680#2307564 , @rnk wrote: > I think the flag was originally intended to be an internal -cc1 flag not > exposed to users. You should be able to work around your problem with > `-Xclang -fno-pch-instantiate-templates`,

[PATCH] D88393: [cfe][M68K] (Patch 7/8) Basic Clang support

2020-10-01 Thread Min-Yih Hsu via Phabricator via cfe-commits
myhsu updated this revision to Diff 295706. myhsu added a comment. Update licenses CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88393/new/ https://reviews.llvm.org/D88393 Files: clang/include/clang/Basic/Attr.td clang/lib/Basic/CMakeLists.txt clang/lib/Basic/Targets.cpp

[PATCH] D72241: [clang-tidy] new altera single work item barrier check

2020-10-01 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies updated this revision to Diff 295698. ffrankies removed a project: clang. ffrankies added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. - Rebased code and fixed merge conflicts with D66564 - Added

[PATCH] D72218: [clang-tidy] new altera kernel name restriction check

2020-10-01 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies updated this revision to Diff 295697. ffrankies removed a project: LLVM. ffrankies added a comment. Herald added a project: LLVM. Addressed changes requested by @Eugene.Zelenko and @aaron.ballman CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72218/new/

[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl

2020-10-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: zequanwu. rnk added a comment. I think the flag was originally intended to be an internal -cc1 flag not exposed to users. You should be able to work around your problem with `-Xclang -fno-pch-instantiate-templates`, btw. @zequanwu, can you patch this in locally

[PATCH] D88665: [ASTImporter][AST] Fix structural equivalency crash on dependent FieldDecl

2020-10-01 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. So was the bug we were saying there were falsely equivalent or falsely not equivalent? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88665/new/ https://reviews.llvm.org/D88665

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 295696. MaskRay added a comment. Improve tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88712/new/ https://reviews.llvm.org/D88712 Files: clang/lib/CodeGen/CGBuiltin.cpp

[PATCH] D88712: [CGBuiltin] Respect asm labels and redefine_extname for builtins with specialized emitting

2020-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: joerg, jyknight, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. MaskRay requested review of this revision. rL131311 added `asm()` support for builtin functions, but `asm()`

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

2020-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D74144#2307454 , @cchen wrote: > @ABataev, the below test is extracted from Sollve test suite and Clang now > emit: > > test.c:17:35: error: subscripted value is not an array or pointer > #pragma omp target update

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

2020-10-01 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. Herald added subscribers: sstefan1, yaxunl. @ABataev, the below test is extracted from Sollve test suite and Clang now emit: test.c:17:35: error: subscripted value is not an array or pointer #pragma omp target update to( (([N][N])foo)[1:M] )

[PATCH] D88338: [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Hongtao Yu via Phabricator via cfe-commits
hoy added inline comments. Comment at: clang-tools-extra/clangd/tool/Check.cpp:243 + size_t N = 50; + auto xxx = std::string(N, 'x'); +)cpp"; Hi, I'm seeing an error with this "tweak: ExpandAutoType ==> FAIL: Could not deduce type for 'auto'

[PATCH] D88338: [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang-tools-extra/clangd/test/check.test:1 +# RUN: clangd -log=verbose -check 2>&1 | FileCheck -strict-whitespace %s + This test implicitly parses a source file that `#include`s standard library headers, and fails if

[PATCH] D88345: [CUDA] Allow local `static const {__constant__, __device__}` variables.

2020-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I've verified that clang with this patch can compile Tensorflow and that it can also compile `cooperative_groups.h` from CUDA-11. Comment at: clang/test/SemaCUDA/device-var-init.cu:404 __host__ __device__ void hd_sema() { static int x = 42; }

[libclc] 1c1a810 - libclc: Use find_package to find Python 3 and require it

2020-10-01 Thread Aaron Puchert via cfe-commits
Author: Aaron Puchert Date: 2020-10-01T22:31:33+02:00 New Revision: 1c1a8105580784c96212db1afc097a844740bc69 URL: https://github.com/llvm/llvm-project/commit/1c1a8105580784c96212db1afc097a844740bc69 DIFF: https://github.com/llvm/llvm-project/commit/1c1a8105580784c96212db1afc097a844740bc69.diff

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Basic/Cuda.cpp:95 const char *CudaArchToString(CudaArch A) { + if (A == CudaArch::UNUSED) +return ""; tra wrote: > You could add a `{CudaArch::UNUSED, "", ""}` to

[PATCH] D88603: [WebAssembly] Add support for DWARF type units

2020-10-01 Thread Wouter van Oortmerssen via Phabricator via cfe-commits
aardappel added inline comments. Comment at: llvm/test/DebugInfo/WebAssembly/dwarf-headers.ll:47 +; +; SINGLE-4: .debug_types contents: +; SINGLE-4: 0x: Type Unit: {{.*}} version = 0x0004, abbr_offset I guess this doesn't actually test that only one copy

[PATCH] D88526: [clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast

2020-10-01 Thread Hubert Tong via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG35ecc7fe49ba: [clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast (authored by hubert.reinterpretcast). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 35ecc7f - [clang][Sema] Fix PR47676: Handle dependent AltiVec C-style cast

2020-10-01 Thread Hubert Tong via cfe-commits
Author: Hubert Tong Date: 2020-10-01T15:57:01-04:00 New Revision: 35ecc7fe49ba881a77e8146b51870a60a52b211f URL: https://github.com/llvm/llvm-project/commit/35ecc7fe49ba881a77e8146b51870a60a52b211f DIFF: https://github.com/llvm/llvm-project/commit/35ecc7fe49ba881a77e8146b51870a60a52b211f.diff

[PATCH] D88345: [CUDA] Allow local `static const {__constant__, __device__}` variables.

2020-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/SemaCUDA/device-var-init.cu:404 __host__ __device__ void hd_sema() { static int x = 42; } how does this work in device compilation? Is this equivalent to `static __device__ int x = 42`? Repository:

[clang] de47e71 - [CMake][Fuchsia] Don't set WIN32 API, rely on autodetection

2020-10-01 Thread Petr Hosek via cfe-commits
Author: Petr Hosek Date: 2020-10-01T12:35:52-07:00 New Revision: de47e7122f69d56399c4f8864ba279e5ce635970 URL: https://github.com/llvm/llvm-project/commit/de47e7122f69d56399c4f8864ba279e5ce635970 DIFF: https://github.com/llvm/llvm-project/commit/de47e7122f69d56399c4f8864ba279e5ce635970.diff

[PATCH] D88694: [CMake][Fuchsia] Don't set WIN32 API, rely on autodetection

2020-10-01 Thread Petr Hosek 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 rGde47e7122f69: [CMake][Fuchsia] Dont set WIN32 API, rely on autodetection (authored by phosek). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D87989: [Flang][Driver] Add infrastructure for basic frontend actions and file I/O

2020-10-01 Thread Andrzej Warzynski via Phabricator via cfe-commits
awarzynski added a comment. @CarolineConcatto thank you again for working on this! The structure is good, but IMHO this patch could be polished a bit more. Overall: - could you make sure that this patch does not change the output from `clang -help`? - doxygen comments are consistent -

[PATCH] D88694: [CMake][Fuchsia] Don't set WIN32 API, rely on autodetection

2020-10-01 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: leonardchan. Herald added subscribers: cfe-commits, mgorny. Herald added a project: clang. phosek requested review of this revision. We prefer autodetection here to avoid persisting this configuration in the generated __config header which is

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C

2020-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:33 + + for (const FunctionDecl *D : Node.redecls()) +if (D->getASTContext().getSourceManager().isInSystemHeader( I'm not certain I understand why we're

[PATCH] D88238: [APFloat] convert SNaN to QNaN in convert() and raise Invalid signal

2020-10-01 Thread Sanjay Patel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG149f5b573c79: [APFloat] convert SNaN to QNaN in convert() and raise Invalid signal (authored by spatel). Herald added subscribers: cfe-commits, jrtc27. Herald added a project: clang. Repository: rG

[clang] 149f5b5 - [APFloat] convert SNaN to QNaN in convert() and raise Invalid signal

2020-10-01 Thread Sanjay Patel via cfe-commits
Author: Sanjay Patel Date: 2020-10-01T14:37:38-04:00 New Revision: 149f5b573c79eac0c519ada4d2f7c50e17796cdf URL: https://github.com/llvm/llvm-project/commit/149f5b573c79eac0c519ada4d2f7c50e17796cdf DIFF: https://github.com/llvm/llvm-project/commit/149f5b573c79eac0c519ada4d2f7c50e17796cdf.diff

[PATCH] D88345: [CUDA] Allow local `static const {__constant__, __device__}` variables.

2020-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 295636. tra added a comment. Herald added a reviewer: jdoerfert. Fixed a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88345/new/ https://reviews.llvm.org/D88345 Files:

[PATCH] D88345: [CUDA] Allow local `static const {__constant__, __device__}` variables.

2020-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 295635. tra retitled this revision from "[CUDA] Allow local `static {__constant__, __device__}` variables." to "[CUDA] Allow local `static const {__constant__, __device__}` variables.". tra edited the summary of this revision. tra added a comment. Herald added a

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-10-01 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D77062#2305856 , @ASDenysPetrov wrote: > @steakhal > >> @ASDenysPetrov Do you still want to rework the API of the `assumeZero`? > > This patch more looks like NFC, being just refactored. Fine. > Actually I see that if we

[PATCH] D88477: [analyzer] Overwrite cast type in getBinding only if that was null originally

2020-10-01 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D88477#2304708 , @NoQ wrote: > I'm trying to say that the value produced by the load should not be the same > as the stored value, because these two values are of different types. When > exactly does the first value change

[clang] c1b209c - [Format] Don't treat compound extension headers (foo.proto.h) as foo.cc main-file header.

2020-10-01 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2020-10-01T19:57:57+02:00 New Revision: c1b209cc61290f1ce1243470b825e0994645cb7d URL: https://github.com/llvm/llvm-project/commit/c1b209cc61290f1ce1243470b825e0994645cb7d DIFF: https://github.com/llvm/llvm-project/commit/c1b209cc61290f1ce1243470b825e0994645cb7d.diff

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2020-10-01 Thread Tyker via Phabricator via cfe-commits
Tyker added inline comments. Comment at: clang/lib/AST/ASTImporter.cpp:9010 + ToPath[Idx] = + cast(const_cast(ImpDecl.get())); +} rsmith wrote: > We want the path in an `APValue` to be canonical, but importing a canonical > decl might result

[PATCH] D63640: [clang] Improve Serialization/Imporing of APValues

2020-10-01 Thread Tyker via Phabricator via cfe-commits
Tyker updated this revision to Diff 295626. Tyker marked 15 inline comments as done. Tyker added a comment. addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63640/new/ https://reviews.llvm.org/D63640 Files:

[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl

2020-10-01 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 added a comment. Note that I do not have commit access and this change will have to be committed by someone else on my behalf. Please use the following commit author details: "Shivan Goyal " Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 686eb0d - [AST] do not error on APFloat invalidOp in default mode

2020-10-01 Thread Sanjay Patel via cfe-commits
Author: Sanjay Patel Date: 2020-10-01T13:46:45-04:00 New Revision: 686eb0d8ded9159b090c3ef7b33a422e1f05166e URL: https://github.com/llvm/llvm-project/commit/686eb0d8ded9159b090c3ef7b33a422e1f05166e DIFF: https://github.com/llvm/llvm-project/commit/686eb0d8ded9159b090c3ef7b33a422e1f05166e.diff

[PATCH] D88664: [AST] do not error on APFloat invalidOp in default mode

2020-10-01 Thread Sanjay Patel via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG686eb0d8ded9: [AST] do not error on APFloat invalidOp in default mode (authored by spatel). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88680: Add ability to turn off -fpch-instantiate-templates in clang-cl

2020-10-01 Thread Shivanshu Goyal via Phabricator via cfe-commits
shivanshu3 created this revision. shivanshu3 added reviewers: llunak, rnk, rsmith, hans, zahen. shivanshu3 added a project: clang. Herald added subscribers: cfe-commits, dang. shivanshu3 requested review of this revision. A lot of our code building with clang-cl.exe using Clang 11 was failing

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Basic/Cuda.cpp:95 const char *CudaArchToString(CudaArch A) { + if (A == CudaArch::UNUSED) +return ""; You could add a

[PATCH] D88278: [PowerPC] Add builtins for xvtdiv(dp|sp) and xvtsqrt(dp|sp).

2020-10-01 Thread Amy Kwan via Phabricator via cfe-commits
amyk accepted this revision as: amyk. amyk added a comment. This revision is now accepted and ready to land. Overall I think this LGTM. Please correct me if I am wrong but I think the description of the functions need to be updated to: int vec_test_swdiv(vector double v1, vector double v2);

[PATCH] D83144: Allow to specify macro names for android-comparison-in-temp-failure-retry.

2020-10-01 Thread George Burgess IV via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9d40fb808fd0: Allow to specify macro names for android-comparison-in-temp-failure-retry (authored by fmayer, committed by george.burgess.iv). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[clang-tools-extra] 9d40fb8 - Allow to specify macro names for android-comparison-in-temp-failure-retry

2020-10-01 Thread George Burgess IV via cfe-commits
Author: Florian Mayer Date: 2020-10-01T10:09:26-07:00 New Revision: 9d40fb808fd0fbd33eb3b50c20d7f402de5db91e URL: https://github.com/llvm/llvm-project/commit/9d40fb808fd0fbd33eb3b50c20d7f402de5db91e DIFF: https://github.com/llvm/llvm-project/commit/9d40fb808fd0fbd33eb3b50c20d7f402de5db91e.diff

[PATCH] D88666: DirectoryWatcher: add an implementation for Windows

2020-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added a comment. @aaron.ballman - I completely agree with you about the testing. The interfaces are tested via https://github.com/llvm/llvm-project/blob/master/clang/unittests/DirectoryWatcher/CMakeLists.txt, which now that I look at again, seems to need an additional case for system

[PATCH] D88566: be more specific when testing for no fuse-ld warnings

2020-10-01 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fuse-ld.c:15 // RUN: FileCheck %s --check-prefix=CHECK-NO-WARN -// CHECK-NO-WARN-NOT: warning: +// CHECK-NO-WARN-NOT: warning: 'fuse-ld' How does this line trigger unrelated warnings? Can you dump

[PATCH] D88666: DirectoryWatcher: add an implementation for Windows

2020-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp:87 +DWORD dwLength = GetFinalPathNameByHandleW(hDirectory, NULL, 0, 0); +std::unique_ptr buffer{new WCHAR[dwLength + 1]}; +

[PATCH] D88666: DirectoryWatcher: add an implementation for Windows

2020-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp:95 + CreateEvent(NULL, /*bManualReset=*/TRUE, /*bInitialState=*/FALSE, NULL); + assert(ovlIO.hEvent); + plotfi wrote: > Can this be an assert with

[PATCH] D88666: DirectoryWatcher: add an implementation for Windows

2020-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I wonder if we should unit test this functionality by having some tests that create and remove files that are watched. I'm not 100% convinced that is a great idea, but not having test coverage for the change is also not really a great idea either. Thoughts

[PATCH] D88668: [CUDA] Add support for 11.1

2020-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Generally speaking the default should be conservative. It does us no good if we generate PTX 99.99, but discover that ptxas does not support it. Granted, these days 7.0 is also the wrong default as it's pretty ancient. IMO bumping it to 9.0 and GPU arch to sm_30 would be

[PATCH] D88666: DirectoryWatcher: add an implementation for Windows

2020-10-01 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi added a comment. Overall looks good. Comment at: clang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp:95 + CreateEvent(NULL, /*bManualReset=*/TRUE, /*bInitialState=*/FALSE, NULL); + assert(ovlIO.hEvent); + Can this be an assert with

[PATCH] D88590: [clangd] Add bencmark for measuring latency of DecisionForest model.

2020-10-01 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Also typo in commit description: bencmark Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88590/new/ https://reviews.llvm.org/D88590 ___ cfe-commits mailing list

[PATCH] D88668: [CUDA] Add support for 11.1

2020-10-01 Thread kiwixz via Phabricator via cfe-commits
kiwixz added a comment. In D88668#2306393 , @jlebar wrote: >> It looks like 11.1 doesn't have a version.txt file > > Yikes, this is a problem if we can't tell the difference between CUDA > versions! It looks like a blunder from NVIDIA, CUDA 11.1

[PATCH] D88659: [FE]Split SuitableAlign into two parts

2020-10-01 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. Hm, to start with, the current state of this confuses me. In GCC, the preprocessor macro `__BIGGEST_ALIGNMENT__` was supposed to expose the alignment used by `__attribute__((aligned))` (no arg specified), as well the alignment used for alloca. However, this is no

[PATCH] D88668: [CUDA] Add support for 11.1

2020-10-01 Thread Justin Lebar via Phabricator via cfe-commits
jlebar added a comment. > It looks like 11.1 doesn't have a version.txt file Yikes, this is a problem if we can't tell the difference between CUDA versions! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88668/new/ https://reviews.llvm.org/D88668

[PATCH] D88668: [CUDA] Add support for 11.1

2020-10-01 Thread kiwixz via Phabricator via cfe-commits
kiwixz created this revision. kiwixz added reviewers: jlebar, tra. kiwixz added a project: clang. Herald added subscribers: cfe-commits, yaxunl, jholewinski. kiwixz requested review of this revision. It looks like 11.1 doesn't have a version.txt file, so I changed the default guess in this case

[clang-tools-extra] 45698ac - [clangd] Split DecisionForest Evaluate() into one func per tree.

2020-10-01 Thread Utkarsh Saxena via cfe-commits
Author: Utkarsh Saxena Date: 2020-10-01T18:07:23+02:00 New Revision: 45698ac0052ae5b1c5beb739636396a5b7263966 URL: https://github.com/llvm/llvm-project/commit/45698ac0052ae5b1c5beb739636396a5b7263966 DIFF:

[PATCH] D88536: [clangd] Split DecisionForest Evaluate() into one func per tree.

2020-10-01 Thread Utkarsh Saxena via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG45698ac0052a: [clangd] Split DecisionForest Evaluate() into one func per tree. (authored by usaxena95). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88664: [AST] do not error on APFloat invalidOp in default mode

2020-10-01 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. LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88664/new/ https://reviews.llvm.org/D88664 ___ cfe-commits mailing list

[PATCH] D88590: [clangd] Add bencmark for measuring latency of DecisionForest model.

2020-10-01 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz added a comment. Would it make sense to set random seed to something fixed to make this more reproducible? Comment at: clang-tools-extra/clangd/benchmarks/CompletionModel/DecisionForestBenchmark.cpp:2 +//===--- DecisionForestBenchmark.cpp - Benchmark for code

[PATCH] D88666: DirectoryWatcher: add an implementation for Windows

2020-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: amccarth. Herald added a project: clang. compnerd requested review of this revision. This implements the directory watcher on Windows. It does the most naive thing for simplicity. ReadDirectoryChangesW is used to monitor the changes.

[PATCH] D88665: [ASTImporter][AST] Fix structural equivalency crash on dependent FieldDecl

2020-10-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. The added test causes the below assertion in the baseline (w/o the fix): ASTTests: ../../git/llvm-project/clang/lib/AST/ExprConstant.cpp:14543: llvm::APSInt clang::Expr::EvaluateKnownConstInt(const clang::ASTContext&, llvm::SmallVectorImpl >*) const: Assertion

[PATCH] D88665: [ASTImporter][AST] Fix structural equivalency crash on dependent FieldDecl

2020-10-01 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: balazske, teemperor, shafik, a_sidorin. Herald added subscribers: cfe-commits, gamesh411, Szelethus, dkrupp, rnkovacs. Herald added a reviewer: a.sidorin. Herald added a project: clang. martong requested review of this revision. Repository:

[PATCH] D88664: [AST] do not error on APFloat invalidOp in default mode

2020-10-01 Thread Sanjay Patel via Phabricator via cfe-commits
spatel created this revision. spatel added reviewers: rjmccall, efriedma, sepavloff. Herald added a subscriber: mcrosier. spatel requested review of this revision. If FP exceptions are ignored, we should not error out of compilation just because APFloat indicated an exception. This is required

[PATCH] D88446: docs: add documentation describing API Notes

2020-10-01 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 3 inline comments as done. compnerd added inline comments. Comment at: clang/docs/APINotes.rst:45 +Clang will search for API notes files next to module maps only when passed the +``-fapinotes-modules`` option. + rsmith wrote: > Can we add a

[PATCH] D83088: Introduce CfgTraits abstraction

2020-10-01 Thread Nicolai Hähnle via Phabricator via cfe-commits
nhaehnle added a comment. Herald added a subscriber: tatianashp. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83088/new/ https://reviews.llvm.org/D83088 ___ cfe-commits mailing list

[PATCH] D88314: Added llvm-string-referencing check

2020-10-01 Thread Bogdan Serea via Phabricator via cfe-commits
bogser01 updated this revision to Diff 295580. bogser01 added a comment. Fixed unit test 2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88314/new/ https://reviews.llvm.org/D88314 Files: clang-tools-extra/clang-tidy/add_new_check.py

[clang] 8c36eaf - [clang][opencl][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-10-01 Thread Michael Liao via cfe-commits
Author: Michael Liao Date: 2020-10-01T11:07:39-04:00 New Revision: 8c36eaf0377285acb89c319582d9666e60f42007 URL: https://github.com/llvm/llvm-project/commit/8c36eaf0377285acb89c319582d9666e60f42007 DIFF: https://github.com/llvm/llvm-project/commit/8c36eaf0377285acb89c319582d9666e60f42007.diff

[PATCH] D88424: [clang][codegen] Remove the insertion of `correctly-rounded-divide-sqrt-fp-math` fn-attr.

2020-10-01 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8c36eaf03772: [clang][opencl][codegen] Remove the insertion of `correctly-rounded-divide-sqrt… (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D88659: [FE]Split SuitableAlign into two parts

2020-10-01 Thread Xiangling Liao via Phabricator via cfe-commits
Xiangling_L created this revision. Xiangling_L added reviewers: hubert.reinterpretcast, zarko, Jason, jyknight, efriedma. Herald added subscribers: cfe-commits, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01,

[PATCH] D88491: [ASTContext] Use AllowCXX in all merge*Type methods, strip references

2020-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Do you have test cases for this change? I didn't see any relevant ones in D88384 . Comment at: clang/lib/AST/ASTContext.cpp:9174 bool ASTContext::typesAreBlockPointerCompatible(QualType LHS, QualType RHS) {

[PATCH] D88524: [CUDA][HIP] Fix bound arch for offload action for fat binary

2020-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 295572. yaxunl added a comment. Herald added a subscriber: jholewinski. add CudaArch::UNUSED as suggested by Artem. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88524/new/ https://reviews.llvm.org/D88524 Files: clang/include/clang/Basic/Cuda.h

[PATCH] D87962: [clang] Change the multi-character character constants from extension to implementation-defined.

2020-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. In D87962#2305375 , @nomanous wrote: > In D87962#2298021 , @aaron.ballman > wrote: >

[PATCH] D87962: [clang] Change the multi-character character constants from extension to implementation-defined.

2020-10-01 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Or should we change the four character case to "Remark" so it wouldn't be > warned even with the "-pandemic" option? There seems no other choice. There's a DefaultIgnore modifier for warnings that turns then off by default. We use this sparingly, since it's hard to

[PATCH] D54222: [clang-tidy] Add a check to detect returning static locals in public headers

2020-10-01 Thread Joe Ranieri via Phabricator via cfe-commits
jranieri-grammatech updated this revision to Diff 295563. jranieri-grammatech added a comment. Herald added a project: clang. In D54222#2295374 , @JonasToth wrote: > Do you have data for other projects? As this is not a very common thing and > probably

[clang-tools-extra] f6b1323 - Reland [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-10-01T16:18:18+02:00 New Revision: f6b1323bc680812e04904293854c356530985bcd URL: https://github.com/llvm/llvm-project/commit/f6b1323bc680812e04904293854c356530985bcd DIFF: https://github.com/llvm/llvm-project/commit/f6b1323bc680812e04904293854c356530985bcd.diff

[PATCH] D88338: [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, I think this fails whenever `compile_commands.json` doesn't exist in the tree or under `build`. (Which of course it does in my local checkout...). Reverted, probably need to rename/copy the test file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D88275: [ASTMatchers] Add matcher `hasParentIgnoringImplicit`.

2020-10-01 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D88275#2303283 , @ymandel wrote: >> I'm not concerned about the basic idea behind the proposed matcher, I'm only >> worried we're making AST matching more confusing by having two different >> ways of inconsistently

[clang-tools-extra] 30d07b1 - Revert "[clangd] clangd --check: standalone diagnosis of common problems"

2020-10-01 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-10-01T16:10:03+02:00 New Revision: 30d07b14a274f075a01d201ad59723ca1a4a9b57 URL: https://github.com/llvm/llvm-project/commit/30d07b14a274f075a01d201ad59723ca1a4a9b57 DIFF: https://github.com/llvm/llvm-project/commit/30d07b14a274f075a01d201ad59723ca1a4a9b57.diff

[PATCH] D88566: be more specific when testing for no fuse-ld warnings

2020-10-01 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. (Not that I'm against this, either way sounds fine to me) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88566/new/ https://reviews.llvm.org/D88566 ___ cfe-commits mailing list

[PATCH] D88338: [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Might break tests: http://45.33.8.238/linux/29238/step_9.txt Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88338/new/ https://reviews.llvm.org/D88338 ___ cfe-commits mailing list

[PATCH] D88403: Migrate Declarators to use the List API

2020-10-01 Thread Eduardo Caldas via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5011d43108d1: Migrate Declarators to use the List API (authored by eduucaldas). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88403/new/

[PATCH] D88566: be more specific when testing for no fuse-ld warnings

2020-10-01 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. In the past we have usually disabled the downstream warning for similar catch-all warning lines. Comment at: clang/test/Driver/fuse-ld.c:5 // RUN: FileCheck %s --check-prefix=CHECK-ABSOLUTE-LD // CHECK-ABSOLUTE-LD: warning: '-fuse-ld=' taking a

[clang] 5011d43 - Migrate Declarators to use the List API

2020-10-01 Thread Eduardo Caldas via cfe-commits
Author: Eduardo Caldas Date: 2020-10-01T13:56:31Z New Revision: 5011d43108d1de30a056d66e73fa19062e0e84b7 URL: https://github.com/llvm/llvm-project/commit/5011d43108d1de30a056d66e73fa19062e0e84b7 DIFF: https://github.com/llvm/llvm-project/commit/5011d43108d1de30a056d66e73fa19062e0e84b7.diff

[PATCH] D87962: [clang] Change the multi-character character constants from extension to implementation-defined.

2020-10-01 Thread Chuyang Chen via Phabricator via cfe-commits
nomanous updated this revision to Diff 295559. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87962/new/ https://reviews.llvm.org/D87962 Files: clang/include/clang/Basic/DiagnosticLexKinds.td clang/test/CXX/lex/lex.literal/lex.ccon/p1.cpp clang/test/FixIt/format.m

[PATCH] D88338: [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Sam McCall via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. sammccall marked an inline comment as done. Closed by commit rG79fbcbff4173: [clangd] clangd --check: standalone diagnosis of common problems (authored by sammccall).

[clang-tools-extra] 79fbcbf - [clangd] clangd --check: standalone diagnosis of common problems

2020-10-01 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-10-01T15:47:47+02:00 New Revision: 79fbcbff41734e3d07e6200d33c3e40732dfae6a URL: https://github.com/llvm/llvm-project/commit/79fbcbff41734e3d07e6200d33c3e40732dfae6a DIFF: https://github.com/llvm/llvm-project/commit/79fbcbff41734e3d07e6200d33c3e40732dfae6a.diff

[PATCH] D88314: Added llvm-string-referencing check

2020-10-01 Thread Bogdan Serea via Phabricator via cfe-commits
bogser01 updated this revision to Diff 295553. bogser01 added a comment. Fixed failing unit test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D88314/new/ https://reviews.llvm.org/D88314 Files: clang-tools-extra/clang-tidy/llvm/CMakeLists.txt

[PATCH] D88634: [clangd] Extend the rename API.

2020-10-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/ClangdServer.cpp:408 return CB(InpAST.takeError()); -auto = InpAST->AST; -const auto = AST.getSourceManager(); -auto Loc = sourceLocationInMainFile(SM, Pos); -if (!Loc) - return

[PATCH] D88613: [flang] Semantic analysis for FINAL subroutines

2020-10-01 Thread Peter Klausler via Phabricator via cfe-commits
klausler updated this revision to Diff 295423. klausler added a comment. Previous update to this review had inadvertent changes to other files because I neglected to rebase after updating master; now fixed. Sorry for the scare! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77062: [analyzer] Improve zero assumption in CStringChecke::assumeZero

2020-10-01 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal > @ASDenysPetrov Do you still want to rework the API of the `assumeZero`? This patch more looks like NFC, being just refactored. Actually I see that if we find and fix the root cause, we can freely refuse this patch. Another thing I see is that this

[PATCH] D87449: [clang-tidy] Add new check for SEI CERT rule SIG30-C

2020-10-01 Thread Balázs Kéri via Phabricator via cfe-commits
balazske marked 12 inline comments as done. balazske added inline comments. Comment at: clang-tools-extra/clang-tidy/cert/SignalHandlerCheck.cpp:95 + std::deque> CalledFunctions{ + {HandlerDecl, HandlerExpr}}; + baloghadamsoftware wrote: > Do we really

  1   2   >