[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-14 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. F7545597: clang-crash.tar @dblaikie I got a standalone reproducible test now. -bash-4.4$ pwd /home/yhs/work/bcc/clang-crash -bash-4.4$ ls clang-test.cpp compile.sh README ttest.c ttest.h -bash-4.4$ README has detai

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) Quuxplusone wrote: > rjmccall wrote: > > Quuxplus

[PATCH] D52674: [AST] Add Obj-C discriminator to MS ABI RTTI

2018-11-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D52674#1297893, @smeenai wrote: > In https://reviews.llvm.org/D52674#1297879, @rjmccall wrote: > > > I'm not worried about the mangler being re-used for multiple declarations, > > I'm worried about a global flag changing how we mangle all com

[clang-tools-extra] r346835 - [clang-tidy] Avoid C arrays check

2018-11-14 Thread Roman Lebedev via cfe-commits
Author: lebedevri Date: Wed Nov 14 01:01:08 2018 New Revision: 346835 URL: http://llvm.org/viewvc/llvm-project?rev=346835&view=rev Log: [clang-tidy] Avoid C arrays check Summary: [[ https://bugs.llvm.org/show_bug.cgi?id=39224 | PR39224 ]] As discussed, we can't always do the transform automatical

[PATCH] D53771: [clang-tidy] Avoid C arrays check

2018-11-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL346835: [clang-tidy] Avoid C arrays check (authored by lebedevri, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D53771?vs=173514&id=173996#to

[clang-tools-extra] r346836 - [clangd] Improve code completion for ObjC methods

2018-11-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Nov 14 01:05:19 2018 New Revision: 346836 URL: http://llvm.org/viewvc/llvm-project?rev=346836&view=rev Log: [clangd] Improve code completion for ObjC methods Summary: Previously code completion did not work well for Objective-C methods which contained multiple argument

[PATCH] D53934: [clangd] Improve code completion for ObjC methods

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE346836: [clangd] Improve code completion for ObjC methods (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D53934?vs=173737&id=173997#toc Repository: rCTE C

r346837 - [Clang] - Add '-gsplit-dwarf[=split, =single]' version for '-gsplit-dwarf' option.

2018-11-14 Thread George Rimar via cfe-commits
Author: grimar Date: Wed Nov 14 01:22:16 2018 New Revision: 346837 URL: http://llvm.org/viewvc/llvm-project?rev=346837&view=rev Log: [Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf' option. The DWARF5 specification says(Appendix F.1): "The sections that do not require r

[PATCH] D52296: [Clang] - Add '-gsplit-dwarf[=split, =single]' version for '-gsplit-dwarf' option.

2018-11-14 Thread George Rimar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346837: [Clang] - Add '-gsplit-dwarf[=split,=single]' version for '-gsplit-dwarf'… (authored by grimar, committed by ). Changed prior to commit: https://reviews.llvm.org/D52296?vs=173643&id=173998#toc

[PATCH] D53809: Fix invalid address space generation for clk_event_t

2018-11-14 Thread Alexey Sotkin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346838: [OpenCL] Fix invalid address space generation for clk_event_t (authored by AlexeySotkin, committed by ). Repository: rC Clang https://reviews.llvm.org/D53809 Files: lib/CodeGen/CGBuiltin.cpp

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 174000. sammccall marked 2 inline comments as done. sammccall added a comment. Address review comments. Remove special case for TUDecl since no-parents is now handled. Repository: rC Clang https://reviews.llvm.org/D54309 Files: include/clang/AST/ASTC

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-11-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. This revision is now accepted and ready to land. lgtm Comment at: lib/ASTMatchers/ASTMatchFinder.cpp:674 + // Nodes may have no parents if: + // a) the node is the TranslationUnitDecl + // a) there is a bug

r346847 - [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-11-14 Thread Sam McCall via cfe-commits
Author: sammccall Date: Wed Nov 14 02:33:30 2018 New Revision: 346847 URL: http://llvm.org/viewvc/llvm-project?rev=346847&view=rev Log: [AST] Allow limiting the scope of common AST traversals (getParents, RAV). Summary: The goal is to allow analyses such as clang-tidy checks to run on a subset of

[PATCH] D54309: [AST] Allow limiting the scope of common AST traversals (getParents, RAV).

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sammccall marked 2 inline comments as done. Closed by commit rC346847: [AST] Allow limiting the scope of common AST traversals (getParents, RAV). (authored by sammccall, committed by ). Changed prior to commit: https://re

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/Function.h:90 +class Event { +public: + // A Listener is the callback through which events are delivered. I assume the `Event` is supposed to be used only with non-reference and non-const qualified types.

[PATCH] D54519: [clangd] Fix no results returned for global symbols in dexp

2018-11-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. For symbols in global namespace (without any scope), we need to add global scope "" to the fuzzy request. Repository: rCTE Clang Tools Extra https://re

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, mostly interface tweaks now. Comment at: clangd/index/Background.cpp:187 + BackgroundIndexStorage *IndexStorage = getIndexStorage(Directory); + if (!IndexStorage) +elog("No index storage for: {0}", Directory); I think it

[PATCH] D54473: [sanitizers] Initial implementation for -fsanitize=init-locals

2018-11-14 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In https://reviews.llvm.org/D54473#1297460, @kcc wrote: > This new flag inhibits the warnings from -Wuninitialized, right? > While this is fine for experimenting (and I want to have this in ToT to > enable wide experimentation) > we should clearly state (in the comment

[clang-tools-extra] r346852 - [clangd] Replace StringRef in SymbolLocation with a char pointer.

2018-11-14 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Nov 14 03:55:45 2018 New Revision: 346852 URL: http://llvm.org/viewvc/llvm-project?rev=346852&view=rev Log: [clangd] Replace StringRef in SymbolLocation with a char pointer. Summary: This would save us 8 bytes per ref, and buy us ~40MB in total for llvm index (from ~300MB

[PATCH] D53427: [clangd] Replace StringRef in SymbolLocation with a char pointer.

2018-11-14 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL346852: [clangd] Replace StringRef in SymbolLocation with a char pointer. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D534

r346838 - [OpenCL] Fix invalid address space generation for clk_event_t

2018-11-14 Thread via cfe-commits
Author: AlexeySotkin Date: Wed Nov 14 01:40:05 2018 New Revision: 346838 URL: http://llvm.org/viewvc/llvm-project?rev=346838&view=rev Log: [OpenCL] Fix invalid address space generation for clk_event_t Summary: Addrspace(32) was generated when putting 0 in clk_event_t * event_ret parameter for enq

[PATCH] D54475: [clangd] Allow observation of changes to global CDBs.

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 174014. sammccall marked 3 inline comments as done. sammccall added a comment. Address comments. Add missing OverlayCDB->Base watching (oops!) Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54475 Files: clangd/Function.h clangd/Global

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-11-14 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment. As far as I see GCC warns on these 3 things. Comment at: lib/Lex/PPDirectives.cpp:553 } else { const SourceLocation CondBegin = CurPPLexer->getSourceLocation(); // Restore the value of LexingRawMode so that identifiers are

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.h:39 + + virtual llvm::Expected + loadShard(llvm::StringRef ShardIdentifier) const = 0; sammccall wrote: > sammccall wrote: > > docs > Hmm, we're going to attempt to load the shard correspondin

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 174017. kadircet marked 10 inline comments as done. kadircet added a comment. - Address comments. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54269 Files: clangd/index/Background.cpp clangd/index/Background.h unittests/clangd/Back

[PATCH] D54204: [clangd] Initial clang-tidy diagnostics support.

2018-11-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Looks mostly good, just a few nits. This patch contains two parts (clang-tidy and clangd), I think we could split into two, but I'm not insisting, up to you. Comment at: clang-tidy/modernize/LoopConvertUtils.h:59 /// \brief Run the analysis on th

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 174019. kadircet added a comment. - Get rid off getIndexStorage and use IndexStorageCreator directly. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54269 Files: clangd/index/Background.cpp clangd/index/Background.h unittests/clangd/

[PATCH] D54453: Remove myself as owner of clang-query.

2018-11-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. I'll go ahead and add myself as code owner. Peter can remove himself at his leisure. Repository: rL LLVM https://reviews.llvm.org/D54453 __

[clang-tools-extra] r346856 - Adding myself as the code owner for clang-query as discussed in https://reviews.llvm.org/D54453.

2018-11-14 Thread Aaron Ballman via cfe-commits
Author: aaronballman Date: Wed Nov 14 05:03:50 2018 New Revision: 346856 URL: http://llvm.org/viewvc/llvm-project?rev=346856&view=rev Log: Adding myself as the code owner for clang-query as discussed in https://reviews.llvm.org/D54453. Modified: clang-tools-extra/trunk/CODE_OWNERS.TXT Modif

[PATCH] D54473: [sanitizers] Initial implementation for -fsanitize=init-locals

2018-11-14 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: include/clang/Basic/Sanitizers.def:163 +// Initialize local variables. +SANITIZER("init-locals", InitLocals) + lebedev.ri wrote: > Unless i'm mistaken, I suspect you may see some surprising behavior here, > unfortunately

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-11-14 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos added a comment. Oh, and running the `check-clang-tools` target, this currently results in: Failing Tests (3): Clang Tools :: modularize/ProblemsInconsistent.modularize Clang Tools :: pp-trace/pp-trace-conditional.cpp Clang Tools :: pp-trace/pp-trace-macro.cpp Perhaps

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-narrowing-conversions.cpp:79-81 + // TODO: Provide an automatic fix if the number is exactly representable in the destination type. + f += 2.0; + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: nar

[PATCH] D53427: [clangd] Replace StringRef in SymbolLocation with a char pointer.

2018-11-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tools-extra/trunk/clangd/index/Index.h:71 + // via llvm::StringRef. + const char *FileURI = ""; }; If the users of the SymbolLocation have a way to get a common "context", you could keep a list of filenames in t

[PATCH] D54404: Exclude matchers which can have multiple results

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/ASTMatchers/Dynamic/Registry.cpp:606 + // be used with particular arguments. + static std::vector ExcludedMatchers{ + "allOf", sbenza wrote: > I don't think we are allowed to have non-trivial static stor

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2018-11-14 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D41005#1295632, @ilya-biryukov wrote: > > Before this change, this was not a problem because OverriddenFiles were > > keyed on Status.getUniqueID(). Starting with this change, the key is the > > file path. > > I suggest keeping two maps for overr

[PATCH] D54523: [Preamble] Reuse preamble even if an unsaved file does not exist

2018-11-14 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik created this revision. Herald added a subscriber: cfe-commits. When a preamble is created an unsaved file not existing on disk is already part of PrecompiledPreamble::FilesInPreamble. However, when checking whether the preamble can be re-used, a failed stat of such an unsaved file invalidated

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-14 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos marked 2 inline comments as done. vmiklos added inline comments. Comment at: clang-tidy/readability/ReadabilityTidyModule.cpp:84 +CheckFactories.registerCheck( +"readability-redundant-preprocessor"); CheckFactories.registerCheck( aaron.ba

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-14 Thread Miklos Vajna via Phabricator via cfe-commits
vmiklos updated this revision to Diff 174021. vmiklos marked 2 inline comments as done. https://reviews.llvm.org/D54349 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTidyModule.cpp clang-tidy/readability/RedundantPreprocessorCheck.cpp clang-tidy/readabilit

[PATCH] D41005: Reuse preamble even if an unsaved file does not exist

2018-11-14 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 174022. nik added a comment. Addressed comments. Repository: rC Clang https://reviews.llvm.org/D41005 Files: include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp lib/Frontend/PrecompiledPreamble.cpp unittests/Frontend/PCHPreambleTest.cpp Index:

[PATCH] D51575: [clang-tidy/checks] Implement a clang-tidy check to verify Google Objective-C function naming conventions 📜

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D51575#1297664, @stephanemoore wrote: > Thanks for the review everyone! > > Let me know if there are any further changes that you want me to make or any > further action required on my part to land this 😁 It's good to go in -- do you h

[PATCH] D54524: [AST] Pack UnaryOperator

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: dblaikie. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Use the newly available space in the bit-fields of `Stmt` to store some data from `UnaryOperator`. This saves 8 bytes per `UnaryOperator`. Repositor

[PATCH] D54161: [AST] Pack DeclRefExpr, UnaryOperator, MemberExpr and BinaryOperator

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. Broken into pieces and sent individually for review. Repository: rC Clang https://reviews.llvm.org/D54161 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D53427: [clangd] Replace StringRef in SymbolLocation with a char pointer.

2018-11-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/trunk/clangd/index/Index.h:71 + // via llvm::StringRef. + const char *FileURI = ""; }; alexfh wrote: > If the users of the SymbolLocation have a way to get a common "context", you > could keep a list

[PATCH] D54525: [AST] Pack MemberExpr

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: dblaikie. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Use the newly available space in the bit-fields of `Stmt` to store some data from `MemberExpr`. This saves one pointer per `MemberExpr`. Repository:

[PATCH] D53427: [clangd] Replace StringRef in SymbolLocation with a char pointer.

2018-11-14 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tools-extra/trunk/clangd/index/Index.h:71 + // via llvm::StringRef. + const char *FileURI = ""; }; hokein wrote: > alexfh wrote: > > If the users of the SymbolLocation have a way to get a common "context", > > y

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:113-115 +static void PrettyPrintFloat(const llvm::APFloat &floatValue, + const llvm::fltSemantics &floatSem, + SmallVectorImpl &prettyFloatValue) { -

r346864 - [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.td

2018-11-14 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Wed Nov 14 06:19:34 2018 New Revision: 346864 URL: http://llvm.org/viewvc/llvm-project?rev=346864&view=rev Log: [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.td Reorder the bit-field classes and the members of the anonymous union so that they both match

[PATCH] D54526: [AST] Pack BinaryOperator

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: dblaikie. riccibruno added a project: clang. Herald added a subscriber: cfe-commits. Use the newly available space in the bit-fields of `Stmt`. This saves 8 bytes per `BinaryOperator`. Repository: rC Clang https://reviews.llvm.org

r346865 - [Diagnostics] Check integer to floating point number implicit conversions

2018-11-14 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Wed Nov 14 06:24:33 2018 New Revision: 346865 URL: http://llvm.org/viewvc/llvm-project?rev=346865&view=rev Log: [Diagnostics] Check integer to floating point number implicit conversions Summary: GCC already catches these situations so we should handle it too. GCC warns in

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-11-14 Thread Dávid Bolvanský via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC346865: [Diagnostics] Check integer to floating point number implicit conversions (authored by xbolva00, committed by ). Changed prior to commit: https://reviews.llvm.org/D52835?vs=172509&id=174030#toc

r346866 - Reverted D52835 to fix review comments

2018-11-14 Thread David Bolvansky via cfe-commits
Author: xbolva00 Date: Wed Nov 14 06:27:51 2018 New Revision: 346866 URL: http://llvm.org/viewvc/llvm-project?rev=346866&view=rev Log: Reverted D52835 to fix review comments Removed: cfe/trunk/test/Sema/impcast-integer-float.c Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-11-14 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Ok, I will address your comments soon. Repository: rC Clang https://reviews.llvm.org/D52835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54391: Fix compatibility with z3-4.8.1

2018-11-14 Thread Mikhail Ramalho via Phabricator via cfe-commits
mikhail.ramalho added a comment. Since we're supporting version 4.8.1 now, the cmake file should be changed to "minimum" instead of "exact". Repository: rL LLVM https://reviews.llvm.org/D54391 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. just some nits. Main thing is the LoggingStorage - again I think this may have been a misunderstanding. Comment at: clangd/index/Background.cpp:76 +else + elog("Error while reading shard {0}: {1}", ShardIdentifier, + I.takeError())

[PATCH] D53427: [clangd] Replace StringRef in SymbolLocation with a char pointer.

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/trunk/clangd/index/Index.h:71 + // via llvm::StringRef. + const char *FileURI = ""; }; alexfh wrote: > hokein wrote: > > alexfh wrote: > > > If the users of the SymbolLocation have a way to get a c

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D52835#1298428, @xbolva00 wrote: > Reverted. > Ok, I will address your comments soon. Thanks! I'm sorry for the delayed reviews -- there were wg21 meetings last week, which several of the reviewers were attending. Repository: rC C

[PATCH] D54166: [AST] Store the string data in StringLiteral in a trailing array of chars

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno updated this revision to Diff 174032. riccibruno added a comment. Factored out some NFSs which I will submit separately. Repository: rC Clang https://reviews.llvm.org/D54166 Files: include/clang/AST/Expr.h include/clang/AST/Stmt.h lib/AST/Expr.cpp lib/Serialization/ASTRead

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 174033. Anastasia added a comment. Fixed check for AS mismatch of pointer type and added missing test case https://reviews.llvm.org/D53764 Files: include/clang/Sema/Sema.h lib/AST/Expr.cpp lib/CodeGen/CGExpr.cpp lib/Sema/DeclSpec.cpp lib/Sema/Se

[PATCH] D54166: [AST] Store the string data in StringLiteral in a trailing array of chars

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno marked 2 inline comments as done. riccibruno added inline comments. Comment at: include/clang/AST/Expr.h:1615 + } + + /// Build a string literal. Note that the trailing array of chars is aligned to 4 bytes since it is after the array of `SourceLocati

[PATCH] D53738: [Fixed Point Arithmetic] Fixed Point Addition

2018-11-14 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added a comment. > The only thing I didn't include in this patch were the suggested changes to > FixedPointSemantics which would indicate if the semantics were original from > an integer type. I'm not sure how necessary this is because AFAIK the only > time we would need to care if the

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > Okay. But if `ToType` *isn't* a reference t

[PATCH] D54326: [AST] Pack CXXThrowExpr, CXXDefaultArgExpr and CXXDefaultInitExpr

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. Broken down and sent for review individually. Repository: rC Clang https://reviews.llvm.org/D54326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D54325: [AST] Pack CXXBoolLiteralExpr, CXXNullPtrLiteralExpr and CXXThisExpr

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. Broken down and sent for review individually. Repository: rC Clang https://reviews.llvm.org/D54325 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-b

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-14 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 174039. hwright marked 11 inline comments as done. hwright added a comment. Combined multiplication and division logic, and also now handles scaling of multiple steps (e.g., Seconds * 3600). https://reviews.llvm.org/D54246 Files: clang-tidy/abseil/Abseil

[PATCH] D54172: [AST] Pack ArraySubscriptExpr and CallExpr

2018-11-14 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno abandoned this revision. riccibruno added a comment. Sent for review individually. Repository: rC Clang https://reviews.llvm.org/D54172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-14 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added inline comments. Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:57-58 +// One and only one of `IntLit` and `FloatLit` should be provided. +static double GetValue(const IntegerLiteral *IntLit, + const FloatingLiteral *FloatLit) { +

[PATCH] D53770: Support g++ headers in include/g++

2018-11-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In https://reviews.llvm.org/D53770#1297646, @greened wrote: > Oops, I didn't realize this hadn't been formally accepted yet. Still > learning the Phab process. Let me know if you want it reverted for a formal > accept. No, this is fine. Repository: rL LLVM https

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 174041. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Updating based on review feedback. https://reviews.llvm.org/D54450 Files: include/clang/Lex/Preprocessor.h lib/Lex/PPDirectives.cpp lib/Lex/PPExpressions.cpp

[PATCH] D54450: Get the correct range of tokens for preprocessor conditions

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D54450#1298319, @vmiklos wrote: > Oh, and running the `check-clang-tools` target, this currently results in: > > Failing Tests (3): > Clang Tools :: modularize/ProblemsInconsistent.modularize > Clang Tools :: pp-trace/pp-tra

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-11-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Are you sure `check-clang` passes with this patch? It looks like some bots weren't happy before the revert. (Also, is this warning enabled when building llvm? If yes, you might want to double-check stage2 build.) Repository: rC Clang https://reviews.llvm.org/D5283

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous created this revision. jkorous added reviewers: sammccall, ilya-biryukov, arphaman, benlangmuir. jkorous added a project: clang-tools-extra. Herald added subscribers: cfe-commits, kadircet, dexonsmith, MaskRay, ioeric. We need a way for given code position to get the best definition/declar

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-14 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. Thx for the review. I have two suggestions in the comments let me know what you think. Comment at: test/clang-tidy/cppcoreguidelines-narrowing-conversions.cpp:79-81 + // TODO: Provide an automatic fix if the number is exactly representable in the d

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-14 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet updated this revision to Diff 174044. gchatelet marked 7 inline comments as done. gchatelet added a comment. - State char signess clearly Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D53488 Files: clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp clang-t

[PATCH] D54258: [Clang] Fix pretty printing of CUDA address spaces

2018-11-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 https://reviews.llvm.org/D54258#1297687, @richardmembarth wrote: > > In https://reviews.llvm.org/D54258#1297191, @Anastasia wrote: > > > > I agree with the change itself... bu

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-14 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. The above segment looks like #0 0x00a1 in ?? () #1 0x01490d63 in clang::SourceManager::~SourceManager() () #2 0x005ad0ee in clang::CompilerInstance::~CompilerInstance() () #3 0x0056ad1b in main () In my example, I did

[PATCH] D53488: [clang-tidy] Improving narrowing conversions

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/cppcoreguidelines-narrowing-conversions.cpp:79-81 + // TODO: Provide an automatic fix if the number is exactly representable in the destination type. + f += 2.0; + // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: nar

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Hi Jan, Clangd uses SymbolIDs rather than USRs, to identify symbols. However these are used only internally, and for extension point APIs (SymbolIndex), and not actually exposed over the wire. Can you explain more about the need to identify the symbol in go-to-definit

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:2096 +def TriviallyRelocatable : InheritableAttr { + let Spellings = [CXX11<"", "trivially_relocatable", 200809>, + CXX11<"clang", "trivially_relocatable">]; erichkean

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. One more thing - shall I create new client capability flag for this? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

2018-11-14 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: docs/LanguageExtensions.rst:1096 + equivalent to copying the underlying bytes and then dropping the source object + on the floor. * ``__is_destructible`` (MSVC 2013) rjmccall wrote: > Quuxplusone wrote: > > rjmcc

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 174052. kadircet added a comment. Herald added a subscriber: mgorny. - Address comments. - Move storage related things to new files. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54269 Files: clangd/CMakeLists.txt clangd/index/Backgro

[PATCH] D54269: Introduce shard storage to auto-index.

2018-11-14 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked 9 inline comments as done. kadircet added a comment. I fear we still need to expose createDiskStorage, because someone still needs to tell factory to which creator function to use. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54269 _

[clang-tools-extra] r346872 - [clangd] Delete unused includes.

2018-11-14 Thread Kadir Cetinkaya via cfe-commits
Author: kadircet Date: Wed Nov 14 09:07:39 2018 New Revision: 346872 URL: http://llvm.org/viewvc/llvm-project?rev=346872&view=rev Log: [clangd] Delete unused includes. Modified: clang-tools-extra/trunk/unittests/clangd/TestFS.cpp Modified: clang-tools-extra/trunk/unittests/clangd/TestFS.cpp

[PATCH] D54535: cmake: z3: Remove EXACT from 4.7.1 after being compatible with 4.8.1

2018-11-14 Thread Jan Kratochvil via Phabricator via cfe-commits
jankratochvil created this revision. jankratochvil added a reviewer: mikhail.ramalho. jankratochvil added a project: clang. Herald added subscribers: cfe-commits, mgorny. D54391 comment by @mikhail.ramalho says: > Since we're supporting version 4.8.1 now

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Hi Sam! I am aware of clangd using SymbolID. We basically need USR for integration with our external indexing service. We don't plan to systematically use it in the protocol and I am not aware of any other requirement for using USR in LSP - will double check that to be

[PATCH] D54437: [analyzer][NFC] Merge ClangCheckerRegistry to CheckerRegistry

2018-11-14 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Herald added subscribers: gamesh411, baloghadamsoftware. Unfortunately, I found //yet another// corner case I didn't cover: if the macro arguments themselves are macros. I already fixed it, but it raises the question that what other things I may have missed? I genuinel

[PATCH] D52795: [analyzer][PlistMacroExpansion] Part 3.: Macro arguments are expanded

2018-11-14 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Herald added a subscriber: gamesh411. Unfortunately, I found //yet another// corner case I didn't cover: if the macro arguments themselves are macros. I already fixed it, but it raises the question that what other things I may have missed? I genuinely dislike this proj

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. We are also discussing creating separate method as we'll likely want to add other data to the response in the future. Would you prefer USR not to be in the standard part of LSP but only in our extension? Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D5

[PATCH] D53329: Generate DIFile with main program if source is not available

2018-11-14 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. If I am using regular files instead of remapped files, I did not see the segfault. So is it possible that this is a clang issue? Repository: rC Clang https://reviews.llvm.org/D53329 ___ cfe-commits mailing list cfe

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); Anastasia wrote: > rjmccall wrote: > > Anastasia wrote: > > > rjmccall wrote: > > > > Okay. But if `ToTyp

[PATCH] D54195: Fix linker option for -fprofile-arcs -ftest-coverage

2018-11-14 Thread Marco Castelluccio via Phabricator via cfe-commits
marco-c accepted this revision. marco-c added a comment. This revision is now accepted and ready to land. Thanks! Comment at: test/Driver/clang_f_opts.c:89 +// RUN: %clang -### -fprofile-arcs -ftest-coverage %s 2>&1 | FileCheck -check-prefix=CHECK-u %s +// CHECK-u-NOT: "-u{{.*

[PATCH] D54536: [AST] Fix typo in MicrosoftMangle

2018-11-14 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. smeenai added reviewers: majnemer, rnk. I noticed that we were spelling it as Artifical instead of Artificial when working on the mangling for Obj-C RTTI. I'm putting this up for review instead of committing it directly because I'm not 100% sure what the policy here

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Correction - I asked offline about our intended use of USR in LSP and it seems we might want to receive it as part of other responses too. Nothing specific for now but it's probable that it won't be just this singular case. Repository: rCTE Clang Tools Extra https:/

[PATCH] D53764: [OpenCL] Enable address spaces for references in C++

2018-11-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:4289 + /*BasePath=*/nullptr, CCK) + .get(); rjmccall wrote: > Anastasia wrote: > > rjmccall wrote: > > > Anastasia wrote: > > > > rjmccall wrote: > >

[PATCH] D53900: [CodeComplete] Penalize inherited ObjC properties for auto-completion

2018-11-14 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. @sammccall to land this Repository: rC Clang https://reviews.llvm.org/D53900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. @sammccall RE using USRs: we want to integrate clangd into a larger source tooling system that is already using USRs extensively to identify symbols. The most obvious case is that we have an index outside of clangd that uses USRs from clang-the-compiler, so exposing

[PATCH] D51866: [analyzer][UninitializedObjectChecker] New flag to ignore guarded uninitialized fields

2018-11-14 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus added a comment. Herald added subscribers: gamesh411, baloghadamsoftware. @george.karpenkov Matching macros is a very non-trivial job, how would you feel if we shipped this patch as-is, and maybe leave a TODO about adding macro `assert`s down the line? https://reviews.llvm.org/D51866

[PATCH] D54246: [clang-tidy] Add the abseil-duration-factory-scale check

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/abseil/DurationFactoryScaleCheck.cpp:63 + assert(FloatLit != nullptr && "Neither IntLit nor FloatLit set"); + return FloatLit->getValueAsApproximateDouble(); +} hwright wrote: > aaron.ballman wrote: >

[PATCH] D54529: [clangd] Add USR to textDocument/definition response

2018-11-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. If we're extending the API, we should be careful to do it in an orthogonal and reasonable general way. Apple may not need USR in other places now, but there are users other than Apple and times other than today :-) One of the reasons this looks odd is the method is "f

[PATCH] D54349: [clang-tidy] new check 'readability-redundant-preprocessor'

2018-11-14 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/RedundantPreprocessorCheck.cpp:37 +CheckMacroRedundancy(Loc, Condition, IfStack, + "nested redundant if; consider removing it", + "previous if was here", tr

  1   2   >