[PATCH] D45168: [clang-format/ObjC] Do not insert space after opening brace of ObjC dict literal

2018-04-02 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. Repository: rC Clang https://reviews.llvm.org/D45168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45169: [clang-format/ObjC] Do not detect "[]" as ObjC method expression

2018-04-02 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added a comment. This revision is now accepted and ready to land. Looks good. I like option 2 :). Repository: rC Clang https://reviews.llvm.org/D45169 ___ cfe-commits mailing list

[PATCH] D45126: Xray, OpenBSD support

2018-04-02 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. LGTM -- at some point, it would be good to refactor all these flag settings to a single place. Maybe file a bug so that we can track that issue on XRay? If you can't do it now, I'd be happy

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-04-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8901 } - + case X86::BI__builtin_ia32_sqrtsd_round_mask: + case X86::BI__builtin_ia32_sqrtss_round_mask: { What about __builtin_ia32_sqrtsd and __builtin_ia32_sqrtss? Repository:

[PATCH] D41168: [X86] Lowering X86 avx512 sqrt intrinsics to IR

2018-04-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:8904 +unsigned CC = cast(Ops[4])->getZExtValue(); +// Support only if the rounding mode is 4 (AKA CUR_DIRECTION), otherwise keep the intrinsic. +if (CC != 4) { 80 columns?

[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

2018-04-02 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 140735. dberris added a comment. - fixup: Fix tests for better coverage of settings https://reviews.llvm.org/D44970 Files: clang/include/clang/Driver/Options.td clang/include/clang/Driver/XRayArgs.h clang/include/clang/Frontend/CodeGenOptions.def

[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

2018-04-02 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: clang/include/clang/Frontend/CodeGenOptions.h:110 + enum XRayInstrumentationPointBundle { +XRay_All, // Always emit all the instrumentation points. pelikan wrote: > To me, this feels like a bitfield

[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

2018-04-02 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 140731. dberris marked 8 inline comments as done. dberris added a comment. - fixup: address comments https://reviews.llvm.org/D44970 Files: clang/include/clang/Driver/Options.td clang/include/clang/Driver/XRayArgs.h

[PATCH] D45196: [libc++abi] Replace __sync_* functions with __libcpp_atomic_* functions.

2018-04-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma created this revision. efriedma added reviewers: EricWF, compnerd. This is basically part 2 of r313694. It's a little unfortunate that I had to copy-paste atomic_support.h, but I don't really see any alternative. The refstring.h changes are the same as the libcxx changes in r313694.

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-04-02 Thread David Majnemer via Phabricator via cfe-commits
majnemer added a comment. In https://reviews.llvm.org/D45174#1055125, @rsmith wrote: > In https://reviews.llvm.org/D45174#1055048, @rsmith wrote: > > > I wonder if we can delete the `getNonVirtualSize()` check now -- I don't > > see any way that an empty class can have a nonzero nvsize except

[libcxx] r329038 - Fix fs::proximate tests on platforms where /net exists.

2018-04-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Apr 2 18:52:12 2018 New Revision: 329038 URL: http://llvm.org/viewvc/llvm-project?rev=329038=rev Log: Fix fs::proximate tests on platforms where /net exists. The proximate tests depended on `/net` not being a valid path, however, on OS X it is. Correct the tests to

[PATCH] D45194: [Sema] Defer checking constexpr lambda until after we've finished the lambda class.

2018-04-02 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, faisalv. Previously, this caused ExprConstant to assert while verifying the lambda is constexpr: void f() { int x = 0; [=]() constexpr { return x; }; } The problem is that

[PATCH] D42776: [Sema] Fix an assertion failure in constant expression evaluation of calls to functions with default arguments

2018-04-02 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. I think this can be cleaned up a bit further, but I'm fine with that happening after the patch lands. Thanks! Comment at: lib/AST/ExprConstant.cpp:455-456 // values

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D45174#1055048, @rsmith wrote: > I wonder if we can delete the `getNonVirtualSize()` check now -- I don't see > any way that an empty class can have a nonzero nvsize except by this nonempty > anonymous bit-fields situation. Yup, looks like:

[PATCH] D45176: implement recent "standard-layout" changes

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith updated this revision to Diff 140715. rsmith edited the summary of this revision. rsmith added a comment. Patch updated to track "is C++11 standard-layout class" separately from "is standard-layout class" so that we can use the former for record layout in the targets that need it. This

[PATCH] D44773: [CMake] Use custom command and target to install libc++ headers

2018-04-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. ping Repository: rCXX libc++ https://reviews.llvm.org/D44773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-04-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D44536#1054929, @rsmith wrote: > It seems that we have two options: either we valiantly try to support this: > > - we keep a list of types for which we've tried to form a > //delete-expression//, but found that the type was incomplete > -

[PATCH] D45145: [Driver] Wire up the -f[no-]rtlib-add-rpath flag and tests

2018-04-02 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329032: [Driver] Wire up the -f[no-]rtlib-add-rpath flag and tests (authored by phosek, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. In https://reviews.llvm.org/D44883#1055018, @Quuxplusone wrote: > @EricWF, is it important IYO that this warning not trigger in unevaluated > contexts even for non-dependently-typed variables? > This is the case that seems to be coming up in practice in libc++ tests,

r329032 - [Driver] Wire up the -f[no-]rtlib-add-rpath flag and tests

2018-04-02 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Apr 2 16:36:14 2018 New Revision: 329032 URL: http://llvm.org/viewvc/llvm-project?rev=329032=rev Log: [Driver] Wire up the -f[no-]rtlib-add-rpath flag and tests D30700 added the -f[no-]rtlib-add-rpath flag, but that flag was never wired up in the driver and tests were

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. No, the analysis is intentionally syntactic; it should apply even on dependently-typed arguments (but not get re-checked on instantiation). But I agree that the warning ought to be disabled in unevaluated contexts. Repository: rC Clang

[libcxx] r329031 - Implement P0430R2 - File system library on non-POSIX systems.

2018-04-02 Thread Eric Fiselier via cfe-commits
Author: ericwf Date: Mon Apr 2 16:35:24 2018 New Revision: 329031 URL: http://llvm.org/viewvc/llvm-project?rev=329031=rev Log: Implement P0430R2 - File system library on non-POSIX systems. This patch implements P0430R2, who's largest change is adding the path::format enumeration for supporting

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D45174#1054936, @rnk wrote: > I've convinced myself that this is NFC for MS record layout because this is > the only place we use RD->isEmpty() that matters: > > if (!FoundBase) { > if (MDCUsesEBO && BaseDecl->isEmpty() && >

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. > The warning is fundamentally about dataflow, but this doesn't apply to > unevaluated expressions. There are plenty of cases where a user might want to > ask if assignment is well formed on noexcept using only one variable. For > example: > > template void

[PATCH] D45013: Generate warning when over-aligned new call is required but not supported.

2018-04-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai accepted this revision. vsapsai added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D45013#1053998, @EricWF wrote: > In https://reviews.llvm.org/D45013#1052600, @vsapsai wrote: > > > Does it make sense to have a warning for `__libcpp_deallocate`

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. `std::move` would definitely be special in this regard if there were a pressing benefit to be gained — i.e., if people were currently getting bitten by accidentally discarded calls of `std::move(x)`. But you haven't shown that people are getting bitten today; in

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-04-02 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Yes, the standard says you're allowed to throw an exception from the random_device constructor, or use a PRNG with an arbitrary seed, or even just return zeros from operator(). But none of those behaviors are actually useful; the code will compile, but you won't get

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment. One thing I would like to see in this patch is ensuring the warning doesn't get generated when the expression appears in unevaluated contexts, such as `decltype` and `noexcept`. The warning is fundamentally about dataflow, but this doesn't apply to unevaluated

r329025 - CodeGenCXX: support PreserveMostCC in MS ABI

2018-04-02 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Mon Apr 2 15:25:50 2018 New Revision: 329025 URL: http://llvm.org/viewvc/llvm-project?rev=329025=rev Log: CodeGenCXX: support PreserveMostCC in MS ABI Microsoft has reserved 'U' for the PreserveMostCC which is used in the swift runtime. Add support for this. This allows

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45163#1054925, @Quuxplusone wrote: > > I think it wouldn't be unreasonable to ask standard library maintainers to > > add `[[nodiscard]]` to `std::move` > > +1. Also `std::forward`, for sure. Basically any metaprogramming function > that

[libcxx] r329023 - [libcxx] Disable testing with system lib for 2 tests verifying debug mode.

2018-04-02 Thread Volodymyr Sapsai via cfe-commits
Author: vsapsai Date: Mon Apr 2 15:09:57 2018 New Revision: 329023 URL: http://llvm.org/viewvc/llvm-project?rev=329023=rev Log: [libcxx] Disable testing with system lib for 2 tests verifying debug mode. Modified:

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-04-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a subscriber: majnemer. rnk added a comment. In https://reviews.llvm.org/D45174#1054820, @rsmith wrote: > +rnk This might also affect the MS ABI, but it does not result in any test > case failures at least (and MSVC's type trait matches our state after this > patch rather than

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D44536#1051232, @rjmccall wrote: > Right. Again, I'd like Richard to weigh in here, but my suspicion would be > that, somehow, the fact that e is an incomplete type when we type-check that > call is combining poorly with the fact that it's

[PATCH] D44536: Avoid segfault when destructor is not yet known

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. It seems that we have two options: either we valiantly try to support this: - we keep a list of types for which we've tried to form a //delete-expression//, but found that the type was incomplete - when such a type is completed, we mark the destructor as used, triggering

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. > I think it wouldn't be unreasonable to ask standard library maintainers to > add `[[nodiscard]]` to `std::move` +1. Also `std::forward`, for sure. Basically any metaprogramming function that is statically known to return a reference to its argument. This

[PATCH] D41316: [libcxx] Allow random_device to be built optionally

2018-04-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. [rand.device]/2 seems to be the authoritative word here: If implementation limitations prevent generating nondeterministic random numbers, the implementation may employ a random number engine. https://reviews.llvm.org/D41316

r328968 - Fix unused variable warning introduced at revision 328910.

2018-04-02 Thread Andrea Di Biagio via cfe-commits
Author: adibiagio Date: Mon Apr 2 05:04:37 2018 New Revision: 328968 URL: http://llvm.org/viewvc/llvm-project?rev=328968=rev Log: Fix unused variable warning introduced at revision 328910. Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp Modified: cfe/trunk/lib/Analysis/LiveVariables.cpp

[clang-tools-extra] r328932 - [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-04-02 Thread Zinovy Nis via cfe-commits
Author: zinovy.nis Date: Sun Apr 1 04:51:57 2018 New Revision: 328932 URL: http://llvm.org/viewvc/llvm-project?rev=328932=rev Log: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer This macro is widely used in many well-known projects, ex.

[PATCH] D45185: [clang-format] Support lightweight Objective-C generics

2018-04-02 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. Previously, `clang-format` didn't understand lightweight Objective-C generics, which have the form: @interface Foo

[PATCH] D44995: [Driver] Include the Android multiarch includes.

2018-04-02 Thread Dan Albert via Phabricator via cfe-commits
danalbert added a comment. Ping? Repository: rC Clang https://reviews.llvm.org/D44995 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. +rnk This might also affect the MS ABI, but it does not result in any test case failures at least (and MSVC's type trait matches our state after this patch rather than before). Repository: rC Clang https://reviews.llvm.org/D45174

[PATCH] D45112: [MS] Emit vftable thunks for functions with incomplete prototypes

2018-04-02 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329009: [MS] Emit vftable thunks for functions with incomplete prototypes (authored by rnk, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D45112: [MS] Emit vftable thunks for functions with incomplete prototypes

2018-04-02 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC329009: [MS] Emit vftable thunks for functions with incomplete prototypes (authored by rnk, committed by ). Changed prior to commit: https://reviews.llvm.org/D45112?vs=140499=140680#toc Repository:

r329009 - [MS] Emit vftable thunks for functions with incomplete prototypes

2018-04-02 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Apr 2 13:20:33 2018 New Revision: 329009 URL: http://llvm.org/viewvc/llvm-project?rev=329009=rev Log: [MS] Emit vftable thunks for functions with incomplete prototypes Summary: The following class hierarchy requires that we be able to emit a this-adjusting thunk for B::foo

[PATCH] D45178: Fixes errors caused by https://reviews.llvm.org/D44960

2018-04-02 Thread Max Moroz via Phabricator via cfe-commits
Dor1s accepted this revision. Dor1s added a comment. This revision is now accepted and ready to land. Looks good from my perspective, added Peter and Zachary who might know this code better :) Repository: rC Clang https://reviews.llvm.org/D45178

[PATCH] D5997: Mangling of member-expressions involving anonymous unions.

2018-04-02 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. This was committed as r222402. https://reviews.llvm.org/D5997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r329007 - Fix some DenseMap use-after-rehash bugs and hoist MethodVFTableLocation

2018-04-02 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Mon Apr 2 13:00:39 2018 New Revision: 329007 URL: http://llvm.org/viewvc/llvm-project?rev=329007=rev Log: Fix some DenseMap use-after-rehash bugs and hoist MethodVFTableLocation This re-lands r328845 with fixes for crbug.com/827810. The initial motiviation was to hoist

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-04-02 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added inline comments. Comment at: clang-tidy/bugprone/ComparisonInTempFailureRetryCheck.cpp:78 + + diag(RHS.getOperatorLoc(), + "Top-level comparisons should be moved out of TEMP_FAILURE_RETRY"); JonasToth wrote: > You could even

[PATCH] D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY

2018-04-02 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv updated this revision to Diff 140675. george.burgess.iv marked 5 inline comments as done. george.burgess.iv added a comment. Addressed feedback https://reviews.llvm.org/D45059 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt

r329005 - [Attr] [NFC] Revert accidental change from r327405

2018-04-02 Thread Joel E. Denny via cfe-commits
Author: jdenny Date: Mon Apr 2 12:43:34 2018 New Revision: 329005 URL: http://llvm.org/viewvc/llvm-project?rev=329005=rev Log: [Attr] [NFC] Revert accidental change from r327405 Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Modified:

[PATCH] D45178: Fixes errors caused by https://reviews.llvm.org/D44960

2018-04-02 Thread Yuke Liao via Phabricator via cfe-commits
liaoyuke updated this revision to Diff 140672. liaoyuke added a comment. Fix styles. Repository: rC Clang https://reviews.llvm.org/D45178 Files: lib/Basic/VirtualFileSystem.cpp unittests/Basic/VirtualFileSystemTest.cpp Index: unittests/Basic/VirtualFileSystemTest.cpp

[PATCH] D45178: Fixes errors caused by https://reviews.llvm.org/D44960

2018-04-02 Thread Yuke Liao via Phabricator via cfe-commits
liaoyuke created this revision. Herald added subscribers: cfe-commits, mgrang. In https://reviews.llvm.org/D44960, file status check is executed every time a real file system directory iterator is constructed or incremented, and emits an error code. This change list fixes the errors in

[PATCH] D45145: [Driver] Wire up the -f[no-]rtlib-add-rpath flag and tests

2018-04-02 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 140668. phosek added a comment. Thanks for the suggestion, I don't think we even need to rename the function since this already matches the pattern other functions use. Repository: rC Clang https://reviews.llvm.org/D45145 Files:

[PATCH] D45177: CStringChecker, check strlcpy/strlcat

2018-04-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen created this revision. devnexen added reviewers: george.karpenkov, NoQ. Herald added a subscriber: cfe-commits. strlcpy/strlcat are bounded but unlike their strn* counterparts, they can overlap. Repository: rC Clang https://reviews.llvm.org/D45177 Files:

[PATCH] D45176: implement recent "standard-layout" changes

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Herald added subscribers: sunfish, aheejin, dschuff, sanjoy, jfb. DR1672, DR1813, DR1881, DR2120: Implement recent fixes to "standard layout" rules. The new rules say that a standard-layout struct has its first non-static data

[PATCH] D43322: Diagnose cases of "return x" that should be "return std::move(x)" for efficiency

2018-04-02 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. @rsmith ping? Repository: rC Clang https://reviews.llvm.org/D43322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45174: non-zero-length bit-fields should make a class non-empty

2018-04-02 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith created this revision. rsmith added a reviewer: rjmccall. Herald added a subscriber: sanjoy. This implements the rule intended by the standard (see LWG 2358) and the rule presumably intended by the Itanium C++ ABI (see https://github.com/itanium-cxx-abi/cxx-abi/pull/51), and makes Clang

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That seems reasonable. And this summer would still be in time for the next release. Repository: rC Clang https://reviews.llvm.org/D45163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r329001 - Temporarily revert r328404:

2018-04-02 Thread Eric Christopher via cfe-commits
Author: echristo Date: Mon Apr 2 11:33:47 2018 New Revision: 329001 URL: http://llvm.org/viewvc/llvm-project?rev=329001=rev Log: Temporarily revert r328404: commit 519b97132a4c960e8dedbfe4290d86970d92e995 Author: Richard Trieu Date: Sat Mar 24 00:52:44 2018 +

r329000 - Add -fclang-abi-compat=6 flag for upcoming ABI changes.

2018-04-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 2 11:29:44 2018 New Revision: 329000 URL: http://llvm.org/viewvc/llvm-project?rev=329000=rev Log: Add -fclang-abi-compat=6 flag for upcoming ABI changes. Modified: cfe/trunk/include/clang/Basic/LangOptions.h cfe/trunk/lib/Frontend/CompilerInvocation.cpp

r328999 - Add helper to determine if a field is a zero-length bitfield.

2018-04-02 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Apr 2 11:29:43 2018 New Revision: 328999 URL: http://llvm.org/viewvc/llvm-project?rev=328999=rev Log: Add helper to determine if a field is a zero-length bitfield. Modified: cfe/trunk/include/clang/AST/Decl.h cfe/trunk/lib/AST/Decl.cpp

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. So. https://bugs.llvm.org/show_bug.cgi?id=10011 was resolved by https://wg21.link/P0600 (which added `[[nodiscard]]` to `string.empty()` We can do the same for `move`. However, I have been promised a comprehensive paper listing all the (100s?) of places in the

[PATCH] D45145: [Driver] Wire up the -f[no-]rtlib-add-rpath flag and tests

2018-04-02 Thread Pirama Arumuga Nainar via Phabricator via cfe-commits
pirama added a comment. Hi Petr, thanks for the fix (I dropped the ball on this one :( ). Instead of duplicating the checks, does it make sense to fold check into addArchSpecificRPath and rename it to 'addArchSpecificRPathIfRequested' or something similar? Repository: rC Clang

[clang-tools-extra] r328997 - Revert r328932 as it caused Windows and MacOS bot failures.

2018-04-02 Thread Mike Edwards via cfe-commits
Author: sqlbyme Date: Mon Apr 2 11:02:36 2018 New Revision: 328997 URL: http://llvm.org/viewvc/llvm-project?rev=328997=rev Log: Revert r328932 as it caused Windows and MacOS bot failures. http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/43991/ Removed:

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Yeah, actually, I'm second-guessing myself. Maybe this should just be a libc++ / libstdc++ bug. Repository: rC Clang https://reviews.llvm.org/D45163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D44985: [CUDA] Let device-side shared variables be initialized with undef

2018-04-02 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328994: [CUDA] Let device-side shared variables be initialized with undef (authored by yaxunl, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r328994 - [CUDA] Let device-side shared variables be initialized with undef

2018-04-02 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Mon Apr 2 10:38:24 2018 New Revision: 328994 URL: http://llvm.org/viewvc/llvm-project?rev=328994=rev Log: [CUDA] Let device-side shared variables be initialized with undef CUDA shared variable should be initialized with undef. Patch by Greg Rodgers. Revised and lit test

[PATCH] D45120: [coroutines] Add __builtin_coro_noop => llvm.coro.noop

2018-04-02 Thread Gor Nishanov via Phabricator via cfe-commits
GorNishanov closed this revision. GorNishanov added a comment. Committed: https://reviews.llvm.org/rC328993 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328993 91177308-0d34-0410-b5e6-96231b3b80d8 https://reviews.llvm.org/D45120 ___

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. (See also https://bugs.llvm.org/show_bug.cgi?id=10011 for a somewhat related discussion.) Repository: rC Clang https://reviews.llvm.org/D45163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r328993 - [coroutines] Add __builtin_coro_noop => llvm.coro.noop

2018-04-02 Thread Gor Nishanov via cfe-commits
Author: gornishanov Date: Mon Apr 2 10:35:37 2018 New Revision: 328993 URL: http://llvm.org/viewvc/llvm-project?rev=328993=rev Log: [coroutines] Add __builtin_coro_noop => llvm.coro.noop A recent addition to Coroutines TS (https://wg21.link/p0913) adds a pre-defined coroutine noop_coroutine

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. LGTM. I think it wouldn't be unreasonable to ask standard library maintainers to add `[[nodiscard]]` to `std::move`, but it's also not unreasonable for us to special-case some functions. Repository: rC Clang https://reviews.llvm.org/D45163

[PATCH] D44985: [CUDA] Let device-side shared variables be initialized with undef

2018-04-02 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM, thanks. https://reviews.llvm.org/D44985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44985: [CUDA] Let device-side shared variables be initialized with undef

2018-04-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 140640. yaxunl added a comment. Only check attribute. https://reviews.llvm.org/D44985 Files: lib/CodeGen/CGDecl.cpp test/CodeGenCUDA/address-spaces.cu test/CodeGenCUDA/device-var-init.cu Index: test/CodeGenCUDA/device-var-init.cu

[PATCH] D44985: [CUDA] Let device-side shared variables be initialized with undef

2018-04-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:235-240 + if (Ty.getAddressSpace() != LangAS::opencl_local && + !(getLangOpts().CUDA && getLangOpts().CUDAIsDevice && +D.hasAttr())) Init = EmitNullConstant(Ty); else Init =

[PATCH] D44996: [clang-format] Ensure ObjC selectors with 0 args are annotated correctly

2018-04-02 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton marked 2 inline comments as done. benhamilton added inline comments. Comment at: lib/Format/TokenAnnotator.cpp:1347 +} else if (Current.isOneOf(tok::identifier, tok::kw_new) && + Current.Previous && Current.Previous->is(TT_CastRParen) && +

[PATCH] D45169: [clang-format/ObjC] Do not detect "[]" as ObjC method expression

2018-04-02 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak. Herald added subscribers: cfe-commits, klimek. The following C++ code was being detected by `guessLanguage()` as Objective-C: #define FOO(...) auto bar = [] __VA_ARGS__; This was because `[] __VA_ARGS__` is not

[PATCH] D45168: [clang-format/ObjC] Do not insert space after opening brace of ObjC dict literal

2018-04-02 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton created this revision. benhamilton added reviewers: djasper, jolesiak, krasimir. Herald added subscribers: cfe-commits, klimek. https://reviews.llvm.org/D44816 attempted to fix a few cases where `clang-format` incorrectly inserted a space before the closing brace of an Objective-C

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Right. I think it's fair to acknowledge that many data structure unit tests will contain a legitimate use of a user-defined self-assignment without feeling that that disqualifies the warning. Note that the purpose of this kind of breadth testing is just to look for

[PATCH] D44842: Add Parameters to DW_AT_name Attribute of Template Variables

2018-04-02 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. //Ping// Repository: rC Clang https://reviews.llvm.org/D44842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-04-02 Thread Henry Wong via Phabricator via cfe-commits
MTC added a comment. Kindly ping! Repository: rC Clang https://reviews.llvm.org/D44934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

2018-04-02 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 140629. MTC added a comment. > Thank you for your reminding, I overlooked this point. However for > non-concrete character, the symbol value, if we just invalidate the region, > the constraint information of the non-concrete character will be lost. Do we >

[PATCH] D45165: Use llvm::sys::fs::real_path() in clang.

2018-04-02 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: bruno. No expected behavior change. https://reviews.llvm.org/D45165 Files: lib/Basic/FileManager.cpp lib/Frontend/ModuleDependencyCollector.cpp Index: lib/Frontend/ModuleDependencyCollector.cpp

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread David Blaikie via cfe-commits
On Mon, Apr 2, 2018 at 8:05 AM Roman Lebedev via Phabricator < revi...@reviews.llvm.org> wrote: > lebedev.ri added a comment. > > In https://reviews.llvm.org/D44883#1054326, @thakis wrote: > > > In https://reviews.llvm.org/D44883#1048751, @dblaikie wrote: > > > > > Historically Clang's policy on

[PATCH] D44231: [clang-tidy] Check for sizeof that call functions

2018-04-02 Thread Paul Fultz II via Phabricator via cfe-commits
pfultz2 added a comment. Is someone able to merge in my changes? https://reviews.llvm.org/D44231 ___ 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-04-02 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai updated this revision to Diff 140627. HsiangKai retitled this revision from "[DebugInfo] Generate DILabel metadata for labels." to "[DebugInfo] Generate debug information for labels.". HsiangKai edited the summary of this revision. Herald added a subscriber: eraman. Repository: rC

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread Nico Weber via cfe-commits
On Mon, Apr 2, 2018 at 11:05 AM, Roman Lebedev via Phabricator via cfe-commits wrote: > lebedev.ri added a comment. > > In https://reviews.llvm.org/D44883#1054326, @thakis wrote: > > > In https://reviews.llvm.org/D44883#1048751, @dblaikie wrote: > > > > > Historically

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D44883#1054326, @thakis wrote: > In https://reviews.llvm.org/D44883#1048751, @dblaikie wrote: > > > Historically Clang's policy on warnings was, I think, much more > > conservative than it seems to be today. There was a strong desire not

Re: [PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread Nico Weber via cfe-commits
On Mon, Apr 2, 2018 at 10:54 AM, Nico Weber via Phabricator via cfe-commits wrote: > thakis added a comment. > > In https://reviews.llvm.org/D44883#1048751, @dblaikie wrote: > > > Historically Clang's policy on warnings was, I think, much more > > conservative than

[PATCH] D44883: [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded self-assignment (classes)

2018-04-02 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In https://reviews.llvm.org/D44883#1048751, @dblaikie wrote: > Historically Clang's policy on warnings was, I think, much more > conservative than it seems to be today. There was a strong desire not to > implement off-by-default warnings, and to have warnings with an >

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-04-02 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a subscriber: george.karpenkov. zinovy.nis added a comment. Looks like quotes are required. Thanks for pointing! I'll submit a patch for this. пн, 2 апр. 2018 г. в 17:28, Nico Weber via Phabricator < revi...@reviews.llvm.org>: > thakis added a comment. > > Actually, it doesn't

Re: [PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-04-02 Thread Zinovy Nis via cfe-commits
Looks like quotes are required. Thanks for pointing! I'll submit a patch for this. пн, 2 апр. 2018 г. в 17:28, Nico Weber via Phabricator < revi...@reviews.llvm.org>: > thakis added a comment. > > Actually, it doesn't pass on non-Windows either: >

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-04-02 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Actually, it doesn't pass on non-Windows either: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/27665/steps/test/logs/stdio Repository: rL LLVM https://reviews.llvm.org/D44906 ___

[PATCH] D45163: [Sema] -Wunused-value: diagnose unused std::move() call results.

2018-04-02 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: aaron.ballman, rsmith, rtrieu, rjmccall, dblaikie. I have seen such a problem when reviewing https://reviews.llvm.org/D43341. https://godbolt.org/g/aJYcaa #include struct S {}; void test(S a) { std::move(a); }

[PATCH] D44906: [clang-tidy] Define __clang_analyzer__ macro for clang-tidy for compatibility with clang static analyzer

2018-04-02 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. The test added here doesn't pass on Windows, and the change breaks another test on Windows: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/9794 Repository: rL LLVM https://reviews.llvm.org/D44906 ___

[PATCH] D45161: [AST] Add new printing policy to suppress printing template arguments

2018-04-02 Thread Kalle Huttunen via Phabricator via cfe-commits
khuttun created this revision. khuttun added reviewers: sepavloff, alexfh. Herald added a subscriber: cfe-commits. The purpose of this addition is to be able to write AST matchers that match class template member functions by fully qualified name, without the need to explicitly specify the

[PATCH] D45160: [clang-apply-replacements] Make clang-apply-replacements installable

2018-04-02 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis created this revision. Herald added subscribers: cfe-commits, mgorny. Add a new target for install: **install-clang-apply-replacements** So if you need clang-tidy and clang-apply-replacements tools only, you may build and install only these tools: make install-clang-tidy

[PATCH] D43509: [libcxx][cmake] Remove libatomic temporarily from CMAKE_REQUIRED_LIBRARIES when configuring

2018-04-02 Thread Simon Dardis via Phabricator via cfe-commits
sdardis added a comment. Ping. Repository: rCXX libc++ https://reviews.llvm.org/D43509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45149: MallocChecker, adding specific BSD calls

2018-04-02 Thread David CARLIER via Phabricator via cfe-commits
devnexen updated this revision to Diff 140607. devnexen added a comment. Using groups of functions. https://reviews.llvm.org/D45149 Files: lib/StaticAnalyzer/Checkers/MallocChecker.cpp test/Analysis/bsd-malloc.c Index: test/Analysis/bsd-malloc.c

[PATCH] D45152: [MinGW] Add option for disabling looking for a mingw gcc in PATH

2018-04-02 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: include/clang/Driver/Options.td:1735 MetaVarName<"">, Flags<[CC1Option]>; +def ignore_gcc : Joined<["--"], "ignore-gcc">, Flags<[DriverOption]>, + HelpText<"Don't look for gcc for finding a suitable sysroot">;