[PATCH] D55662: [Sema][ObjC] Do not warn about repeated uses of weak variables when the variables are accessed in an unevaluated context.

2018-12-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D55662#1338766 , @ahatanak wrote: > In D55662#1337141 , @rjmccall wrote: > > > In D55662#1336835 , @ahatanak > > wrote: > > > > > In

[PATCH] D55869: Convert some ObjC retain/release msgSends to runtime calls

2018-12-21 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. It sounds like it's fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55869/new/ https://reviews.llvm.org/D55869 ___ cfe-commits

[PATCH] D55933: [Sema] Do not print default template parameters.

2018-12-21 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: test/SemaCXX/static-assert-cxx17.cpp:109 +template +void foo7() { + static_assert(X()); courbet wrote: > Quuxplusone wrote: > > None of these new test cases actually involve the default template argument. > > > >

[PATCH] D56024: [clang] [Distro] Support detecting Gentoo

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM Comment at: include/clang/Driver/Distro.h:118 } bool IsUbuntu() const { Shall we also introduce the `IsGentoo()` predicate for convenience?

[PATCH] D55981: [gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek added inline comments. Comment at: llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn:6 + +files = [ + "adxintrin.h", Why not just inline this? This variable doesn't seem to be used from anywhere else? CHANGES SINCE LAST ACTION

[PATCH] D55984: [gn build] Embed __TEXT __info_plist section into clang binary on macOS

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55984/new/ https://reviews.llvm.org/D55984 ___ cfe-commits mailing list

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/xray/xray_defs.h:22 +#if !SANITIZER_NETBSD +#define XRAY_TLS_ALIGNAS(x) alignas(x) krytarowski wrote: > I would switch the order, in order to remove unneeded negation. > > ``` > #if SANITIZER_NETBSD > ... > #else

[PATCH] D55853: Ignore ConstantExpr in IgnoreParens

2018-12-21 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Want to stamp this? It's 4pm on the Friday before Christmas, what could go wrong? :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55853/new/ https://reviews.llvm.org/D55853 ___ cfe-commits mailing list

[PATCH] D56033: [CUDA] Treat extern global variable shadows same as regular extern vars.

2018-12-21 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 179387. tra added a comment. Fixed a typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56033/new/ https://reviews.llvm.org/D56033 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGenCUDA/device-stub.cu Index:

[PATCH] D56042: [analyzer] pr38838, pr39976: Fix a crash on emitting diagnostics before destructor.

2018-12-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: dcoughlin, xazax.hun, george.karpenkov, a_sidorin, rnkovacs, mikhail.ramalho, baloghadamsoftware. Herald added subscribers: cfe-commits, dkrupp, donat.nagy, Szelethus, a.sidorin, szepet. All right guys, now this one's weird. This patch looks

r349948 - [AST][NFC] Remove stale comment in CXXRecordDecl::is(Virtually)DerivedFrom.

2018-12-21 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Dec 21 12:23:07 2018 New Revision: 349948 URL: http://llvm.org/viewvc/llvm-project?rev=349948=rev Log: [AST][NFC] Remove stale comment in CXXRecordDecl::is(Virtually)DerivedFrom. The "this" capture was removed in r291939. Modified:

[PATCH] D56012: [clang-tidy] Be more liberal about literal zeroes in abseil checks

2018-12-21 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 179335. hwright marked 6 inline comments as done. hwright added a comment. Add documentation, adjust test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56012/new/ https://reviews.llvm.org/D56012 Files:

[PATCH] D56012: [clang-tidy] Be more liberal about literal zeroes in abseil checks

2018-12-21 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. btw, I think `hasInit` should probably be moved into the core set of matchers at some point. Comment at: clang-tidy/abseil/DurationRewriter.cpp:110 + ast_matchers::internal::Matcher, InnerMatcher) { + return (N < Node.getNumInits() && +

[PATCH] D56012: [clang-tidy] Be more liberal about literal zeroes in abseil checks

2018-12-21 Thread Hyrum Wright via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349953: [clang-tidy] Be more liberal about literal zeroes in abseil checks (authored by hwright, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[clang-tools-extra] r349953 - [clang-tidy] Be more liberal about literal zeroes in abseil checks

2018-12-21 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Fri Dec 21 13:07:11 2018 New Revision: 349953 URL: http://llvm.org/viewvc/llvm-project?rev=349953=rev Log: [clang-tidy] Be more liberal about literal zeroes in abseil checks Summary: Previously, we'd only match on literal floating or integral zeroes, but I've now also

[PATCH] D55979: [gn build] Add build file for clang/lib/ARCMigrate

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55979/new/ https://reviews.llvm.org/D55979 ___ cfe-commits mailing list

[PATCH] D55955: Properly diagnose [[nodiscard]] on the body of a range-based for loop

2018-12-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaStmt.cpp:2846 diag::warn_empty_range_based_for_body); + DiagnoseUnusedExprResult(B); aaron.ballman wrote: > rsmith wrote: > > rsmith wrote: > > > While this looks correct per the

[PATCH] D55853: Ignore ConstantExpr in IgnoreParens

2018-12-21 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. LGTM with `s/ConstantExpr/FullExpr/`. Comment at: clang/lib/AST/Expr.cpp:2550 } +if (ConstantExpr *CE = dyn_cast(E)) { + E = CE->getSubExpr();

[PATCH] D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`

2018-12-21 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In D54565#1339454 , @thakis wrote: > Since I don't know what it means, I don't know if I want a diagnostic for it > :-) Fair point. ;) But the full text of the diagnostic message does say "class template argument deduction

[PATCH] D56022: [AST] Store the arguments of CXXConstructExpr in a trailing array

2018-12-21 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. Comment at: include/clang/AST/ExprCXX.h:1613 + + TypeSourceInfo *TSI = nullptr; + riccibruno wrote: > Changed the name from `Type` since `Type`

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 179352. NoQ added a comment. Add test case `bool_to_nullptr` in `casts.cpp` on which my second attempt crashes but the current code does not. CHANGES SINCE LAST

[PATCH] D56024: [clang] [Distro] Support detecting Gentoo

2018-12-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: sylvestre.ledru, bruno, bkramer, phosek. Add support for distinguishing plain Gentoo distribution, and a unit test for it. This is going to be used to introduce distro-specific customizations in the driver code; most notably, it is going to

[PATCH] D55490: Add dumpMethodDeclOverrides to NodeDumper

2018-12-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire abandoned this revision. steveire added a comment. Abandoning this because it's not really the right approach as it appears in the interface between the generic traverser and the generic node dumper, which it really shouldn't. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55489: Implement dumpFunctionDeclParameters in NodeDumper

2018-12-21 Thread Stephen Kelly via Phabricator via cfe-commits
steveire abandoned this revision. steveire added a comment. Abandoning this because it's not really the right approach as it appears in the interface between the generic traverser and the generic node dumper, which it really shouldn't. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-21 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov accepted this revision. george.karpenkov added a comment. Seems good, but a comment explaining why this is necessary and why the crash follows otherwise would be great. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55875/new/ https://reviews.llvm.org/D55875

r349981 - [CUDA] Treat extern global variable shadows same as regular extern vars.

2018-12-21 Thread Artem Belevich via cfe-commits
Author: tra Date: Fri Dec 21 17:11:09 2018 New Revision: 349981 URL: http://llvm.org/viewvc/llvm-project?rev=349981=rev Log: [CUDA] Treat extern global variable shadows same as regular extern vars. This fixes compiler crash when we attempted to compile this code: extern __device__ int data;

[PATCH] D56022: [AST] Store the arguments of CXXConstructExpr in a trailing array

2018-12-21 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: rjmccall. riccibruno added a project: clang. Herald added a reviewer: shafik. Herald added a subscriber: cfe-commits. Store the arguments of `CXXConstructExpr` in a trailing array. This is very similar to the `CallExpr` case in

[PATCH] D56025: [clang-tidy] add IgnoreMacros option to readability-uppercase-literal-suffix

2018-12-21 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos created this revision. vmiklos added reviewers: JonasToth, alexfh, lebedev.ri. Herald added subscribers: cfe-commits, xazax.hun. And also enable it by default to be consistent with e.g. modernize-use-using. This helps e.g. when running this check on client code where the macro is

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 179355. NoQ added a comment. `// no-crash` and a slightly cleaner test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55875/new/ https://reviews.llvm.org/D55875 Files: lib/StaticAnalyzer/Core/Store.cpp test/Analysis/casts.c

[PATCH] D56025: [clang-tidy] add IgnoreMacros option to readability-uppercase-literal-suffix

2018-12-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/clang-tidy/readability-uppercase-literal-suffix-integer-macro.cpp:2-3 +// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- \ +// RUN: -config="{CheckOptions: [{key:

[PATCH] D55980: [gn build] Add build file for clang/lib/FrontendTool

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55980/new/ https://reviews.llvm.org/D55980 ___ cfe-commits mailing list

[PATCH] D55978: [gn build] Add build files for clang/lib/{ASTMatchers, CrossTU}, clang/lib/StaticAnalyzer/{Checkers, Core, Frontend}

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55978/new/ https://reviews.llvm.org/D55978 ___ cfe-commits mailing list

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349984: [analyzer] pr38668: Do not attempt to cast loaded integers to floats. (authored by dergachev, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r349984 - [analyzer] pr38668: Do not attempt to cast loaded integers to floats.

2018-12-21 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Fri Dec 21 18:06:51 2018 New Revision: 349984 URL: http://llvm.org/viewvc/llvm-project?rev=349984=rev Log: [analyzer] pr38668: Do not attempt to cast loaded integers to floats. This patch is a different approach to landing the reverted r349701. It is expected to have the

[PATCH] D55869: Convert some ObjC retain/release msgSends to runtime calls

2018-12-21 Thread Pete Cooper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349952: Convert some ObjC retain/release msgSends to runtime calls. (authored by pete, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55869/new/

r349952 - Convert some ObjC retain/release msgSends to runtime calls.

2018-12-21 Thread Pete Cooper via cfe-commits
Author: pete Date: Fri Dec 21 13:00:32 2018 New Revision: 349952 URL: http://llvm.org/viewvc/llvm-project?rev=349952=rev Log: Convert some ObjC retain/release msgSends to runtime calls. It is faster to directly call the ObjC runtime for methods such as retain/release instead of sending a

[PATCH] D55869: Convert some ObjC retain/release msgSends to runtime calls

2018-12-21 Thread Pete Cooper via Phabricator via cfe-commits
pete added a comment. In D55869#1339537 , @rjmccall wrote: > It sounds like it's fine. Thanks for the review! Just pushed it as r349952. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55869/new/

[PATCH] D56022: [AST] Store the arguments of CXXConstructExpr in a trailing array

2018-12-21 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 2 inline comments as done. riccibruno added inline comments. Comment at: include/clang/AST/ExprCXX.h:1295 + /// A pointer to the constructor which will be ultimately called. + CXXConstructorDecl *Constructor; + Removed the default member

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-21 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin marked 2 inline comments as done. alexey.lapshin added a comment. will correct all mistakes. please check explanations for the questions. Comment at: include/clang/Basic/AttrDocs.td:2655 + dependence violated. This constant interval(in cycles) between the start

[PATCH] D56025: [clang-tidy] add IgnoreMacros option to readability-uppercase-literal-suffix

2018-12-21 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos updated this revision to Diff 179371. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56025/new/ https://reviews.llvm.org/D56025 Files: clang-tidy/readability/UppercaseLiteralSuffixCheck.cpp clang-tidy/readability/UppercaseLiteralSuffixCheck.h docs/ReleaseNotes.rst

[PATCH] D56025: [clang-tidy] add IgnoreMacros option to readability-uppercase-literal-suffix

2018-12-21 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos marked 2 inline comments as done. vmiklos added inline comments. Comment at: test/clang-tidy/readability-uppercase-literal-suffix-integer-macro.cpp:2-3 +// RUN: %check_clang_tidy %s readability-uppercase-literal-suffix %t -- \ +// RUN: -config="{CheckOptions: [{key:

[PATCH] D54565: Introduce `-Wctad` as a subgroup of `-Wc++14-compat`

2018-12-21 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. >> I think there is a case to be made for warning on this specific language >> feature, because using CTAD on class templates that weren't designed for it >> is dangerous and creates source compatibility problems for future changes to >> that library. > > Personally I

[PATCH] D56033: [CUDA] Treat extern global variable shadows same as regular extern vars.

2018-12-21 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349981: [CUDA] Treat extern global variable shadows same as regular extern vars. (authored by tra, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

r349949 - [Sema][NFC] Fix a Wimplicit-fallthrough warning in CheckSpecializationInstantiationRedecl

2018-12-21 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Dec 21 12:38:06 2018 New Revision: 349949 URL: http://llvm.org/viewvc/llvm-project?rev=349949=rev Log: [Sema][NFC] Fix a Wimplicit-fallthrough warning in CheckSpecializationInstantiationRedecl All cases are covered so add an llvm_unreachable. NFC. Modified:

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2018-12-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested review of this revision. aaron.ballman added a comment. There's enough churn based on the review feedback that this should probably have a second round of review just to be sure. Comment at: lib/AST/Expr.cpp:2281-2286 + // If there is no

[PATCH] D56012: [clang-tidy] Be more liberal about literal zeroes in abseil checks

2018-12-21 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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56012/new/ https://reviews.llvm.org/D56012 ___ cfe-commits mailing

r349955 - Switch from static_cast<> to cast<>, update identifier for coding conventions; NFC.

2018-12-21 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Fri Dec 21 13:11:36 2018 New Revision: 349955 URL: http://llvm.org/viewvc/llvm-project?rev=349955=rev Log: Switch from static_cast<> to cast<>, update identifier for coding conventions; NFC. Modified: cfe/trunk/lib/Sema/SemaStmt.cpp Modified:

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D55878#1339098 , @emaste wrote: > I think the arch-change (switching from a whitelist to a MIPS blacklist) is > reasonable. What is the motivation for dropping `DT_HASH`, just binary size > reduction? Yes. It saves a few

[PATCH] D56033: [CUDA] Treat extern global variable shadows same as regular extern vars.

2018-12-21 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added a reviewer: jlebar. Herald added subscribers: bixia, sanjoy. This fixes compiler crash when we attempted to compile this code: extern __device__ int data; __device__ int data = 1; https://reviews.llvm.org/D56033 Files:

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 179379. NoQ added a comment. Add a comment. I guess it doesn't really matter why does this lead to a crash. The symbol itself is well-formed, but we probably don't support it yet in some place, and hopefully (but not necessarily) `CastRetrievedVal` is the only

[PATCH] D56033: [CUDA] Treat extern global variable shadows same as regular extern vars.

2018-12-21 Thread Justin Lebar via Phabricator via cfe-commits
jlebar accepted this revision. jlebar added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/CodeGenCUDA/device-stub.cu:51 +// external device-side variables with definitiions should generate +// definitions for the shadows.

[PATCH] D55875: [analyzer] pr38668: RegionStore: Do not attempt to cast loaded values of non-scalar types.

2018-12-21 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 179389. NoQ added a comment. Herald added a subscriber: jfb. Add a denote - express test. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55875/new/ https://reviews.llvm.org/D55875 Files: lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp

[PATCH] D55933: [Sema] Do not print default template parameters.

2018-12-21 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked 6 inline comments as done. courbet added inline comments. Comment at: lib/AST/TypePrinter.cpp:173 + // information about whether default template parameters were actually + // written. + switch (QT.getTypePtr()->getTypeClass()) { Quuxplusone

r349894 - Revert rL349876 from cfe/trunk: [analyzer] Perform escaping in RetainCountChecker on type mismatch even for inlined functions

2018-12-21 Thread Simon Pilgrim via cfe-commits
Author: rksimon Date: Fri Dec 21 02:11:23 2018 New Revision: 349894 URL: http://llvm.org/viewvc/llvm-project?rev=349894=rev Log: Revert rL349876 from cfe/trunk: [analyzer] Perform escaping in RetainCountChecker on type mismatch even for inlined functions The fix done in D55465 did not

[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'

2018-12-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: hokein. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. Only run completion when we were trigerred on '->' and '::', otherwise send an error code in return. To avoid automatically invoking completions in

[PATCH] D55710: add pragmas to control Software Pipelining optimisation

2018-12-21 Thread Alexey Lapshin via Phabricator via cfe-commits
alexey.lapshin updated this revision to Diff 179248. alexey.lapshin added a comment. put a better link to doc CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55710/new/ https://reviews.llvm.org/D55710 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

[PATCH] D55865: [ObjC] Add a new attribute to opt-out of implicit callee retain/release in ARC

2018-12-21 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3783 +parameters or local variables in ARC mode. When applied to parameters, it causes +clang to omit the implicit calls to objc_retain and objc_release on function +entry and exit respectivly.

[clang-tools-extra] r349891 - Fix warning about unused variable [NFC]

2018-12-21 Thread Bjorn Pettersson via cfe-commits
Author: bjope Date: Fri Dec 21 00:51:04 2018 New Revision: 349891 URL: http://llvm.org/viewvc/llvm-project?rev=349891=rev Log: Fix warning about unused variable [NFC] Modified: clang-tools-extra/trunk/clang-tidy/readability/SimplifyBooleanExprCheck.cpp Modified:

[PATCH] D53818: [ASTImporter] Changed use of Import to Import_New in ASTImporter.

2018-12-21 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 179249. balazske added a comment. Rebase. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53818/new/ https://reviews.llvm.org/D53818 Files: include/clang/AST/ASTImporter.h lib/AST/ASTImporter.cpp Index:

[clang-tools-extra] r349893 - [clangd] Cleanup syntax errors in the test, NFC.

2018-12-21 Thread Haojian Wu via cfe-commits
Author: hokein Date: Fri Dec 21 01:32:49 2018 New Revision: 349893 URL: http://llvm.org/viewvc/llvm-project?rev=349893=rev Log: [clangd] Cleanup syntax errors in the test, NFC. Modified: clang-tools-extra/trunk/unittests/clangd/CodeCompleteTests.cpp

[PATCH] D55994: [clangd] Check preceding char when completion triggers on ':' or '>'

2018-12-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. This still needs tests, will add them before committing the change. However, the implementation should be good for review. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55994/new/ https://reviews.llvm.org/D55994

[PATCH] D54589: [clang][UBSan] Sanitization for alignment assumptions.

2018-12-21 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 179272. lebedev.ri added a comment. Rebased, NFC. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54589/new/ https://reviews.llvm.org/D54589 Files: docs/ReleaseNotes.rst docs/UndefinedBehaviorSanitizer.rst

[PATCH] D55916: [clang] Replace getOS() == llvm::Triple::*BSD with isOS*BSD() [NFCI]

2018-12-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. No problem. I'm sorry about my initial mistake. Apparently it slipped me even though I've double checked it originally. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55916/new/ https://reviews.llvm.org/D55916

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-12-21 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp updated this revision to Diff 179277. dkrupp marked an inline comment as done. dkrupp added a comment. All comments fixed. I also added the handling of redundancy comparison of sizeof(..), alignof() operators. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55125/new/

[PATCH] D55982: [OPENMP] Add support for explicit mapping of classes using 'this' pointer

2018-12-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55982/new/ https://reviews.llvm.org/D55982 ___ cfe-commits

r349904 - [Sema][NFC] Remove some unnecessary calls to getASTContext.

2018-12-21 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Dec 21 06:35:24 2018 New Revision: 349904 URL: http://llvm.org/viewvc/llvm-project?rev=349904=rev Log: [Sema][NFC] Remove some unnecessary calls to getASTContext. The AST context is already easily available. NFC. Modified: cfe/trunk/lib/Sema/SemaChecking.cpp

[PATCH] D55891: [compiler-rt] [xray] [tests] Detect and handle missing LLVMTestingSupport gracefully

2018-12-21 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349899: [xray] [tests] Detect and handle missing LLVMTestingSupport gracefully (authored by mgorny, committed by ). Herald added a subscriber: delcypher. Changed prior to commit:

r349901 - [AST][NFC] Pass the AST context to one of the ctor of DeclRefExpr.

2018-12-21 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Dec 21 06:10:18 2018 New Revision: 349901 URL: http://llvm.org/viewvc/llvm-project?rev=349901=rev Log: [AST][NFC] Pass the AST context to one of the ctor of DeclRefExpr. All of the other constructors already take a reference to the AST context. This avoids calling

[PATCH] D55125: [clang-tidy] Fix a false positive in misc-redundant-expression check

2018-12-21 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp marked 13 inline comments as done. dkrupp added a comment. Thanks for your comments. I fixed them all. I also added the handling of redundant sizeof() and alignof() operators on the way. Please check if OK now... Comment at:

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, dberris, vitalybuka. Herald added subscribers: Sanitizers, llvm-commits. Disable enforcing alignas() for structs that are used as thread_local data on NetBSD. The NetBSD ld.so implementation is buggy and does not enforce correct

[PATCH] D55981: [gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers

2018-12-21 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 179404. thakis marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55981/new/ https://reviews.llvm.org/D55981 Files: llvm/utils/gn/secondary/BUILD.gn llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn

[PATCH] D55981: [gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers

2018-12-21 Thread Nico Weber via Phabricator via cfe-commits
thakis marked 2 inline comments as done. thakis added inline comments. Comment at: llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn:6 + +files = [ + "adxintrin.h", phosek wrote: > Why not just inline this? This variable doesn't seem to be used from anywhere

[PATCH] D56044: [Driver] Support object files in addition to static and shared libraries in compiler-rt

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: echristo. Herald added subscribers: cfe-commits, atanasyan, jrtc27, dberris, sdardis. This change introduces support for object files in addition to static and shared libraries which were already supported which requires changing the type of

[PATCH] D55981: [gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers

2018-12-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349991: [gn build] Add build files for clang, clang-offload-bundler, and… (authored by nico, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55984: [gn build] Embed __TEXT __info_plist section into clang binary on macOS

2018-12-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349992: [gn build] Embed __TEXT __info_plist section into clang binary on macOS (authored by nico, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D56043: [Driver] Don't pass default value to getCompilerRTArgString

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added a reviewer: echristo. Herald added a subscriber: cfe-commits. Using static library is already a default. This makes it easier to change the parameter type in the future. Repository: rC Clang https://reviews.llvm.org/D56043 Files:

[PATCH] D55980: [gn build] Add build file for clang/lib/FrontendTool

2018-12-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349988: [gn build] Add build file for clang/lib/FrontendTool (authored by nico, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55981: [gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers

2018-12-21 Thread Petr Hosek via Phabricator via cfe-commits
phosek accepted this revision. phosek added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55981/new/ https://reviews.llvm.org/D55981 ___ cfe-commits mailing list

[PATCH] D55979: [gn build] Add build file for clang/lib/ARCMigrate

2018-12-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349987: [gn build] Add build file for clang/lib/ARCMigrate (authored by nico, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55978: [gn build] Add build files for clang/lib/{ASTMatchers, CrossTU}, clang/lib/StaticAnalyzer/{Checkers, Core, Frontend}

2018-12-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349986: [gn build] Add build files for clang/lib/{ASTMatchers,CrossTU}… (authored by nico, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D56012: Be more liberal about literal zeroes in abseil checks

2018-12-21 Thread Hyrum Wright via Phabricator via cfe-commits
hwright created this revision. hwright added reviewers: aaron.ballman, JonasToth, alexfh, hokein. hwright added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. Previously, we'd only match on literal floating or integral zeroes, but I've now also learned that some users

[PATCH] D56012: [clang-tidy] Be more liberal about literal zeroes in abseil checks

2018-12-21 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: test/clang-tidy/abseil-duration-factory-scale.cpp:3 +#include #include "absl/time/time.h" cstdint, please. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D55949: Correctly handle function pointers returning a type marked nodiscard

2018-12-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 179318. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Updated based on review feedback. Moved `FunctionDecl::hasUnusedResultAttr()` and `FunctionDecl::getUnusedResultAttr()` to `CallExpr` to reduce logic duplication

[PATCH] D55955: Properly diagnose [[nodiscard]] on the body of a range-based for loop

2018-12-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added inline comments. Comment at: lib/Sema/SemaStmt.cpp:2846 diag::warn_empty_range_based_for_body); + DiagnoseUnusedExprResult(B); rsmith wrote: > rsmith wrote: > > While

[PATCH] D55878: [Driver] Use --hash-style=gnu instead of both on FreeBSD

2018-12-21 Thread Ed Maste via Phabricator via cfe-commits
emaste added a comment. I think the arch-change (switching from a whitelist to a MIPS blacklist) is reasonable. What is the motivation for dropping `DT_HASH`, just binary size reduction? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55878/new/

r349910 - [AST] Store the callee and argument expressions of CallExpr in a trailing array.

2018-12-21 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Dec 21 07:20:32 2018 New Revision: 349910 URL: http://llvm.org/viewvc/llvm-project?rev=349910=rev Log: [AST] Store the callee and argument expressions of CallExpr in a trailing array. Since CallExpr::setNumArgs has been removed, it is now possible to store the callee

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: lib/xray/xray_basic_logging.cc:58 -struct alignas(64) ThreadLocalData { +struct +/* TLD is not aligned properly on NetBSD, resulting in segfault */ Can we introduce a macro like: ``` #if SANITIZER_NETBSD #define

[PATCH] D56006: [AST] Fix a -Wimplicit-fallthrough warning in ScanfFormatString.cpp

2018-12-21 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: hans. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. This is showing up with some bots (eg

[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

2018-12-21 Thread vit9696 via Phabricator via cfe-commits
vit9696 added a comment. Ok, I found the fix for the first crash that landed in 8.0 trunk. It works fine for me if backported to 7.0.1: https://reviews.llvm.org/D50461 Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D49754/new/ https://reviews.llvm.org/D49754

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked an inline comment as done. mgorny added inline comments. Comment at: lib/xray/xray_basic_logging.cc:58 -struct alignas(64) ThreadLocalData { +struct +/* TLD is not aligned properly on NetBSD, resulting in segfault */ krytarowski wrote: > Can we

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: lib/xray/xray_basic_logging.cc:58 -struct alignas(64) ThreadLocalData { +struct +/* TLD is not aligned properly on NetBSD, resulting in segfault */ krytarowski wrote: > mgorny wrote: > > krytarowski wrote: > > >

[PATCH] D55771: [AST] Store the callee and argument expressions of CallExpr in a trailing array.

2018-12-21 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349910: [AST] Store the callee and argument expressions of CallExpr in a trailing array. (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski added inline comments. Comment at: lib/xray/xray_basic_logging.cc:58 -struct alignas(64) ThreadLocalData { +struct +/* TLD is not aligned properly on NetBSD, resulting in segfault */ mgorny wrote: > krytarowski wrote: > > Can we introduce a macro

[PATCH] D49754: Add -m(no-)spe, and e500 CPU definitions and support to clang

2018-12-21 Thread John Paul Adrian Glaubitz via Phabricator via cfe-commits
glaubitz added a comment. In D49754#1339161 , @vit9696 wrote: > Ok, I found the fix for the first crash that landed in 8.0 trunk. It works > fine for me if backported to 7.0.1: > https://reviews.llvm.org/D50461 That's awesome, thanks so much for

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 179297. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56000/new/ https://reviews.llvm.org/D56000 Files: lib/xray/xray_basic_logging.cc lib/xray/xray_defs.h lib/xray/xray_fdr_logging.cc Index: lib/xray/xray_fdr_logging.cc

[PATCH] D56000: [compiler-rt] [xray] Disable alignas() for thread_local objects on NetBSD

2018-12-21 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked 3 inline comments as done. mgorny added a comment. Updated as requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56000/new/ https://reviews.llvm.org/D56000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r349930 - [clang-tidy] Add export-fixes flag to clang-tidy-diff

2018-12-21 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Fri Dec 21 09:25:27 2018 New Revision: 349930 URL: http://llvm.org/viewvc/llvm-project?rev=349930=rev Log: [clang-tidy] Add export-fixes flag to clang-tidy-diff Differential Revision: https://reviews.llvm.org/D55848 Modified:

[PATCH] D55848: [clang-tidy] Add export-fixes flag to clang-tidy-diff

2018-12-21 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349930: [clang-tidy] Add export-fixes flag to clang-tidy-diff (authored by juliehockett, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55792: Allow direct navigation to static analysis checker documentation through SARIF exports

2018-12-21 Thread Phil Camp via Phabricator via cfe-commits
FlameTop added a comment. I'm afraid we are seeing a build failure here on our local Windows checking MSVC build. Unfortunately I cannot find a public buildbot that uses the exact configuration that causes the assertion. The assertion we are seeing is Assertion failed: isa(Val) && "cast()

r349933 - [Sema][NFC] Fix Wimplicit-fallthrough warning in getCursorKindForDecl

2018-12-21 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Fri Dec 21 09:52:13 2018 New Revision: 349933 URL: http://llvm.org/viewvc/llvm-project?rev=349933=rev Log: [Sema][NFC] Fix Wimplicit-fallthrough warning in getCursorKindForDecl All cases are covered so add an llvm_unreachable. NFC. Modified:

  1   2   >