[PATCH] D55811: [compiler-rt] [sanitizer_common] Fix sha2 interceptors not to use vars in array len

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, vitalybuka. Herald added subscribers: Sanitizers, llvm-commits, dberris, kubamracek. Fix the sha2 interceptor macros to use a constant for array parameter length rather than referencing the extern variable. Since the digest

[PATCH] D55204: Python 2/3 compat - div

2018-12-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349455: Portable Python script across Python version (authored by serge_sans_paille, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang CHANGES SINCE LAST ACTION

r349455 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 00:38:50 2018 New Revision: 349455 URL: http://llvm.org/viewvc/llvm-project?rev=349455=rev Log: Portable Python script across Python version In Python2, division between integer yields an integer, while it yields a float in Python3. Use a combination

Re: r349063 - [CodeComplete] Adhere to LLVM naming style in CodeCompletionTest. NFC

2018-12-18 Thread Yvan Roux via cfe-commits
On Mon, 17 Dec 2018 at 18:34, Ilya Biryukov wrote: > > Hi Yvan, sorry for the inconvenience. > > I believe this is the same as https://llvm.org/PR40033, should be fixed by > r349362 (the build hasn't finished yet). > I'll double check it's fixed tomorrow and make sure to take another look if >

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan updated this revision to Diff 178605. ebevhan added a comment. Use `auto`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 Files: lib/Sema/SemaChecking.cpp test/Sema/format-strings-bitfield-promotion.c

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7725-7726 +return true; + // Look through vector types, since we do default argument promotion for + // those in OpenCL. + if (const ExtVectorType *VecTy =

r349448 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 00:24:06 2018 New Revision: 349448 URL: http://llvm.org/viewvc/llvm-project?rev=349448=rev Log: Portable Python script across Python version Replace `xrange(...)` by either `range(...)` or `list(range(...))` depending on the context. Differential

r349449 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 00:25:25 2018 New Revision: 349449 URL: http://llvm.org/viewvc/llvm-project?rev=349449=rev Log: Portable Python script across Python version ConfigParser module has been renamed as configparser in Python3 Differential Revision:

[PATCH] D55213: Python2/3 compat - print

2018-12-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349454: Portable Python script across Python version (authored by serge_sans_paille, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit:

[PATCH] D55749: [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled

2018-12-18 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349452: [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled (authored by mstorsjo, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55656: [OpenCL] Address space for default class members

2018-12-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: lib/AST/ASTContext.cpp:2781 + + return getAddrSpaceQualType(NewT, Orig.getAddressSpace()); } rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > You're trying to handle a method qualifier, not a type a

r349453 - [unittests] Remove superfluous semicolon, fixing warnings with GCC. NFC.

2018-12-18 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Tue Dec 18 00:36:16 2018 New Revision: 349453 URL: http://llvm.org/viewvc/llvm-project?rev=349453=rev Log: [unittests] Remove superfluous semicolon, fixing warnings with GCC. NFC. Modified: cfe/trunk/unittests/AST/ASTImporterTest.cpp Modified:

r349454 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 00:36:33 2018 New Revision: 349454 URL: http://llvm.org/viewvc/llvm-project?rev=349454=rev Log: Portable Python script across Python version Using from __future__ import print_function it is possible to have a compatible behavior of `print(...)` across

r349452 - [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled

2018-12-18 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Tue Dec 18 00:36:10 2018 New Revision: 349452 URL: http://llvm.org/viewvc/llvm-project?rev=349452=rev Log: [Driver] Automatically enable -munwind-tables if -fseh-exceptions is enabled For targets where SEH exceptions are used by default (on MinGW, only x86_64 so far),

[PATCH] D55804: [analyzer] C++17: Fix leak false positives when an object with destructor is returned from the top frame.

2018-12-18 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. Is there any downsides for using symbolic region for the construction target? For me that would make perfect sense, since this is often modelled by passing the address of the target into the callee. The programmer could do RVO like thing by hand, so modeling

r349447 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 00:22:47 2018 New Revision: 349447 URL: http://llvm.org/viewvc/llvm-project?rev=349447=rev Log: Portable Python script across Python version dict no longer have the `has_key` method in Python3. Instead, one can use the `in` keyword which already works

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-12-18 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. Apart from the comments I think your patch LGTM, but I'll let someone else hav the final say. Comment at: lib/Sema/SemaDecl.cpp:10266 auto *FPT = NewFD->getType()->castAs(); - bool AnyNoexcept = HasNoexcept(FPT->getReturnType()); -

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 4 inline comments as done. kadircet added a comment. Sending out everything related to canonical path at: D55818 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/

[PATCH] D55793: [clang-tidy] Add duplicated access specifier readability check (PR25403)

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/DuplicatedAccessSpecifiersCheck.cpp:21 +void DuplicatedAccessSpecifiersCheck::registerMatchers(MatchFinder *Finder) { + Finder->addMatcher( + cxxRecordDecl(has(accessSpecDecl())) You

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-18 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner updated this revision to Diff 178624. ArnaudBienner added a comment. Herald added a subscriber: arphaman. Update tests broken by this change Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55382/new/ https://reviews.llvm.org/D55382 Files:

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-18 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner reopened this revision. ArnaudBienner added a comment. This revision is now accepted and ready to land. Reopening since this broke some tests. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55382/new/ https://reviews.llvm.org/D55382

[PATCH] D55790: [AST] Add accessSpecs() iterator range for CXXRecordDecl

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D55790#1333664 , @m4tx wrote: > In D55790#1333627 , @riccibruno > wrote: > > > Do you really have to add an iterator for this particular thing ? > > Why not just use

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

2018-12-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Thank you so much for working on this! The lack of a proper documentation is indeed a weak points of the project. I guess it'd be better to generate the entire URI in the tblgen file, and also allow plugins to register their own through `CheckerRegistry`. Sarif

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina updated this revision to Diff 178623. MarinaKalashina set the repository for this revision to rCTE Clang Tools Extra. MarinaKalashina added a comment. Another attempt to update the patch with the following fixes: - empty line before 'Standalone tool' - table columns with '+/-'

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

2018-12-18 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 178641. riccibruno marked an inline comment as done. riccibruno added a comment. Make `OffsetToTrailingObjects` byte sized and aligned to a byte multiple. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55771/new/

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 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 then, thank you for the fix! Would you like me to commit this one for you? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211

[PATCH] D55815: DO NOT SUBMIT. [clangd] A helper Mutex class that reports contention stats

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. Herald added subscribers: cfe-commits, kadircet, jfb, arphaman, jkorous, MaskRay, ioeric. Useful in getting some stats of a contention on a particular mutex. Currently it only reports the sum of wall time taken by all threads waiting on a mutex. Repository:

[PATCH] D55818: [clangd] Unify path canonicalizations in the codebase

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric. There were a few different places where we canonicalized paths, each one had its own flavor. This patch tries to unify them all under one place.

[PATCH] D54187: Add debuginfo-tests that use cdb on Windows

2018-12-18 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. This seems to be stuck. Is there some way we can get incremental progress on this? I'm not very familiar with debug info, but I think it would be a huge win (and somewhat overdue) just to get some very basic tests like rnk's hello.c automated and running continuously. I

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-18 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. LGTM. Any ideas for improvement, @JonasToth? I'd rather have it merged and improve on it later if there are ideas on how to do it better. Comment at: clang-tidy/modernize/UseNodiscardCheck.cpp:32 + // Try to catch both std::function and

[PATCH] D55382: Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-18 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner added a comment. Fixed two tests broken by this change: - test_diagnostics.py: AFAICT we are not testing all warnings here, but just that warnings are emitted correctly. The "+1" didn't seem to be useful, since the warning triggered was about the const char* being converted to an

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added a comment. In D55770#1333271 , @dblaikie wrote: > (from the peanut gallery): Usually what I'd expect here is "reindexing will > occur X milliseconds after a write, covering anything written up until

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the update! We still need to solve the technicality here: could you please upload the diff with full context? See LLVM docs for an example on how this can be done with

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.h:112 + const size_t BuildIndexPeriodMs; + std::atomic SymbolsUpdatedSinceLastIndex; + std::mutex IndexMu; We already have a mutex and cv, maybe get rid of this one signal the CV whenever we

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina added a comment. @ilya-biryukov Thank you for a quick response and sorry for so many iterations. I uploaded a full-context version; hopefully this time it's alright - on my side, it finally looks like a proper full-context diff. CHANGES SINCE LAST ACTION

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 178654. MyDeveloperDay marked 3 inline comments as done. MyDeveloperDay added a comment. Fix review comments - Fix minor spelling mistakes - add additional boost::function unit test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D55437#1333145 , @ilya-biryukov wrote: > Update after investigating with @hokein offline: the `RecursiveASTVisitor` > has custom code to visit lambda parameters and return type, but it fallback > to visiting typelocs when

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. Thanks, that would be great! Hopefully it will work this time. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D17741: adds __FILE_BASENAME__ builtin macro

2018-12-18 Thread Karl-Johan Karlsson via Phabricator via cfe-commits
Ka-Ka added a comment. Ping? Do you think this small lit testcase below work as a testcase for the -ffile-macro-prefix-to-remove option? // RUN: %clang_cc1 -emit-llvm %s -o - -ffile-macro-prefix-to-remove=%s | FileCheck %s char this_file[] = __FILE__; // CHECK: @this_file = global [1 x i8]

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM. The new code looks simpler and it's arguably simpler for the clients, since they'll have a consistent set of callbacks independent of the actual view into the lambda

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina updated this revision to Diff 178647. MarinaKalashina added a comment. Full-context patch CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 Files: docs/clang-tidy/index.rst Index: docs/clang-tidy/index.rst

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/abseil/DurationComparisonCheck.cpp:25 +static bool IsValidMacro(const MatchFinder::MatchResult , + const Expr *expr) { + if (!expr->getBeginLoc().isMacroID()) `expr` doesn't

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 178653. ymandel added a comment. Adjust comments. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D55765 Files: include/clang/Tooling/Tooling.h lib/Tooling/Tooling.cpp

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 178656. MyDeveloperDay added a comment. Remove unused matcher variable CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55433/new/ https://reviews.llvm.org/D55433 Files: clang-tidy/modernize/CMakeLists.txt

[PATCH] D55818: [clangd] Unify path canonicalizations in the codebase

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The change mostly, the only important comment from me is about `toURI`. I believe it would actually have an observable effect in the real world and I'm not sure things won't break after it. Could we avoid changing it and focus only on tweaking the "canonical" path

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178667. hokein marked an inline comment as done. hokein added a comment. Fix the format. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55820/new/ https://reviews.llvm.org/D55820 Files:

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:352 + std::unique_lock Lock(IndexMu); + if (ShouldStop) +break; Is double checking really necessary? I suppose it is for the case that we miss the notification, if that's

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:2416 FunctionProtoTypeLoc Proto = TL.getAsAdjusted(); + if (S->hasExplicitParameters()) { ilya-biryukov wrote: > Could we add a comment on why we can't simply call the

r349489 - [PowerPC] Make no-PIC default to match GCC - CLANG

2018-12-18 Thread Stefan Pintilie via cfe-commits
Author: stefanp Date: Tue Dec 18 07:08:03 2018 New Revision: 349489 URL: http://llvm.org/viewvc/llvm-project?rev=349489=rev Log: [PowerPC] Make no-PIC default to match GCC - CLANG Make -fno-PIC default on PowerPC for Little Endian Linux. Differential Revision: https://reviews.llvm.org/D53384

r349494 - [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via cfe-commits
Author: hokein Date: Tue Dec 18 07:29:12 2018 New Revision: 349494 URL: http://llvm.org/viewvc/llvm-project?rev=349494=rev Log: [AST] Unify the code paths of traversing lambda expressions. Summary: This supposes to be a non-functional change. We have two code paths when traversing lambda

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

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. In D55792#1334291 , @Szelethus wrote: > Thank you so much for working on this! The lack of a proper documentation is > indeed a weak points of the project. Yeah, the more we

[PATCH] D11850: Delay emitting members of dllexport classes until the class is fully parsed (PR23542)

2018-12-18 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added subscribers: belkiss, rnk, aganea. aganea added a comment. Herald added a subscriber: llvm-commits. Cross-referencing PR40006 . It seems to be a different manifestation of this same bug. @hans Could you possibly take a look at the bug

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-18 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 178651. ymandel added a comment. Convert other Twine-typed args to StringRef. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D55765 Files: include/clang/Tooling/Tooling.h

[PATCH] D55823: [analyzer] Fix backward compatibility issue after D53280 'Emit an error for invalid -analyzer-config inputs'

2018-12-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, george.karpenkov. Herald added subscribers: cfe-commits, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun, whisperity. Fix according to the discussion here: D53280

[PATCH] D55433: [clang-tidy] Adding a new modernize use nodiscard checker

2018-12-18 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. In D55433#1334150 , @curdeius wrote: > LGTM. > Any ideas for improvement, @JonasToth? > I'd rather have it merged and improve on it later if there are ideas on how > to do it better. Thanks for the LGTM, as you know I

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: clangd/index/Background.h:112 + const size_t BuildIndexPeriodMs; + std::atomic SymbolsUpdatedSinceLastIndex; + std::mutex IndexMu; kadircet wrote: > We already have a mutex and

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178660. hokein added a comment. Update the patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-lambdas.cpp Index:

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added a comment. Please run script from D55523 over your changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54945/new/ https://reviews.llvm.org/D54945 ___ cfe-commits mailing list

[PATCH] D11850: Delay emitting members of dllexport classes until the class is fully parsed (PR23542)

2018-12-18 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D11850#1334344 , @aganea wrote: > Cross-referencing PR40006 . It > seems to be a different manifestation of this same bug. > > @hans Could you possibly take a look at the bug above

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.h:112 + const size_t BuildIndexPeriodMs; + std::atomic SymbolsUpdatedSinceLastIndex; + std::mutex IndexMu; kadircet wrote: > ioeric wrote: > > kadircet wrote: > > > We already have a mutex

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 178675. kadircet marked 20 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55224/new/ https://reviews.llvm.org/D55224 Files:

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added a subscriber: arphaman. This supposes to be a non-functional change. We have two code paths when traversing lambda expressions: 1. traverse the function proto typeloc when parameters and return type are explicit;

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/AST/RecursiveASTVisitor.h:2416 FunctionProtoTypeLoc Proto = TL.getAsAdjusted(); + if (S->hasExplicitParameters()) { Could we add a comment on why we can't simply call the `TraverseTypeLoc`

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Comment at: lib/Index/IndexBody.cpp:464 + if (DC && isLambdaCallOperator(DC)) { +IndexCtx.handleDecl(D); + } NIT:

[PATCH] D55765: Fix use-after-free bug in Tooling.

2018-12-18 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. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55765/new/ https://reviews.llvm.org/D55765 ___ cfe-commits

[PATCH] D55820: [AST] Unify the code paths of traversing lambda expressions.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349494: [AST] Unify the code paths of traversing lambda expressions. (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D55820?vs=178667=178674#toc Repository: rC

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: clangd/index/Background.h:112 + const size_t BuildIndexPeriodMs; + std::atomic SymbolsUpdatedSinceLastIndex; + std::mutex IndexMu;

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 178676. ioeric marked an inline comment as done. ioeric added a comment. - Add comment about double-check of ShouldStop. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55770/new/ https://reviews.llvm.org/D55770

[PATCH] D55770: [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349496: [clangd] BackgroundIndex rebuilds symbol index periodically. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[clang-tools-extra] r349496 - [clangd] BackgroundIndex rebuilds symbol index periodically.

2018-12-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 18 07:39:33 2018 New Revision: 349496 URL: http://llvm.org/viewvc/llvm-project?rev=349496=rev Log: [clangd] BackgroundIndex rebuilds symbol index periodically. Summary: Currently, background index rebuilds symbol index on every indexed file, which can be inefficient.

[PATCH] D51211: [Sema] Emit -Wformat properly for bitfield promotions.

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman closed this revision. aaron.ballman added a comment. I've commit as r349497, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D51211/new/ https://reviews.llvm.org/D51211 ___ cfe-commits mailing list

r349497 - Emit -Wformat properly for bit-field promotions.

2018-12-18 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Tue Dec 18 07:54:38 2018 New Revision: 349497 URL: http://llvm.org/viewvc/llvm-project?rev=349497=rev Log: Emit -Wformat properly for bit-field promotions. Only explicitly look through integer and floating-point promotion where the result type is actually a promotion,

[PATCH] D55712: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4.

2018-12-18 Thread Paul Robinson via Phabricator via cfe-commits
probinson accepted this revision. probinson added a comment. This revision is now accepted and ready to land. I missed that filcab had said ok internally. Go ahead Pierre. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55712/new/ https://reviews.llvm.org/D55712

[PATCH] D55712: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4.

2018-12-18 Thread pierre gousseau via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349508: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or… (authored by pgousseau, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55654: [clang] [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 178701. mgorny edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55654/new/ https://reviews.llvm.org/D55654 Files: lib/Driver/ToolChains/NetBSD.cpp lib/Driver/ToolChains/NetBSD.h Index:

[PATCH] D55654: [clang] [Driver] [NetBSD] Add -D_REENTRANT when using sanitizers

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked 2 inline comments as done. mgorny added inline comments. Comment at: lib/Driver/ToolChains/NetBSD.cpp:465 + const SanitizerArgs = getSanitizerArgs(); + if (SanArgs.needsAsanRt() || SanArgs.needsHwasanRt() || + SanArgs.needsDfsanRt() || SanArgs.needsLsanRt()

r349501 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 08:04:21 2018 New Revision: 349501 URL: http://llvm.org/viewvc/llvm-project?rev=349501=rev Log: Portable Python script across Python version In Python3, dict.items, dict.keys, dict.values, zip, map and filter no longer return lists, they create

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

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D55792#1334644 , @Szelethus wrote: > Global nit: I guess having both DESC and DOCS as variable/macro arg names is > confusing. Can we instead use DOCSURI/DocsUri? Sure, I'll make that change. > In D55792#1334339

r349506 - [NFC] Fix usage of Builder.insert(new Bitcast...)in CodeGenFunction

2018-12-18 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Tue Dec 18 08:22:21 2018 New Revision: 349506 URL: http://llvm.org/viewvc/llvm-project?rev=349506=rev Log: [NFC] Fix usage of Builder.insert(new Bitcast...)in CodeGenFunction This is exactly a "CreateBitCast", so refactor this to get rid of a 'new'. Note that this

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178688. hokein marked an inline comment as done. hokein added a comment. Fix a nit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp

[PATCH] D55830: [clang] [Basic] Correct description of SanitizerSet.empty()

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: bkramer, samsonov, krytarowski. It seems to have gotten inverted. Repository: rC Clang https://reviews.llvm.org/D55830 Files: include/clang/Basic/Sanitizers.h Index: include/clang/Basic/Sanitizers.h

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-18 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: test/clang-tidy/abseil-duration-comparison.cpp:131 + // We should still transform the expression inside this macro invocation +#define VALUE_IF(v, e) v ? (e) : 0 + int a = VALUE_IF(1, 5 > absl::ToDoubleSeconds(d1));

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-18 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 178680. hwright marked 4 inline comments as done. hwright added a comment. Update tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55784/new/ https://reviews.llvm.org/D55784 Files: clang-tidy/abseil/DurationComparisonCheck.cpp

[clang-tools-extra] r349502 - [clangd] Try to fix buildbot failure after r349496

2018-12-18 Thread Eric Liu via cfe-commits
Author: ioeric Date: Tue Dec 18 08:06:29 2018 New Revision: 349502 URL: http://llvm.org/viewvc/llvm-project?rev=349502=rev Log: [clangd] Try to fix buildbot failure after r349496 Increase timeout from 10ms to 100ms. See http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/27959

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

2018-12-18 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. Thanks, looks great. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55771/new/ https://reviews.llvm.org/D55771

[PATCH] D54945: This commit adds a chapter about clang-tidy integrations

2018-12-18 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/index.rst:262 + +Clang-tidy integrated +- So how about moving this chapter to a separate page and adding a link to it at the top of this document? While certainly useful, the

[PATCH] D55784: [clang-tidy] Update abseil-duration-comparison to handle macro arguments

2018-12-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/abseil-duration-comparison.cpp:131 + // We should still transform the expression inside this macro invocation +#define VALUE_IF(v, e) v ? (e) : 0 + int a = VALUE_IF(1, 5 > absl::ToDoubleSeconds(d1));

[PATCH] D55712: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4.

2018-12-18 Thread pierre gousseau via Phabricator via cfe-commits
pgousseau added a comment. In D55712#1334603 , @probinson wrote: > I missed that filcab had said ok internally. Go ahead Pierre. Will do! Thanks for reviewing. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55712/new/

[PATCH] D55832: [clang] [Driver] Add .hasAnySanitizer() to SanitizerArgs

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, vitalybuka, samsonov, pcc. Add a simple method to query whether any sanitizer was enabled, via SanitizerArgs. This will be used in the NetBSD driver to pass additional definitions that are required by all sanitizers.

[PATCH] D55039: [sema] Warn of mangling change if function parameters are noexcept.

2018-12-18 Thread Matt Davis via Phabricator via cfe-commits
mattd marked an inline comment as not done. mattd added a comment. In D55039#1334195 , @Rakete wrote: > Apart from the comments I think your patch LGTM, but I'll let someone else > hav the final say. Thanks for taking a peek! CHANGES SINCE LAST

r349504 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 08:07:37 2018 New Revision: 349504 URL: http://llvm.org/viewvc/llvm-project?rev=349504=rev Log: Portable Python script across Python version Make scripts more future-proof by importing most __future__ stuff. Differential Revision:

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

2018-12-18 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Global nit: I guess having both DESC and DOCS as variable/macro arg names is confusing. Can we instead use DOCSURI/DocsUri? In D55792#1334339 , @aaron.ballman wrote: > In D55792#1334291

r349503 - Portable Python script across Python version

2018-12-18 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Tue Dec 18 08:07:06 2018 New Revision: 349503 URL: http://llvm.org/viewvc/llvm-project?rev=349503=rev Log: Portable Python script across Python version commands.getoutput has been move to subprocess module in Python3 Differential Revision:

[PATCH] D55205: Python 2/3 compat - commands

2018-12-18 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349503: Portable Python script across Python version (authored by serge_sans_paille, committed by ). Herald added a subscriber: cfe-commits. Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D55818: [clangd] Unify path canonicalizations in the codebase

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 178685. kadircet marked 2 inline comments as done. kadircet added a comment. - Address comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55818/new/ https://reviews.llvm.org/D55818 Files:

[PATCH] D55224: [clangd] Introduce loading of shards within auto-index

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.cpp:259 + // if this thread sees the older version but finishes later. This should + // be rare in practice. + DigestIt.first->second = Hash; ilya-biryukov wrote: > > "should be

[PATCH] D55818: [clangd] Unify path canonicalizations in the codebase

2018-12-18 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 7 inline comments as done. kadircet added inline comments. Comment at: clangd/SourceCode.h:91 +/// possible. +llvm::Expected getCanonicalPath(const FileEntry *F, + const SourceManager ); ilya-biryukov

[PATCH] D55437: [Index] Index declarations in lambda expression.

2018-12-18 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 178687. hokein added a comment. Rebase and simplify the test. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.llvm.org/D55437 Files: lib/Index/IndexBody.cpp test/Index/cxx11-lambdas.cpp Index:

[PATCH] D55828: [clang] [Driver] Disable -faddrsig by default on NetBSD

2018-12-18 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, pcc. Avoid passing -faddrsig by default on NetBSD. This platform is still using old GNU binutils that crashes on executables containing those sections. Repository: rC Clang https://reviews.llvm.org/D55828 Files:

r349508 - [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4.

2018-12-18 Thread Pierre Gousseau via cfe-commits
Author: pgousseau Date: Tue Dec 18 09:03:35 2018 New Revision: 349508 URL: http://llvm.org/viewvc/llvm-project?rev=349508=rev Log: [Driver][PS4] Do not implicitly link against asan or ubsan if -nostdlib or -nodefaultlibs on PS4. NFC for targets other than PS4. Respect -nostdlib and

  1   2   >