[PATCH] D58880: [WIP] [Looking for API feedback] [clangd] Type hierarchy subtypes

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge added a comment. In D58880#1422494 , @kadircet wrote: > Hi Nathan, > > I would also suggest splitting up current changes so that we can start > reviewing them, which might result in other changes in your planned changes > and help reduce

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/index/Index.h:25 +enum class RelationKind { Subtype }; + One thing I'm wondering about is: would it be better to just use `clang::index::SymbolRole`

[PATCH] D59407: [clangd] Add RelationSlab

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Herald added a project: clang. RelationSlab is a new index data structure, similar to SymbolSlab and RefSlab. RelationSlab stores relations

[PATCH] D59406: [analyzer] Teach scan-build to find /usr/bin/clang when installed in /usr/local/bin/

2019-03-14 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin created this revision. dcoughlin added a reviewer: NoQ. Herald added subscribers: cfe-commits, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, szepet, baloghadamsoftware, xazax.hun. Herald added a project: clang. Change scan-build to support the scenario where

r356231 - Remove an assert in template pack deduction during nested instantiation.

2019-03-14 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Thu Mar 14 21:26:02 2019 New Revision: 356231 URL: http://llvm.org/viewvc/llvm-project?rev=356231=rev Log: Remove an assert in template pack deduction during nested instantiation. Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2019-03-14 Thread Andy Zhang via Phabricator via cfe-commits
axzhang updated this revision to Diff 190775. axzhang added a comment. Make fixes to the `UseLegacyFunction` option, renaming to `IgnoreListInit`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55044/new/ https://reviews.llvm.org/D55044 Files: clang-tidy/abseil/AbseilTidyModule.cpp

r356228 - Add missing override specifier [NFC]

2019-03-14 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Thu Mar 14 19:30:07 2019 New Revision: 356228 URL: http://llvm.org/viewvc/llvm-project?rev=356228=rev Log: Add missing override specifier [NFC] This should fix a -Winconsistent-missing-override warning that is only visible when Z3 is enabled. Modified:

[PATCH] D59402: Fix-it hints for -Wmissing-{prototypes,variable-declarations}

2019-03-14 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added inline comments. Comment at: test/Sema/warn-missing-prototypes.c:7 int f(int x) { return x; } // expected-warning{{no previous prototype for function 'f'}} +// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:1-[[@LINE-1]]:1}:"static " Maybe there

[PATCH] D59402: Fix-it hints for -Wmissing-{prototypes,variable-declarations}

2019-03-14 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert created this revision. aaronpuchert added reviewers: bkramer, efriedma, rsmith. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. I've found that most often the proper way to fix this warning is to add `static`, because if the code otherwise compiles

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190767. jdoerfert marked 4 inline comments as done. jdoerfert added a comment. Add ident_t* to the interface functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:100 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(bool UseSPMDMode, + bool RequiresOMPRuntime, jdoerfert

[PATCH] D58367: [analyzer] NFC: Improve upon the concept of BugReporterVisitor.

2019-03-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ marked an inline comment as done. NoQ added a comment. In D58367#1425922 , @Szelethus wrote: > Would `NoteTag`s be displayed in a dumped exploded graph? That's a great question. Tags themselves are always printed out, together with their

[PATCH] D59123: [analyzer] RetainCount: Fix a crash when a function follows retain/autorelease naming convention but takes no arguments.

2019-03-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356223: [analyzer] RetainCount: A function isnt a CFRetain if it takes no arguments. (authored by dergachev, committed by ). Changed prior to commit:

r356223 - [analyzer] RetainCount: A function isn't a CFRetain if it takes no arguments.

2019-03-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 14 17:26:17 2019 New Revision: 356223 URL: http://llvm.org/viewvc/llvm-project?rev=356223=rev Log: [analyzer] RetainCount: A function isn't a CFRetain if it takes no arguments. Don't crash when a function has a name that starts with "CF" and ends with "Retain" but

[PATCH] D59054: [analyzer] C++17: PR40022: Support aggregate initialization with compound values in presence of base classes.

2019-03-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356222: [analyzer] Support C++17 aggregates with bases without constructors. (authored by dergachev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior

r356222 - [analyzer] Support C++17 aggregates with bases without constructors.

2019-03-14 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Thu Mar 14 17:22:59 2019 New Revision: 356222 URL: http://llvm.org/viewvc/llvm-project?rev=356222=rev Log: [analyzer] Support C++17 aggregates with bases without constructors. RegionStore now knows how to bind a nonloc::CompoundVal that represents the value of an

[PATCH] D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files.

2019-03-14 Thread Yan Zhang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356220: Fixed global constant/variable naming check on C++ class for ObjC++ files. (authored by Wizard, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository:

[clang-tools-extra] r356220 - Fixed global constant/variable naming check on C++ class for ObjC++ files.

2019-03-14 Thread Yan Zhang via cfe-commits
Author: wizard Date: Thu Mar 14 17:17:41 2019 New Revision: 356220 URL: http://llvm.org/viewvc/llvm-project?rev=356220=rev Log: Fixed global constant/variable naming check on C++ class for ObjC++ files. Subscribers: cfe-commits Tags: #clang Differential Revision:

[PATCH] D55683: [analyzer] Tests for scan-build?

2019-03-14 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ planned changes to this revision. NoQ added a comment. Herald added a subscriber: Charusso. Herald added a project: clang. This doesn't seem to work anymore. Also why did i even use `$PATH`? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55683/new/

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 190755. nridge marked an inline comment as done. nridge added a comment. Address latest review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56370/new/ https://reviews.llvm.org/D56370 Files:

[PATCH] D56370: [clangd] Add support for type hierarchy (super types only for now)

2019-03-14 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked 7 inline comments as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.h:62 +/// Find the record type references at \p Pos. +const CXXRecordDecl *findRecordTypeAt(ParsedAST , Position Pos); + ilya-biryukov wrote: > This

[PATCH] D59394: [Sema] De-duplicate some availability checking logic

2019-03-14 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. This revision is now accepted and ready to land. I can confirm this fixed my original problem. It's also close to the patch I attempted writing myself earlier this week -- but this one is better of course. Repository: rC Clang CHANGES

[PATCH] D59283: Fixed global constant/variable naming check on C++ class for ObjC++ files.

2019-03-14 Thread Yan Zhang via Phabricator via cfe-commits
Wizard updated this revision to Diff 190750. Wizard added a comment. add new line Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59283/new/ https://reviews.llvm.org/D59283 Files: clang-tidy/google/GlobalVariableDeclarationCheck.cpp

[PATCH] D59394: [Sema] De-duplicate some availability checking logic

2019-03-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington created this revision. erik.pilkington added reviewers: rsmith, aaron.ballman, ldionne, dexonsmith. Herald added subscribers: jdoerfert, jkorous. Herald added a project: clang. Right now, we emit unavailable errors for calls to functions during overload resolution, and for

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-03-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Why is this needed for index-while-building? My mental model for index-while-building is that that streams out build index metadata as part of the regular compile. Why does that require watching directories? CHANGES SINCE LAST ACTION

[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher

2019-03-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous updated this revision to Diff 190744. jkorous added a comment. Remove duplicate comment CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58418/new/ https://reviews.llvm.org/D58418 Files: clang/include/clang/DirectoryWatcher/DirectoryWatcher.h clang/lib/CMakeLists.txt

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 

2019-03-14 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore added a comment. In D59336#1429564 , @aaron.ballman wrote: > This is missing test cases that demonstrate the behavior is what we expect it > to be for ObjC++ code vs C++ code. Added tests for Objective-C and Objective-C++. Repository:

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 

2019-03-14 Thread Stephane Moore via Phabricator via cfe-commits
stephanemoore updated this revision to Diff 190742. stephanemoore added a comment. Add google-runtime-int tests for Objective-C and Objective-C++. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59336/new/ https://reviews.llvm.org/D59336 Files:

[PATCH] D54881: [clang-format] Prevent Clang-Format from editing leading whitespace on lines outside of the format range

2019-03-14 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Still waiting feedback on this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54881/new/ https://reviews.llvm.org/D54881 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D40988: Clang-format: add finer-grained options for putting all arguments on one line

2019-03-14 Thread Russell McClellan via Phabricator via cfe-commits
russellmcc added a comment. Bump! Still looking for help here - thanks for the consideration. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D40988/new/ https://reviews.llvm.org/D40988 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-14 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 190740. modocache added a comment. OK, I've responded to all your review comments -- thank you! Please give this another look when you get a chance. I would like to emit note diagnostics pointing to the catch blocks, but I've left that as a FIXME for now.

[PATCH] D58404: [clang-format] Add basic support for formatting C# files

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 190737. MyDeveloperDay added a comment. Remove non related clang-format changes run git clang-format Add a Microsoft style (trying to match most closely the more traditional Microsoft style used for C#) This will allow, CSharp to be added to the

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 3 inline comments as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:100 +/// +EXTERN int8_t __kmpc_target_region_kernel_init(bool UseSPMDMode, + bool

[PATCH] D59387: Make getFullyQualifiedName qualify both the pointee and class type for member ptr types

2019-03-14 Thread Sterling Augustine via Phabricator via cfe-commits
saugustine accepted this revision. saugustine added a comment. This revision is now accepted and ready to land. This looks correct to me, thanks for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59387/new/ https://reviews.llvm.org/D59387

r356208 - Reland the rest of "Add AIX Target Info"

2019-03-14 Thread Jason Liu via cfe-commits
Author: jasonliu Date: Thu Mar 14 14:54:30 2019 New Revision: 356208 URL: http://llvm.org/viewvc/llvm-project?rev=356208=rev Log: Reland the rest of "Add AIX Target Info" llvm-svn 356197 relanded previously failing test case max_align.c. This commit will reland the rest of llvm-svn 356060

[PATCH] D59388: Basic: Return a reference from FileManager::getVirtualFileSystem, NFC

2019-03-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. dexonsmith added reviewers: arphaman, Bigcheese, bruno. Herald added subscribers: jdoerfert, kadircet, jkorous, ioeric. Herald added a reviewer: martong. Herald added a reviewer: shafik. FileManager constructs a VFS in its constructor if it isn't passed one, and

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// jdoerfert wrote: > ABataev wrote: > > jdoerfert wrote: > > > ABataev wrote: > > > > jdoerfert wrote: > >

[PATCH] D59387: Make getFullyQualifiedName qualify both the pointee and class type for member ptr types

2019-03-14 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer created this revision. bkramer added reviewers: saugustine, ilya-biryukov. Herald added a subscriber: jlebar. Herald added a project: clang. We already handle pointers and references, member ptrs are just another special case. Fixes PR40732. Repository: rG LLVM Github Monorepo

[PATCH] D59377: Frontend: Remove CompilerInstance::VirtualFileSystem, NFC

2019-03-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith updated this revision to Diff 190726. dexonsmith added a comment. I slightly simplified the code for CompilerInstance::createFileManager (replaced with an `assert`), since I noticed that FileManager always constructs its own VFS if it isn't passed one. CHANGES SINCE LAST ACTION

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-14 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 190727. modocache added a comment. Remove unused function parameter. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59076/new/ https://reviews.llvm.org/D59076 Files: include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D59076: [coroutines][PR40978] Emit error for co_yield within catch block

2019-03-14 Thread Brian Gesiak via Phabricator via cfe-commits
modocache updated this revision to Diff 190718. modocache added a comment. Thank you for the reviews! This revision fixes the nested try/catch behavior. I still need to modify this such that semantic analysis continues for the rest of the function body. Repository: rC Clang CHANGES SINCE

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190717. jdoerfert marked 4 inline comments as done. jdoerfert added a comment. Replace more char* with void* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files:

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// ABataev wrote: > jdoerfert wrote: > > ABataev wrote: > > >

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D58514#1429758 , @wuhao5 wrote: > > Can I ask why you want a weak reference to a block in the first place? It > > seems basically useless — blocks can certainly appear in reference cycles, > > but I don't know why you'd

[PATCH] D58797: [Sema] Add some compile time _FORTIFY_SOURCE diagnostics

2019-03-14 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. This LGTM; feel free to submit after Aaron stamps this. Thanks again! Comment at: clang/lib/Sema/SemaExpr.cpp:5929 +checkFortifiedBuiltinMemoryFunction(FDecl, TheCall); + erik.pilkington wrote: > george.burgess.iv

r356198 - [OPENMP]Fix crash for the ordered(n) clause.

2019-03-14 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Thu Mar 14 13:36:00 2019 New Revision: 356198 URL: http://llvm.org/viewvc/llvm-project?rev=356198=rev Log: [OPENMP]Fix crash for the ordered(n) clause. If the doacross lop construct is used and the loop counter is declare outside of the loop, the compiler might crash trying

r356197 - Reland part of "Add AIX Target Info"

2019-03-14 Thread Jason Liu via cfe-commits
Author: jasonliu Date: Thu Mar 14 13:27:39 2019 New Revision: 356197 URL: http://llvm.org/viewvc/llvm-project?rev=356197=rev Log: Reland part of "Add AIX Target Info" This patch reland the test case max_align.c which is failing at Windows and PS4 platform in the previous commit. Differential

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// jdoerfert wrote: > ABataev wrote: > > jdoerfert wrote: > > > ABataev wrote: > > > > All exported

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-14 Thread Anton Afanasyev via Phabricator via cfe-commits
anton-afanasyev marked 5 inline comments as done. anton-afanasyev added inline comments. Comment at: clang/lib/Parse/ParseAST.cpp:172 + { +llvm::TimeTraceScope scope("Backend", ""); +Consumer->HandleTranslationUnit(S.getASTContext()); rnk wrote: > I

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: openmp/libomptarget/deviceRTLs/common/target_region.h:27 + +/// The target region _kernel_ interface for GPUs +/// ABataev wrote: > jdoerfert wrote: > > ABataev wrote: > > > All exported functions are declared in the

[PATCH] D59319: [OpenMP][Offloading][1/3] A generic and simple target region interface

2019-03-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert updated this revision to Diff 190710. jdoerfert marked 6 inline comments as done. jdoerfert added a comment. Change char* to void* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59319/new/ https://reviews.llvm.org/D59319 Files:

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: llvm/lib/IR/LegacyPassManager.cpp:1686 + llvm::TimeTraceScope timeScope("OptModule", M.getName().data()); for (Function : M) I think these OptModule and OptFunction labels may need some improvement. For a

[PATCH] D56990: Bugfix for Replacement of tied operand of inline asm

2019-03-14 Thread Eli Friedman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC356196: [CodeGen] Consider tied operands when adjusting inline asm operands. (authored by efriedma, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION

r356196 - [CodeGen] Consider tied operands when adjusting inline asm operands.

2019-03-14 Thread Eli Friedman via cfe-commits
Author: efriedma Date: Thu Mar 14 12:46:51 2019 New Revision: 356196 URL: http://llvm.org/viewvc/llvm-project?rev=356196=rev Log: [CodeGen] Consider tied operands when adjusting inline asm operands. The constraint "0" in the following asm did not consider the its relationship with "=y" when try

[PATCH] D59279: [Analyzer] Checker for non-determinism caused by iteration of unordered container of pointers

2019-03-14 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I was trying to write another checker for hashing of pointers. Basically, I wanted to match all instances where the keys of std::map are pointers. Writing an AST matcher for std::map is straightforward. However, I am not sure how to check for pointer keys after matching

[PATCH] D52150: [clang-format] BeforeHash added to IndentPPDirectives

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. @to-miz do you have permission to commit? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D52150/new/ https://reviews.llvm.org/D52150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D55170: [clang-format]: Add NonEmptyParentheses spacing option

2019-03-14 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added a comment. This revision now requires changes to proceed. Pulling this revision down to build it caused build issues with missing SBBLO_Always, could you investigate before committing? Comment at:

[PATCH] D59382: Rename directory housing clang-change-namespace to be eponymous

2019-03-14 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: ioeric. Herald added a subscriber: mgorny. Makes the name of this directory consistent with the names of the other directories in clang-tools-extra. https://reviews.llvm.org/D59382 Files: clang-tools-extra/CMakeLists.txt

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D58514#1429713 , @rjmccall wrote: > In D58514#1429652 , @erik.pilkington > wrote: > > > In D58514#1429606 , @rjmccall > > wrote: > > >

[PATCH] D57532: [Index] Make sure c-index-test finds libc++ on Mac

2019-03-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Herald added a subscriber: jdoerfert. ilya-biryukov, ping? :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57532/new/ https://reviews.llvm.org/D57532 ___ cfe-commits mailing

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread Hao Wu via Phabricator via cfe-commits
wuhao5 added a comment. > Can I ask why you want a weak reference to a block in the first place? It > seems basically useless — blocks can certainly appear in reference cycles, > but I don't know why you'd ever try to break that cycle with the block > instead of somewhere else. The

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D58514#1429652 , @erik.pilkington wrote: > In D58514#1429606 , @rjmccall wrote: > > > There is no way in the existing ABI for copying a block to cause other > > references to the

[PATCH] D58896: Suppress -Wchar-subscripts if the index is a literal char

2019-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D58896#1428816 , @edward-jones wrote: > In D58896#1419964 , @aaron.ballman > wrote: > > >

[PATCH] D59327: [Sema] Fix a use-after-free of a _Nonnull ParsedAttr

2019-03-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356187: [Sema] Fix a use-after-free of a _Nonnull ParsedAttr (authored by epilk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

r356187 - [Sema] Fix a use-after-free of a _Nonnull ParsedAttr

2019-03-14 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Thu Mar 14 11:38:02 2019 New Revision: 356187 URL: http://llvm.org/viewvc/llvm-project?rev=356187=rev Log: [Sema] Fix a use-after-free of a _Nonnull ParsedAttr We were allocating the implicit attribute in the declarator's attribute pool, but putting into the declaration

[PATCH] D59377: Frontend: Remove CompilerInstance::VirtualFileSystem, NFC

2019-03-14 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith created this revision. Herald added subscribers: jdoerfert, kadircet, arphaman, jkorous. Remove CompilerInstance::VirtualFileSystem and CompilerInstance::setVirtualFileSystem, instead relying on the VFS in the FileManager. CompilerInstance and its clients already went to some trouble

[PATCH] D33841: [clang-tidy] redundant keyword check

2019-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantExternCheck.cpp:27 +void RedundantExternCheck::check(const MatchFinder::MatchResult ) { + auto* FD = + Result.Nodes.getNodeAs("redundant_extern"); Formatting is incorrect

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D58514#1429662 , @wuhao5 wrote: > > The specified user model of blocks is that they stay on the stack until > > they get copied, and there can be multiple such copies. ARC just automates > > that process. So the address of

[PATCH] D59094: [ARM] Fix bug 39982 - pcs("aapcs-vfp") is not consistent

2019-03-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Looking more carefully, I guess none of the other places actually distinguish between ARMABIInfo::AAPCS_VFP and ARMABIInfo::AAPCS, so I guess the current change is sufficient given the calling-convention attributes that are likely to be used in practice. Please pull

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread Hao Wu via Phabricator via cfe-commits
wuhao5 added a comment. > The specified user model of blocks is that they stay on the stack until they > get copied, and there can be multiple such copies. ARC just automates that > process. So the address of a block is not consistent before you've forced a > copy. > > I tend to agree that

[PATCH] D59376: [LibTooling] Add Transformer, a library for source-to-source transformations.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, jdoerfert, jfb, mgorny. Herald added a project: clang. ymandel added a parent revision: D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.. Adds a basic

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread Erik Pilkington via Phabricator via cfe-commits
erik.pilkington added a comment. In D58514#1429606 , @rjmccall wrote: > There is no way in the existing ABI for copying a block to cause other > references to the block to become references to the heap block. We do do > that for `__block` variables,

[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

2019-03-14 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: llvm/lib/Support/TimeProfiler.h:1 +//===- llvm/Support/TimeProfiler.h - Hierarchical Time Profiler -*- C++ -*-===// +// I applied this patch locally to try it, and I noticed this header should be in

[PATCH] D59347: [DebugInfo] Combine Trivial and NonTrivial flags

2019-03-14 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Would it be simpler/better to revert all the FlagTrivial work? & use the FlagNonTrivial+composite type to imply trivial? (since FlagnonTrivial has been in-tree longer) Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59347/new/

[PATCH] D58530: Add PragmaHandler for MSVC pragma execution_character_set

2019-03-14 Thread Reid Kleckner via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356185: Add PragmaHandler for MSVC pragma execution_character_set (authored by rnk, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190683. ymandel added a comment. Build fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59371/new/ https://reviews.llvm.org/D59371 Files: clang/include/clang/Tooling/Refactoring/Stencil.h

[clang-tools-extra] r356185 - Add PragmaHandler for MSVC pragma execution_character_set

2019-03-14 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 14 11:12:17 2019 New Revision: 356185 URL: http://llvm.org/viewvc/llvm-project?rev=356185=rev Log: Add PragmaHandler for MSVC pragma execution_character_set __pragma(execution_character_set(push, "UTF-8")) is used in TraceLoggingProvider.h. This commit implements a

r356185 - Add PragmaHandler for MSVC pragma execution_character_set

2019-03-14 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Thu Mar 14 11:12:17 2019 New Revision: 356185 URL: http://llvm.org/viewvc/llvm-project?rev=356185=rev Log: Add PragmaHandler for MSVC pragma execution_character_set __pragma(execution_character_set(push, "UTF-8")) is used in TraceLoggingProvider.h. This commit implements a

[PATCH] D56554: [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACK

2019-03-14 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 190681. mgorny marked 2 inline comments as done. mgorny added a comment. Herald added a project: LLVM. Implemented @ruiu's suggestions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56554/new/ https://reviews.llvm.org/D56554 Files:

[PATCH] D56554: [ELF] Add '-z nognustack' opt to suppress emitting PT_GNU_STACK

2019-03-14 Thread Michał Górny via Phabricator via cfe-commits
mgorny marked 5 inline comments as done. mgorny added inline comments. Comment at: ELF/Config.h:191 bool ZGlobal; + GnuStackKind ZGnustack; bool ZHazardplt; ruiu wrote: > Members are (roughly) sorted alphabetically, so move this below the last > boolean

[PATCH] D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190679. ymandel added a comment. "Revert" to original diff. This undoes the previous diff, which associated with the wrong revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59329/new/

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D58514#1429514 , @wuhao5 wrote: > Hey guys, this is Hao, I am working with Chrome team to sort this issue out. > > In D58514#1428606 , @rjmccall wrote: > > > I remember this coming up

[PATCH] D55044: [clang-tidy] check for Abseil make_unique

2019-03-14 Thread Andy Zhang via Phabricator via cfe-commits
axzhang updated this revision to Diff 190676. axzhang added a comment. Updated diff with full context. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55044/new/ https://reviews.llvm.org/D55044 Files: clang-tidy/abseil/AbseilTidyModule.cpp clang-tidy/modernize/MakeSmartPtrCheck.cpp

[PATCH] D59329: [LibTooling] Add NodeId, a strong type for AST-matcher node identifiers.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 190675. ymandel added a comment. Herald added a subscriber: jdoerfert. Build-related fixes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59329/new/ https://reviews.llvm.org/D59329 Files:

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59316/new/ https://reviews.llvm.org/D59316 ___

[PATCH] D59316: [HIP-Clang] propagate -mllvm options to opt and llc

2019-03-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Here we are looking at the code which emulates a "linker" for HIP toolchain. The offloading action builder requests the offloading toolchain have a linker, but amdgpu does not have a real linker (ISA level linker), so we have to emulate that. If we have an ISA level

[PATCH] D58579: [Sema] SequenceChecker: C++17 sequencing rule for call expression.

2019-03-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 190671. riccibruno added a comment. Don't visit the pre-argument expression(s). A pre-argument expression is only present for `CUDAKernelCallExpr`, and it is just a `CallExpr` for the configuration call, which I don't think we need to visit. This makes

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 

2019-03-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D59336#1429564 , @aaron.ballman wrote: > This is missing test cases that demonstrate the behavior is what we expect it > to be for ObjC++ code vs C++ code. Looks like phab has again consumed the email comments. Might be

[PATCH] D59336: [clang-tidy] Disable google-runtime-int in Objective-C++ 

2019-03-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman requested changes to this revision. aaron.ballman added a comment. This revision now requires changes to proceed. This is missing test cases that demonstrate the behavior is what we expect it to be for ObjC++ code vs C++ code. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D57660: [Sema] SequenceChecker: Handle references, members and structured bindings.

2019-03-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. Added some context in the description of the patch. Ping ! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57660/new/ https://reviews.llvm.org/D57660 ___ cfe-commits mailing list

[PATCH] D58514: Avoid needlessly copying blocks that initialize or are assigned to local auto variables to the heap

2019-03-14 Thread Hao Wu via Phabricator via cfe-commits
wuhao5 added a comment. Hey guys, this is Hao, I am working with Chrome team to sort this issue out. In D58514#1428606 , @rjmccall wrote: > I remember this coming up 7-8 years ago. I intentionally decided against > doing a copy/release when assigning

[PATCH] D59371: [LibTooling] Add Stencil library for format-string style codegen.

2019-03-14 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: ilya-biryukov. ymandel added a project: clang. Herald added subscribers: jdoerfert, jfb, mgorny. This file defines the *Stencil* abstraction: a code-generating object, parameterized by named references to (bound) AST nodes. Given a match

[PATCH] D59219: [PR41007][OpenCL] Allow printf and toolchain reserved variadic functions in C++

2019-03-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: cfe/trunk/test/SemaOpenCL/extensions.cl:31 // RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL2.0 -finclude-default-header -// RUN: %clang_cc1

[PATCH] D59094: [ARM] Fix bug 39982 - pcs("aapcs-vfp") is not consistent

2019-03-14 Thread Carey Williams via Phabricator via cfe-commits
carwil updated this revision to Diff 190653. carwil marked an inline comment as done. carwil added a comment. I got bit a confused earlier. That does actually seem like correct behaviour (once we're no longer able to treat the struct as a homogeneous aggregate). I've tightened up the conditional

[PATCH] D58673: [ASTImporter] Fix redecl failures of ClassTemplateSpec

2019-03-14 Thread Gabor Marton via Phabricator via cfe-commits
martong marked an inline comment as done. martong added a comment. @shafik Ping Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58673/new/ https://reviews.llvm.org/D58673 ___ cfe-commits mailing list

[PATCH] D58668: [ASTImporter] Fix redecl failures of FunctionTemplateSpec

2019-03-14 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @shafik Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58668/new/ https://reviews.llvm.org/D58668 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D59354: [clangd] Print arguments in template specializations

2019-03-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clang/lib/AST/TypePrinter.cpp:1646 +break; + case TemplateArgument::ArgKind::Type: +A.getTypeSourceInfo()->getType().print(OS, PP); ilya-biryukov wrote: > Maybe

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D59214#1429422 , @riccibruno wrote: > In D59214#1429400 , @lebedev.ri > wrote: > > > In D59214#1429384 , @riccibruno > > wrote: > > > > >

[PATCH] D28462: clang-format: Add new style option AlignConsecutiveMacros

2019-03-14 Thread Nick Renieris via Phabricator via cfe-commits
VelocityRa marked 11 inline comments as done. VelocityRa added a comment. Waiting for further feedback before pushing an update. Comment at: lib/Format/WhitespaceManager.cpp:436 +static void +AlignTokenSequenceAll(unsigned Start, unsigned End, unsigned Column, +

[PATCH] D59214: [clang][OpeMP] Model OpenMP structured-block in AST (PR40563)

2019-03-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno added a comment. In D59214#1429400 , @lebedev.ri wrote: > In D59214#1429384 , @riccibruno > wrote: > > > IIRC, last time I looked only 4 statement/expression classes currently have > > some

  1   2   >