[PATCH] D52918: Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread James Y Knight via Phabricator via cfe-commits
jyknight added a comment. In https://reviews.llvm.org/D52918#1256420, @aaron.ballman wrote: > Patch is missing tests -- perhaps you could dump the AST and check the > casting notation from the output? It would appear that which casts get emitted in C mode is almost completely untested. I

[PATCH] D52800: Java import sorting in clang-format

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. This gooks great! Thanks for the contribution! If you don't have commit access to Clang I can commit this for you. Repository: rC Clang https://reviews.llvm.org/D52800

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I'll take a look. I'm a bit worried that this might potentially affect C++ files too: I'll run an experiment over some random files to confirm that we're not missing something. https://reviews.llvm.org/D52842 ___

[PATCH] D52920: Introduce code_model macros

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: include/clang/Basic/TargetOptions.h:72 + // The code model to be used as specified by the user. Corresponds to + // Model enum defined in include/llvm/Support/CodeGen.h, plus "default" for + // the case when the user has not

[PATCH] D52939: ExprConstant: Propagate correct return values from constant evaluation.

2018-10-05 Thread James Y Knight via Phabricator via cfe-commits
jyknight created this revision. jyknight added a reviewer: rsmith. The constant evaluation now returns false whenever indicating failure would be appropriate for the requested mode, instead of returning "true" for success, and depending on the caller examining the various status variables after

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-10-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I'm fine with being more aggressive about this, and I agree that the standard should be making aliasing UB here. We use a similarly aggressive rule with return values: NRVO can allow direct access to the return slot, which we mark `noalias`, but which can in fact be

[PATCH] D52920: Introduce code_model macros

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: test/Preprocessor/init.c:7992 +// +// RUN: %clang -xc - -E -dD -mcmodel=medium --target=i386-unknown-linux < /dev/null | FileCheck -match-full-lines -check-prefix X86_MEDIUM %s +// X86_MEDIUM:#define __code_model_medium_ 1

[PATCH] D52873: Remove unwanted signedness conversion from tests

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D52873 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D46441: [clang][CodeGenCXX] Noalias attr for copy/move constructor arguments

2018-10-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGCall.cpp:1893 + +IsCtor = isa(TargetDecl); } I feel like you should just use `TargetDecl && isa(TargetDecl)` below; it's more obvious. Is there not an analogous rule for destructors?

[PATCH] D52938: [CUDA] Use all 64 bits of GUID in __nv_module_id

2018-10-05 Thread Jonas Hahnfeld via Phabricator via cfe-commits
Hahnfeld accepted this revision. Hahnfeld added a comment. This revision is now accepted and ready to land. LG. Out of interest: Is this fixing a particular issue? https://reviews.llvm.org/D52938 ___ cfe-commits mailing list

[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities

2018-10-05 Thread Victor Costan via Phabricator via cfe-commits
pwnall accepted this revision. pwnall added a comment. This revision is now accepted and ready to land. test/SemaCXX/warn-thread-safety-analysis.cpp LGTM -- this is the functionality that we need in Chrome to use thread safety annotations for AutoUnlock. very non-authoritative opinion - I think

[PATCH] D52918: Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread James Y Knight via Phabricator via cfe-commits
jyknight updated this revision to Diff 168477. jyknight added a comment. Added test. https://reviews.llvm.org/D52918 Files: clang/lib/AST/ExprConstant.cpp clang/lib/Sema/SemaExpr.cpp clang/test/Sema/c-casts.c Index: clang/test/Sema/c-casts.c

r343857 - [OPENMP][NVPTX] Fix emission of __kmpc_global_thread_num() for non-SPMD

2018-10-05 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Oct 5 08:27:47 2018 New Revision: 343857 URL: http://llvm.org/viewvc/llvm-project?rev=343857=rev Log: [OPENMP][NVPTX] Fix emission of __kmpc_global_thread_num() for non-SPMD mode. __kmpc_global_thread_num() should be called before initialization of the runtime.

[PATCH] D52879: Derive builtin return type from its definition

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. LGTM from OpenCL side! Repository: rC Clang https://reviews.llvm.org/D52879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r343790 - [clang] Add the exclude_from_explicit_instantiation attribute

2018-10-05 Thread Louis Dionne via cfe-commits
I just saw this. Simon Pilgrim already fixed it in r343846. Thanks Simon! Louis > On Oct 4, 2018, at 22:02, Galina Kistanova wrote: > > Hello Louis, > > This commit broke build step on one of our builders: > http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/13042

[PATCH] D52445: [Index] Use locations to uniquify function-scope BindingDecl USR

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 168486. MaskRay added a comment. Add test to Core/index-source.cpp Repository: rC Clang https://reviews.llvm.org/D52445 Files: lib/Index/USRGeneration.cpp test/Index/Core/index-source.cpp Index: test/Index/Core/index-source.cpp

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks good! I didn't find any instances where this messes-up C++ code (and it looks fine to me for Java code). https://reviews.llvm.org/D52842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:2559 // A.>>DoSomething(); +// A::>>DoSomething(); return false; nit: please add a comment that this example comes from Java. https://reviews.llvm.org/D52842

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Thanks! Will land with tweaked comment. Comment at: lib/Format/TokenAnnotator.cpp:2559 // A.>>DoSomething(); +// A::>>DoSomething(); return false; krasimir wrote: > nit: please add a comment that this example comes from

[PATCH] D52920: Introduce code_model macros

2018-10-05 Thread Ali Tamur via Phabricator via cfe-commits
tamur updated this revision to Diff 168494. Repository: rC Clang https://reviews.llvm.org/D52920 Files: include/clang/Basic/TargetOptions.h lib/Basic/Targets/X86.cpp lib/Frontend/CompilerInvocation.cpp test/Preprocessor/init.c Index: test/Preprocessor/init.c

[PATCH] D49244: Always search sysroot for GCC installs

2018-10-05 Thread David Greene via Phabricator via cfe-commits
greened updated this revision to Diff 168472. greened added a comment. Updated to implement option 2. I'm not totally happy with passing a StringRef just to check if it's non-empty but opted to reduce the size of the diff rather than refactor a bunch of stuff. Repository: rC Clang

[PATCH] D52658: [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Repository: rC Clang https://reviews.llvm.org/D52658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-05 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/readability/NumericalCostantsToMaxIntCheck.cpp:62 +CompilerInstance ) { + if (this->getLangOpts().CPlusPlus) { +Compiler.getPreprocessor().addPPCallbacks( JonasToth wrote: > you dont need

r343862 - [clang-format] Java import sorting in clang-format

2018-10-05 Thread Krasimir Georgiev via cfe-commits
Author: krasimir Date: Fri Oct 5 10:19:26 2018 New Revision: 343862 URL: http://llvm.org/viewvc/llvm-project?rev=343862=rev Log: [clang-format] Java import sorting in clang-format Contributed by SamMaier! Added: cfe/trunk/unittests/Format/SortImportsTestJava.cpp Modified:

[PATCH] D52891: [AMDGPU] Add -fvisibility-amdgpu-non-kernel-functions

2018-10-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D52891#1256207, @arsenm wrote: > I think the name needs work, but I'm not sure what it should be. I think it > should avoid using "non" and "amdgpu" I think dropping amdgpu is fine since we can add (AMDGUP only) to the description of the

[PATCH] D52938: [CUDA] Use all 64 bits of GUID in __nv_module_id

2018-10-05 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: Hahnfeld. Herald added subscribers: bixia, jlebar, sanjoy. getGUID() returns an uint64_t and "%x" only prints 32 bits of it. Use PRIx64 format string to print all 64 bits. https://reviews.llvm.org/D52938 Files: clang/lib/CodeGen/CGCUDANV.cpp

r343856 - [OPENMP] Fix emission of the __kmpc_global_thread_num.

2018-10-05 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Fri Oct 5 08:08:53 2018 New Revision: 343856 URL: http://llvm.org/viewvc/llvm-project?rev=343856=rev Log: [OPENMP] Fix emission of the __kmpc_global_thread_num. Fixed emission of the __kmpc_global_thread_num() so that it is not messed up with alloca instructions anymore.

[PATCH] D52598: [OpenCL] Fixed address space cast in C style cast of C++ parsing

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaCast.cpp:2288 + SrcType->isPointerType()) { +const PointerType *DestPtr = DestType->getAs(); +if (!DestPtr->isAddressSpaceOverlapping(*SrcType->getAs())) { Anastasia wrote: > rjmccall wrote:

[PATCH] D52888: Thread safety analysis: Handle conditional expression in getTrylockCallExpr

2018-10-05 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In https://reviews.llvm.org/D52888#1256395, @aaron.ballman wrote: > In https://reviews.llvm.org/D52888#1255862, @aaronpuchert wrote: > > > Additional changes (including some non-tail recursion unfortunately) would > > allow the following to work: > > > > void

Re: [PATCH] Add some automatic tests for DivideZero checker

2018-10-05 Thread Tamás Zolnai via cfe-commits
Hi, I uploaded this patch to phabricator: https://reviews.llvm.org/D52936 Best Regards, Tamás Tamás Zolnai ezt írta (időpont: 2018. okt. 5., P, 14:14): > Hi all, > > I'm a new contributor in clang / llvm. I'm planning to work on clang > static analyzer: maybe add new checker, imporve the

r343867 - Emit diagnostic note when calling an invalid function declaration.

2018-10-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Fri Oct 5 10:49:48 2018 New Revision: 343867 URL: http://llvm.org/viewvc/llvm-project?rev=343867=rev Log: Emit diagnostic note when calling an invalid function declaration. The comment said it was intentionally not emitting any diagnostic because the declaration itself

[PATCH] D52919: Emit diagnostic note when calling an invalid function declaration.

2018-10-05 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343867: Emit diagnostic note when calling an invalid function declaration. (authored by jyknight, committed by ). Changed prior to commit: https://reviews.llvm.org/D52919?vs=168417=168490#toc

[PATCH] D52891: [AMDGPU] Add -fvisibility-amdgpu-non-kernel-functions

2018-10-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can you also fix HIP toolchain? It is in HIPToolChain::addClangTargetOptions. Thanks. https://reviews.llvm.org/D52891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D51809: [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors

2018-10-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 168479. yaxunl retitled this revision from "[CUDA][HIP] Fix assertion in LookupSpecialMember" to "[CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors". yaxunl edited the summary of this revision. yaxunl added a comment. Revised by Justin's

[PATCH] D52936: Add some automatic tests for DivideZero checker

2018-10-05 Thread Tamás Zolnai via Phabricator via cfe-commits
ztamas created this revision. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D52936 Files: test/Analysis/div-zero.cpp Index: test/Analysis/div-zero.cpp === --- test/Analysis/div-zero.cpp

[PATCH] D52937: [clangd] Add clangd.serverInfo command to inspect server state.

2018-10-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: ioeric. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Initially just export the information that's easily available. (I want to measure changes in dynamic index size, so this is good enough

[PATCH] D52598: [OpenCL] Fixed address space cast in C style cast of C++ parsing

2018-10-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaCast.cpp:2288 + SrcType->isPointerType()) { +const PointerType *DestPtr = DestType->getAs(); +if (!DestPtr->isAddressSpaceOverlapping(*SrcType->getAs())) { Anastasia wrote: > Anastasia wrote:

[PATCH] D52676: [clang-format] tweaked another case of lambda formatting

2018-10-05 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. In https://reviews.llvm.org/D52676#1251391, @oleg.smolsky wrote: > In https://reviews.llvm.org/D52676#1251342, @krasimir wrote: > > > Digging a bit further, seems like the behavior you're looking for could be > > achieved by setting the `AlignAfterOpenBracket` option

[PATCH] D52918: Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, thank you for adding the test and the TODO! https://reviews.llvm.org/D52918 ___ cfe-commits mailing list

r343883 - [DebugInfo] Add support for DWARF5 call site-related attributes

2018-10-05 Thread Vedant Kumar via cfe-commits
Author: vedantk Date: Fri Oct 5 13:37:17 2018 New Revision: 343883 URL: http://llvm.org/viewvc/llvm-project?rev=343883=rev Log: [DebugInfo] Add support for DWARF5 call site-related attributes DWARF v5 introduces DW_AT_call_all_calls, a subprogram attribute which indicates that all calls (both

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: test/Sema/div-sizeof-ptr.c:9 + +int e = sizeof(int *) / sizeof(int); +int f = sizeof(p) / sizeof(p); GCC warns also in this case, but it is weird... https://reviews.llvm.org/D52949

[PATCH] D51388: [analyzer] NFC: Legalize state manager factory injection.

2018-10-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h:33 /// introduce a type named \c NameTy. - /// The macro should not be used inside namespaces, or for traits that must - /// be accessible from more than one

[PATCH] D52905: CSA: fix accessing GDM data from shared libraries

2018-10-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added subscribers: george.karpenkov, dcoughlin, NoQ. NoQ added a comment. Hmmm, interesting. A checker doesn't usually need to access these specific static locals, at least not directly. These are usually accessed through functions in .cpp files that are supposed to be compiled with a

[PATCH] D52690: [clang-tidy] NFC use CHECK-NOTES in tests for misc-misplaced-const

2018-10-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/misc-misplaced-const.c:18 + // CHECK-NOTES: :[[@LINE-1]]:12: warning: 'i3' declared with a const-qualified typedef type; results in the type being 'int *const' instead of 'const int *' + // CHECK-NOTES:

[clang-tools-extra] r343849 - [clangd] Remove last usage of ast matchers from SymbolCollector. NFC

2018-10-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 5 07:03:04 2018 New Revision: 343849 URL: http://llvm.org/viewvc/llvm-project?rev=343849=rev Log: [clangd] Remove last usage of ast matchers from SymbolCollector. NFC Modified: clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp Modified:

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52771#1256511, @JonasToth wrote: > In https://reviews.llvm.org/D52771#1256432, @aaron.ballman wrote: > > > I can't help but notice how badly C.133 and C.9 interact with C.131 and I'm > > worried we will wind up with clang-tidy checks

[PATCH] D52684: [clang-tidy] NFC refactor lexer-utils slightly to be easier to use

2018-10-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D52684#1250885, @JonasToth wrote: > This patch is related to https://reviews.llvm.org/D51949 > > To isolate variable declarations (split `int * p, v;` up) it is

[clang-tools-extra] r343850 - [clang-tidy] NFC refactor lexer-utils to be usable without ASTContext

2018-10-05 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Fri Oct 5 07:15:19 2018 New Revision: 343850 URL: http://llvm.org/viewvc/llvm-project?rev=343850=rev Log: [clang-tidy] NFC refactor lexer-utils to be usable without ASTContext Summary: This patch is a small refactoring necessary for 'readability-isolate-declaration' and

[PATCH] D52684: [clang-tidy] NFC refactor lexer-utils to be usable without ASTContext

2018-10-05 Thread Jonas Toth via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343850: [clang-tidy] NFC refactor lexer-utils to be usable without ASTContext (authored by JonasToth, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. C.131 seems to imply a minimal amount of trivial getters/setters before diagnosing. I feel that the CPPCG just want to force the programmer to think twice instead of forbidding it totally. It might be worth to have a more chatty/specific check for the CPPCG and a

[PATCH] D52598: [OpenCL] Fixed address space cast in C style cast of C++ parsing

2018-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 168471. Anastasia added a comment. Change AS checking function to be a method of `CastOperation`. https://reviews.llvm.org/D52598 Files: lib/Sema/SemaCast.cpp test/SemaOpenCL/address-spaces-conversions-cl2.0.cl test/SemaOpenCL/address-spaces.cl

[PATCH] D51809: [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors

2018-10-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 168500. yaxunl added a comment. fix a typo. https://reviews.llvm.org/D51809 Files: lib/Sema/SemaDeclCXX.cpp test/SemaCUDA/implicit-member-target-inherited.cu test/SemaCUDA/inherited-ctor.cu Index: test/SemaCUDA/inherited-ctor.cu

[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities

2018-10-05 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert planned changes to this revision. aaronpuchert added a comment. I think I'll try to simplify this and address @delesley's comments before we commit this. I'll admit that the semantics are somewhat counter-intuitive, but as I explained I think it's more consistent this way. Because

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D52811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168518. https://reviews.llvm.org/D52811 Files: include/clang/Basic/BuiltinsAArch64.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h test/CodeGen/arm64-microsoft-intrinsics.c Index: test/CodeGen/arm64-microsoft-intrinsics.c

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 168539. https://reviews.llvm.org/D52949 Files: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/Sema/div-sizeof-ptr.c Index: test/Sema/div-sizeof-ptr.c

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D52807 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52395: Thread safety analysis: Require exclusive lock for passing by non-const reference

2018-10-05 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert updated this revision to Diff 168505. aaronpuchert added a comment. Rebase on top of https://reviews.llvm.org/D52443. We also check the move constructor argument for write access, as suggested in a review. This isn't intended to be merged (yet?), it should be seen as an RFC.

r343887 - [llvm-nm] Write "no symbol" output to stderr

2018-10-05 Thread Petr Hosek via cfe-commits
Author: phosek Date: Fri Oct 5 14:10:03 2018 New Revision: 343887 URL: http://llvm.org/viewvc/llvm-project?rev=343887=rev Log: [llvm-nm] Write "no symbol" output to stderr This matches the output of binutils' nm and ensures that any scripts or tools that use nm and expect empty output in case

r343894 - [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Fri Oct 5 14:57:41 2018 New Revision: 343894 URL: http://llvm.org/viewvc/llvm-project?rev=343894=rev Log: [COFF, ARM64] Add _InterlockedAdd intrinsic Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, javed.absar, efriedma Reviewed By: efriedma Subscribers: efriedma,

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343894: [COFF, ARM64] Add _InterlockedAdd intrinsic (authored by mgrang, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D52938: [CUDA] Use all 64 bits of GUID in __nv_module_id

2018-10-05 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. This particular change is largely cosmetic. I've just spotted this nit while I was debugging a different problem. It's also related to module ID. We're trying to compile NCCL 2.3 with -fcuda-rdc and we were getting duplicate symbols when we tried to link multiple object

r343872 - clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Nico Weber via cfe-commits
Author: nico Date: Fri Oct 5 11:22:21 2018 New Revision: 343872 URL: http://llvm.org/viewvc/llvm-project?rev=343872=rev Log: clang-format: Don't insert spaces in front of :: for Java 8 Method References. The existing code kept the space if it was there for identifiers, and it didn't handle

[PATCH] D52938: [CUDA] Use all 64 bits of GUID in __nv_module_id

2018-10-05 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343875: [CUDA] Use all 64 bits of GUID in __nv_module_id (authored by tra, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r343875 - [CUDA] Use all 64 bits of GUID in __nv_module_id

2018-10-05 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Oct 5 11:39:58 2018 New Revision: 343875 URL: http://llvm.org/viewvc/llvm-project?rev=343875=rev Log: [CUDA] Use all 64 bits of GUID in __nv_module_id getGUID() returns an uint64_t and "%x" only prints 32 bits of it. Use PRIx64 format string to print all 64 bits.

[PATCH] D52949: [Diagnostics] Implement -Wsizeof-pointer-div

2018-10-05 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. Herald added a subscriber: cfe-commits. void test(int *arr) { int arr_len = sizeof(arr) / sizeof(*arr); // warn, incorrect way to compute number of array elements } Enabled under -Wall (same behaviour as GCC) Repository: rC Clang

[PATCH] D52918: Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343892: Emit CK_NoOp casts in C mode, not just C++. (authored by jyknight, committed by ). Changed prior to commit: https://reviews.llvm.org/D52918?vs=168477=168541#toc Repository: rL LLVM

[PATCH] D52918: Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread James Y Knight via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343892: Emit CK_NoOp casts in C mode, not just C++. (authored by jyknight, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343881: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic (authored by mgrang, committed by ). Repository: rC Clang https://reviews.llvm.org/D52807 Files:

r343881 - [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-05 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Fri Oct 5 12:49:36 2018 New Revision: 343881 URL: http://llvm.org/viewvc/llvm-project?rev=343881=rev Log: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, efriedma Reviewed By: efriedma Subscribers:

[PATCH] D52578: Thread safety analysis: Allow scoped releasing of capabilities

2018-10-05 Thread Victor Costan via Phabricator via cfe-commits
pwnall added a comment. Thank you for clarifying, Aaron! I probably used Phabricator incorrectly. My intent was to state that the tests LGTM and express support for the functionality in this patch. Please definitely address all review comments before landing. Repository: rC Clang

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 168517. mgrang added a comment. Herald added a reviewer: javed.absar. Limited the intrinsic only for AArch64 and fixed the implementation to return the sum instead of the old value of the Addend. Thanks @efriedma for the pointers.

[PATCH] D52193: RFC: [clang] Multithreaded compilation support

2018-10-05 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In https://reviews.llvm.org/D52193#1243456, @thakis wrote: > ...and to reword this a bit: Clang taking a long time to start up in some > configurations is a bug we should profile and fix :-) This is time spent in `ntdll.dll` loading various low-level libraries like

r343892 - Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread James Y Knight via cfe-commits
Author: jyknight Date: Fri Oct 5 14:53:51 2018 New Revision: 343892 URL: http://llvm.org/viewvc/llvm-project?rev=343892=rev Log: Emit CK_NoOp casts in C mode, not just C++. Previously, it had been using CK_BitCast even for casts that only change const/restrict/volatile. Now it will use CK_Noop

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-05 Thread Phabricator via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rL343872: clang-format: Dont insert spaces in front of :: for Java 8 Method References. (authored by nico, committed by ).

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-05 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:3003 + case Builtin::BI_InterlockedCompareExchangePointer: + case Builtin::BI_InterlockedCompareExchangePointer_nf: { llvm::Type *RTy; efriedma wrote: > efriedma wrote: > > rnk wrote: >

[PATCH] D52398: Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr

2018-10-05 Thread Jordan Rupprecht via Phabricator via cfe-commits
rupprecht added a comment. In https://reviews.llvm.org/D52398#1255290, @aaronpuchert wrote: > @hokein Please have a look at https://reviews.llvm.org/D52888, maybe you can > try it out already. The problem was that `?:` expressions are considered a > branch point and when merging both branches

[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

2018-10-05 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In https://reviews.llvm.org/D51340#1254898, @takuto.ikuta wrote: > Ping? Sorry, I know I'm being slow to look at this :-( I have not forgotten, it's just a lot of other things happening at the same time. https://reviews.llvm.org/D51340

[PATCH] D52872: [clangd] Make binary index format the default, remove dead flag.

2018-10-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. looks good. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

RE: [clang-tools-extra] r343778 - [clangd] clangd-indexer gathers refs and stores them in index files.

2018-10-05 Thread via cfe-commits
Hi Sam, Our internal build bot hit an assertion failure in the changes you made in this commit that I was able to reproduce by building your change on my machine on Windows 7 using Visual Studio 2015. None of the public build bots seem to have hit this issue, though I am not sure why at the

[PATCH] D52880: [clang-tidy] fix PR39167, bugprone-exception-escape hangs-up

2018-10-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. This patch does not fix the underlying issue. I do have a candidate that might cause it, but I am not sure if it is functionally preserving (tests seems to work though!). I think it is best if @baloghadamsoftware takes a look at it as well! Repository: rL LLVM

[PATCH] D52872: [clangd] Make binary index format the default, remove dead flag.

2018-10-05 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343841: [clangd] Make binary index format the default, remove dead flag. (authored by sammccall, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r343841 - [clangd] Make binary index format the default, remove dead flag.

2018-10-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 5 02:05:28 2018 New Revision: 343841 URL: http://llvm.org/viewvc/llvm-project?rev=343841=rev Log: [clangd] Make binary index format the default, remove dead flag. Reviewers: hokein Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet,

[PATCH] D52445: [Index] Use locations to uniquify function-scope BindingDecl USR

2018-10-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Can you add a test? Repository: rC Clang https://reviews.llvm.org/D52445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45045: [DebugInfo] Generate debug information for labels.

2018-10-05 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai added a comment. Fix the bug in https://reviews.llvm.org/D52927. Repository: rL LLVM https://reviews.llvm.org/D45045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51332: [clang-tidy] Replace deprecated std::ios_base aliases

2018-10-05 Thread Bence Ando via Phabricator via cfe-commits
andobence updated this revision to Diff 168452. andobence added a comment. Rebased on top of master. I don't have commit rights. https://reviews.llvm.org/D51332 Files: clang-tidy/modernize/CMakeLists.txt clang-tidy/modernize/DeprecatedIosBaseAliasesCheck.cpp

[PATCH] D52928: [clangd] Fix a subtle case for GetBeginningOfIdentifier.

2018-10-05 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. The following case 1 was incorrectly regarded as case 2: MACRO(foo->^function()) Also add few more tests for macro. Repository: rCTE

[PATCH] D52892: [Clang-tidy] readability check to convert numerical constants to std::numeric_limits

2018-10-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @aaron.ballman I have a question for an expert: How would bitfields relate to this check? Can there be a similar pattern for them and do they need to be handled here? Comment at: clang-tidy/readability/NumericalCostantsToMaxIntCheck.cpp:62 +

r343843 - [AArch64] Use filecheck captures for metadata node numbers in test. NFC

2018-10-05 Thread David Green via cfe-commits
Author: dmgreen Date: Fri Oct 5 03:21:25 2018 New Revision: 343843 URL: http://llvm.org/viewvc/llvm-project?rev=343843=rev Log: [AArch64] Use filecheck captures for metadata node numbers in test. NFC Just a quick fix for cases where extra metadata members are present. Modified:

[PATCH] D52888: Thread safety analysis: Handle conditional expression in getTrylockCallExpr

2018-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52888#1255862, @aaronpuchert wrote: > Additional changes (including some non-tail recursion unfortunately) would > allow the following to work: > > void foo16() { > if (cond ? mu.TryLock() : false) > mu.Unlock(); > } >

[PATCH] D51340: Add /Zc:DllexportInlines option to clang-cl

2018-10-05 Thread Takuto Ikuta via Phabricator via cfe-commits
takuto.ikuta added a comment. In https://reviews.llvm.org/D51340#1256299, @hans wrote: > In https://reviews.llvm.org/D51340#1254898, @takuto.ikuta wrote: > > > Ping? > > > Sorry, I know I'm being slow to look at this :-( I have not forgotten, it's > just a lot of other things happening at the

[PATCH] Add some automatic tests for DivideZero checker

2018-10-05 Thread Tamás Zolnai via cfe-commits
Hi all, I'm a new contributor in clang / llvm. I'm planning to work on clang static analyzer: maybe add new checker, imporve the exisiting one, etc. As the first step I checked how core.DivideZero checker works now and added some test cases for regression testing (see attached patch). The patch

[clang-tools-extra] r343844 - [clangd] Fix a subtle case for GetBeginningOfIdentifier.

2018-10-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 5 05:08:06 2018 New Revision: 343844 URL: http://llvm.org/viewvc/llvm-project?rev=343844=rev Log: [clangd] Fix a subtle case for GetBeginningOfIdentifier. Calling getMacroArgExpansionLocation too early was causing Lexer::getRawToken to do the wrong thing - lexing

[PATCH] D52928: [clangd] Fix a subtle case for GetBeginningOfIdentifier.

2018-10-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. (Stealing this to make some revisions after pair-programming) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52928 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52928: [clangd] Fix a subtle case for GetBeginningOfIdentifier.

2018-10-05 Thread Sam McCall via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343844: [clangd] Fix a subtle case for GetBeginningOfIdentifier. (authored by sammccall, committed by ). Changed prior

[PATCH] D52918: Emit CK_NoOp casts in C mode, not just C++.

2018-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Patch is missing tests -- perhaps you could dump the AST and check the casting notation from the output? https://reviews.llvm.org/D52918 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [clang-tools-extra] r343778 - [clangd] clangd-indexer gathers refs and stores them in index files.

2018-10-05 Thread Sam McCall via cfe-commits
Thanks! There was actually some old debugging code that got left over in a test. Sorry about that! Fixed in r343845. On Fri, Oct 5, 2018 at 11:34 AM wrote: > Hi Sam, > > Our internal build bot hit an assertion failure in the changes you made in > this commit that I was able to reproduce by

[clang-tools-extra] r343845 - [clangd] Remove debugging output in test

2018-10-05 Thread Sam McCall via cfe-commits
Author: sammccall Date: Fri Oct 5 05:22:40 2018 New Revision: 343845 URL: http://llvm.org/viewvc/llvm-project?rev=343845=rev Log: [clangd] Remove debugging output in test Modified: clang-tools-extra/trunk/unittests/clangd/SerializationTests.cpp Modified:

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I can't help but notice how badly C.133 and C.9 interact with C.131 and I'm worried we will wind up with clang-tidy checks that leave the user in an impossible situation where they need to make data members private and provide trivial accessors for them. Do you

r343846 - Fix llvm-clang-x86_64-expensive-checks-win build by setting bigobj flag.

2018-10-05 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Oct 5 05:33:57 2018 New Revision: 343846 URL: http://llvm.org/viewvc/llvm-project?rev=343846=rev Log: Fix llvm-clang-x86_64-expensive-checks-win build by setting bigobj flag. Modified: cfe/trunk/lib/Sema/CMakeLists.txt Modified: cfe/trunk/lib/Sema/CMakeLists.txt

  1   2   >