Re: LLVM Lab power outage

2018-10-05 Thread Galina Kistanova via cfe-commits
Hello everyone, The Lab is back to normal. Thanks for you patience and understanding. Thanks Galina On 10/5/18, Galina Kistanova wrote: > Hello everyone, > > PG experience a major power outage. > LLVM Lab is affected. Buildbot is down. > There is no ETA yet. I'll keep you posted. > > Thanks

[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#1257133, @aaronpuchert wrote: > In https://reviews.llvm.org/D52398#1257092, @rupprecht wrote: > > > I patched the proposed fix-forward and it seems to have things building > > again. Is there an ETA on landing that? If it's going to

[PATCH] D32906: [Analyzer] Iterator Checker - Part 10: Support for iterators passed as parameter

2018-10-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Just add tests, i guess! Also i'll have a look at whether the checker is in a good shape to be enabled by default. I suspect that mismatched iterators might be very safe to enable. With all these

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

2018-10-05 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. In https://reviews.llvm.org/D52398#1257092, @rupprecht wrote: > I patched the proposed fix-forward and it seems to have things building > again. Is there an ETA on landing that? If it's going to take a bit, is there > any chance we could revert this patch until

LLVM Lab power outage

2018-10-05 Thread Galina Kistanova via cfe-commits
Hello everyone, PG experience a major power outage. LLVM Lab is affected. Buildbot is down. There is no ETA yet. I'll keep you posted. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2018-10-05 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343902: Thread safety analysis: Handle conditional expression in getTrylockCallExpr (authored by aaronpuchert, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r343902 - Thread safety analysis: Handle conditional expression in getTrylockCallExpr

2018-10-05 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Fri Oct 5 18:09:28 2018 New Revision: 343902 URL: http://llvm.org/viewvc/llvm-project?rev=343902=rev Log: Thread safety analysis: Handle conditional expression in getTrylockCallExpr Summary: We unwrap conditional expressions containing try-lock functions.

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

2018-10-05 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. It looks like you ran clang-format on all of lib/Sema/SemaExpr.cpp and changed many lines that are irrelevant to your patch. Can you undo that, please? https://reviews.llvm.org/D52949 ___ cfe-commits mailing list

[PATCH] D52957: [analyzer] Teach CallEvent about C++17 aligned new.

2018-10-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, a.sidorin, george.karpenkov, szepet, rnkovacs. Herald added subscribers: cfe-commits, Szelethus, mikhail.ramalho, baloghadamsoftware. In C++17, when class `C` has large alignment value, a special case of overload resolution

[PATCH] D52920: Introduce code_model macros

2018-10-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: lib/Basic/Targets/X86.cpp:865 + if (CodeModel == "default") +// When the user has not explicitly specified anything, +// the default code model to use is small. I'm not sure if the comment is useful here... or

[PATCH] D52956: Support `-fno-visibility-inlines-hidden`

2018-10-05 Thread Andrew Gallagher via Phabricator via cfe-commits
andrewjcg created this revision. Herald added subscribers: cfe-commits, eraman. Undoes `-fvisibility-inlines-hidden`. Test Plan: added test Repository: rC Clang https://reviews.llvm.org/D52956 Files: include/clang/Driver/Options.td lib/Driver/ToolChains/Clang.cpp

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

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. In https://reviews.llvm.org/D52888#1256625, @aaronpuchert wrote: > In https://reviews.llvm.org/D52888#1256395, @aaron.ballman wrote: > > > In

[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] 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] 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:

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] 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] 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

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] 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] 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] 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

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

[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

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] 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] 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] 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] 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] 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 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] 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.

[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] 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] 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

[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] 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

[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 ).

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] 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] 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] 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] 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] 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] 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] 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] 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] 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

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] 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

[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] 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

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] 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] 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] 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

[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] 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 ___

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

[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] 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] 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] 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] 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: 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] 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] 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

[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] 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

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.

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] 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

[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] 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] 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] 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] 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] 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

[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 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

[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

[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] 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:

[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. 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 that leave the user in an > impossible situation where they need to make

[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 inline comments. Comment at: clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp:26 + +AST_MATCHER(clang::CXXRecordDecl, hasNonStaticMethod) { + return hasMethod(unless(isStaticStorageClass())) lebedev.ri wrote: > JonasToth wrote: > > I

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

2018-10-05 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth closed this revision. JonasToth added a comment. Commited in https://reviews.llvm.org/rL343848. Thank you for the patch! https://reviews.llvm.org/D51332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r343848 - [clang-tidy] Replace deprecated std::ios_base aliases

2018-10-05 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Fri Oct 5 06:36:00 2018 New Revision: 343848 URL: http://llvm.org/viewvc/llvm-project?rev=343848=rev Log: [clang-tidy] Replace deprecated std::ios_base aliases This check warns the uses of the deprecated member types of std::ios_base and replaces those that have a

[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

[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] 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

[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

  1   2   >