[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-13 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 178010. courbet added a comment. Handle remaining static_assert categories inside the prettyprinter. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 Files: include/clang/AST/Stmt.h

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-13 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 178011. courbet added a comment. clang-format patch Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 Files: include/clang/AST/Stmt.h lib/AST/StmtPrinter.cpp lib/Sema/SemaTemplate

[PATCH] D55552: [Sema] Better static assert diagnostics for expressions involving temporaries.

2018-12-13 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 178012. courbet added a comment. revert now unneeded changes. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2/new/ https://reviews.llvm.org/D2 Files: include/clang/AST/Stmt.h lib/AST/StmtPrinter.cpp lib/Sema/Se

[PATCH] D55229: [COFF] Statically link certain runtime library functions

2018-12-13 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. If we're going to change the default, please at least add a flag to allow callers to opt into dlimport. We can then make that dependent on `-static-objc` or similar. Comment at: CodeGenObjC/gnu-init.m:103 +// Make sure we do not have dllimport on th

[PATCH] D55413: [ExprConstant] Handle compound assignment when LHS has integral type and RHS has floating point type

2018-12-13 Thread S. B. Tam via Phabricator via cfe-commits
cpplearner marked an inline comment as done. cpplearner added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:3441 + Value); +} APSInt LHS = HandleIntToIntCast(Info, E, PromotedLHSType, rjmccall wrote: > cpple

[PATCH] D55640: [clang-tidy] Implement a check for large Objective-C type encodings 🔍

2018-12-13 Thread David Chisnall via Phabricator via cfe-commits
theraven added a comment. I wonder if we want to have an option to elide ObjC type info for all non-POD C++ types. Nothing that you do with the type encoding is likely to be correct (for example, you can see the pointer field in a `std::shared_ptr`, but you can't see that changes to it need to

[PATCH] D55359: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.

2018-12-13 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 Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55359/new/ https://reviews.llvm.org/D55359 __

[PATCH] D55646: [ASTImporter] Make ODR diagnostics warning by default

2018-12-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 created this revision. Herald added subscribers: cfe-commits, Szelethus, martong, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. - Make ODR diagnostics warning by default After this change all odr-related diagnostics are considered warnings belonging to Dia

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-13 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: include/clang/Basic/Builtins.def:942 LIBBUILTIN(alloca, "v*z", "f", "stdlib.h", ALL_GNU_LANGUAGES) +LIBBUILTIN(qsort_r, "", "fC<3,-1,-1,4>", "stdlib.h", ALL_GNU_LANGUAGES) // POSIX string.h q

[PATCH] D55646: [ASTImporter] Make ODR diagnostics warning by default

2018-12-13 Thread Endre Fülöp via Phabricator via cfe-commits
gamesh411 added a comment. In order to be able to handle ODR-related diagnostics with command line options, these diagnostics were moved from Error category to Warning. What are your thoughts? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55646/new/ https://rev

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

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Frontend/PrecompiledPreamble.cpp:459 +if (moveOnNoError(VFS->status(RB.first), Status)) { + OverriddenFiles[Status.getUniqueID()] = PreambleHash; +} else { NIT: remove braces around single-statemen

r349015 - [asan] Don't check ODR violations for particular types of globals

2018-12-13 Thread Vitaly Buka via cfe-commits
Author: vitalybuka Date: Thu Dec 13 01:47:39 2018 New Revision: 349015 URL: http://llvm.org/viewvc/llvm-project?rev=349015&view=rev Log: [asan] Don't check ODR violations for particular types of globals Summary: private and internal: should not trigger ODR at all. unnamed_addr: current ODR checki

[PATCH] D55621: [asan] Don't check ODR violations for particular types of globals

2018-12-13 Thread Vitaly Buka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349015: [asan] Don't check ODR violations for particular types of globals (authored by vitalybuka, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.o

[PATCH] D54438: [analyzer] Reimplement dependencies between checkers

2018-12-13 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Hmmm, I left plenty of room for improvement in the tblgen generation, we could generate compile-time errors on cycles within the dependency graph, try to include the generated file only once, but these clearly are very low-prio issues, so I'll do it later. I'll have t

[PATCH] D48116: [libclang] Allow skipping warnings from all included files

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D48116#1322878 , @nik wrote: > In D48116#1144732 , @ilya-biryukov > wrote: > > > Have you considered doing the same filtering in ASTUnit's > > `StoredDiagnosticConsumer`? It shoul

r349019 - [OpenCL] Add generic AS to 'this' pointer

2018-12-13 Thread Mikael Nilsson via cfe-commits
Author: mikael Date: Thu Dec 13 02:15:27 2018 New Revision: 349019 URL: http://llvm.org/viewvc/llvm-project?rev=349019&view=rev Log: [OpenCL] Add generic AS to 'this' pointer Address spaces are cast into generic before invoking the constructor. Added support for a trailing Qualifiers object in F

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-13 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. Many thanks for the fix, really important to get those cases right. Comment at: unittests/clangd/XRefsTests.cpp:1228 +TEST(FindReferences, ExplicitSymbo

[PATCH] D55455: Remove stat cache chaining as it's no longer needed after PTH support has been removed

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Yay! Anything that makes `FileManager` and friends simpler LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55455/new/ https://reviews.llvm.org/D55455 ___ cfe-commits mailing list cfe-c

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. Did you rebase the check onto the new master with your refactorings in? Comment at: test/clang-tidy/abseil-duration-subtraction.cpp:12 + // CHECK-FIXES: absl::ToDoubleSeconds(d - absl::Seconds(1)) + x = absl::ToDoubleSeconds(d) - absl::ToDoubleSecon

[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: kadircet. Repository: rC Clang https://reviews.llvm.org/D55648 Files: include/clang/Sema/Sema.h lib/Parse/ParseExpr.cpp lib/Sema/SemaCodeComplete.cpp unittests/Sema/CodeCompleteTest.cpp Index: unittests/Sema/CodeComp

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.cpp:107 while (ThreadPoolSize--) { ThreadPool.emplace_back([this] { run(); }); } NIT: remove braces around a single statement Comment at: clangd/index/Backgroun

[PATCH] D55417: [clangd] Change disk-backed storage to be atomic

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/BackgroundIndexStorage.cpp:42 + llvm::Twine TempPath(OutPath, ".tmp."); + TempPath.concat(std::to_string(rand())); + std::error_code EC; There's a helper in LLVM that will do this, `llvm::createUniq

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

2018-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. > You also get into trouble because there are many header files that it add > LLVM_NODISCARD to but they don't include "Compiler.h" where LLVM is defined > (so you end up with lots of errors) > 3>C:\llvm\include\llvm/ADT/iterator_range.h(46): error C3646: 'IteratorT'

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added reviewers: hokein, ilya-biryukov, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay. Code completion will suggest symbols from any scope (incl. inaccessible scopes) when there's no qualifier explicitly specified. As we are assign

[PATCH] D55650: [clangd] Fix an assertion failure in background index.

2018-12-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. When indexing a file which contains an uncompilable error, we will trigger an assertion failure -- the IndexFileIn data is not set, but we access them in th

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

2018-12-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In fact, the existing `modernize-make-unique` can be configured to support `absl::make_unique`, you'd just need to configure the check option `MakeSmartPtrFunction` to `absl::make_unique` (this is what we do inside google). The biggest missing part of the `modernize-mak

[clang-tools-extra] r349031 - [clangd] Move the utility function to anonymous namespace, NFC.

2018-12-13 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Dec 13 05:07:29 2018 New Revision: 349031 URL: http://llvm.org/viewvc/llvm-project?rev=349031&view=rev Log: [clangd] Move the utility function to anonymous namespace, NFC. Modified: clang-tools-extra/trunk/clangd/index/Background.cpp Modified: clang-tools-extra/trunk

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

2018-12-13 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D55044#1329604 , @hokein wrote: > In fact, the existing `modernize-make-unique` can be configured to support > `absl::make_unique`, you'd just need to configure the check option > `MakeSmartPtrFunction` to `absl::make_uniqu

[clang-tools-extra] r349032 - [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.

2018-12-13 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Dec 13 05:09:50 2018 New Revision: 349032 URL: http://llvm.org/viewvc/llvm-project?rev=349032&view=rev Log: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier. Reviewers: ilya-biryukov Subscribers: javed.absar, ioeric, MaskRay, jkorous, arphama

[PATCH] D55359: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier.

2018-12-13 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349032: [clangd] Avoid emitting Queued status when we are able to acquire the Barrier. (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LA

[clang-tools-extra] r349033 - [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-13 Thread Haojian Wu via cfe-commits
Author: hokein Date: Thu Dec 13 05:17:04 2018 New Revision: 349033 URL: http://llvm.org/viewvc/llvm-project?rev=349033&view=rev Log: [clangd] Refine the way of checking a declaration is referenced by the written code. Summary: The previous solution (checking the AST) is not a reliable way to det

[PATCH] D55191: [clangd] Refine the way of checking a declaration is referenced by the written code.

2018-12-13 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE349033: [clangd] Refine the way of checking a declaration is referenced by the written… (authored by hokein, committed by ). Changed prior to commit: https://reviews.llvm.org/D55191?vs=177190&id=17803

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via Phabricator via cfe-commits
hwright updated this revision to Diff 178039. hwright marked an inline comment as done. hwright added a comment. Rebase and update documentation CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 Files: clang-tidy/abseil/AbseilTidyModule.cpp cl

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via Phabricator via cfe-commits
hwright marked an inline comment as done. hwright added a comment. I've updated the documentation, and the rebased to `master`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://reviews.llvm.org/D55245 ___ cfe-commits mailing

[PATCH] D55646: [ASTImporter] Make ODR diagnostics warning by default

2018-12-13 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. The primary reason why want these to be Warnings instead of Errors because there are many false positive ODR Errors at the moment. These are not fatal errors but there is a maximum error count which once reached the whole process (analysis) is aborted. Usually, such fal

[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

2018-12-13 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. It seems like we have some assumptions about what people might be trying to do in most of the cases, but i think it is OK since this never performs worse than the older version. ===

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. One thing: Could you please check the utility-scripts in clang-tidy that create new checks, if they need adjustments? Not sure if we have something in there that relies on the old structure. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://re

[PATCH] D55363: [clangd] Expose FileStatus in LSP.

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Sorry if I missed any important design discussions here, but wanted to clear up what information we are trying to convey to the user with the status messages? E.g. why seeing "building preamble", "building file" or "queued" in the status bar can be useful to the us

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. LGTM with the doc-nit. Comment at: docs/clang-tidy/checks/abseil-duration-subtraction.rst:33 +Note: As with other ``clang-tidy`` checks, it is possible that multiple fixes +may overlap (as in the case of nested expres

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In D55595#1329647 , @JonasToth wrote: > One thing: Could you please check the utility-scripts in clang-tidy that > create new checks, if they need adjustments? Not sure if we have something in > there that relies on the old structu

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

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The `RecursiveASTVisitor` seems to have the code that properly traverses parameters and return types of lambdas. Any ideas why it's not getting called here? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55437/new/ https://reviews.

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth accepted this revision. JonasToth added a comment. LGTM, chatted with steveire on IRC: blocking this for a better cmake based solution makes no sense. So your free to commit :) Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55595/new/ http

[PATCH] D55650: [clangd] Fix an assertion failure in background index.

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. I think the description is misleading, you are saying that we were triggering an assertion and you are fixing that. But in reality, we were not triggering any assertions, this patch is adding the assertions right? Comment at: clangd/index/Background.

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/tool/ClangdMain.cpp:144 "can insert scope qualifiers."), -cl::init(false), cl::Hidden); +cl::init(true)); why not keep it hidden ? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACT

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

2018-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/modernize-use-nodiscard.cpp:126 +template +class Bar +{ MyDeveloperDay wrote: > curdeius wrote: > > JonasToth wrote: > > > I think the template tests should be improved. > > > What happens for `T empty(

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

2018-12-13 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: test/clang-tidy/modernize-use-nodiscard.cpp:183 +// CHECK-MESSAGES-NOT: warning: +// CHECK-FIXES: bool f33(T&) const + No warning -> No fix -> You can ellide the `CHECK-FIXES` here and elsewhere. FileCheck

[clang-tools-extra] r349038 - [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via cfe-commits
Author: yvvan Date: Thu Dec 13 06:37:17 2018 New Revision: 349038 URL: http://llvm.org/viewvc/llvm-project?rev=349038&view=rev Log: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin Extract code that forces linking to the separate header and include it in both plugin

[PATCH] D55595: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin

2018-12-13 Thread Ivan Donchevskii via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE349038: [clang-tidy] Share the forced linking code between clang-tidy tool and plugin (authored by yvvan, committed by ). Changed prior to commit: https://reviews.llvm.org/D55595?vs=177832&id=178048#t

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

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

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Eric Liu via Phabricator via cfe-commits
ioeric marked an inline comment as done. ioeric added inline comments. Comment at: clangd/tool/ClangdMain.cpp:144 "can insert scope qualifiers."), -cl::init(false), cl::Hidden); +cl::init(true)); kadircet wrote: > why not keep it hidden ? We hi

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

2018-12-13 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, vitalybuka, joerg, bkramer. Herald added subscribers: jfb, cryptoad. Requested by @krytarowski with the following rationale: We intend to support only reentrant interfaces in interceptors and if we use -lpthread without _REENT

[PATCH] D55483: Introduce the callback attribute and emit !callback metadata

2018-12-13 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked 2 inline comments as done. jdoerfert added inline comments. Comment at: include/clang/Basic/Builtins.def:942 LIBBUILTIN(alloca, "v*z", "f", "stdlib.h", ALL_GNU_LANGUAGES) +LIBBUILTIN(qsort_r, "", "fC<3,-1,-1,4>", "stdlib.h", ALL_GNU_LANGUA

[PATCH] D55417: [clangd] Change disk-backed storage to be atomic

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 178059. kadircet marked 2 inline comments as done. kadircet added a comment. - Use creauteUniqueFile. - Don't remove on success. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55417/new/ https://reviews.llvm.org

[PATCH] D53699: [ASTImporter] Fix inequality of functions with different attributes

2018-12-13 Thread Gabor Marton via Phabricator via cfe-commits
martong updated this revision to Diff 178060. martong marked 2 inline comments as done. martong added a comment. - Add more tests and simplify comment Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53699/new/ https://reviews.llvm.org/D53699 Files: lib/AST/ASTSt

[PATCH] D53699: [ASTImporter] Fix inequality of functions with different attributes

2018-12-13 Thread Gabor Marton via Phabricator via cfe-commits
martong marked 4 inline comments as done. martong added inline comments. Comment at: lib/AST/ASTStructuralEquivalence.cpp:302 +/// is inspired by ASTContext::mergeFunctionTypes(), we compare calling +/// conventions bits but must not compare some other bits, e.g. the noreturn +//

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/tool/ClangdMain.cpp:144 "can insert scope qualifiers."), -cl::init(false), cl::Hidden); +cl::init(true)); ioeric wrote: > kadircet wrote: > > why not keep it hidden ? > We hid the flag because

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. LGTM. When we know everyone is happy with the new behaivour, we can remove the flag altogether. Comment at: clangd/tool/ClangdMain.cpp:144 "can insert scope qualifiers."), -cl::init(false), cl::H

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

2018-12-13 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael created this revision. mikael added reviewers: Anastasia, rjmccall. Herald added subscribers: cfe-commits, yaxunl. - Implicity and explicity defaulted class members - Resolved the FIXMEs in addrspace-of-this.cl Repository: rC Clang https://reviews.llvm.org/D55656 Files: include/clan

[clang-tools-extra] r349049 - [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Eric Liu via cfe-commits
Author: ioeric Date: Thu Dec 13 07:35:43 2018 New Revision: 349049 URL: http://llvm.org/viewvc/llvm-project?rev=349049&view=rev Log: [clangd] Enable cross-namespace completions by default in clangd Summary: Code completion will suggest symbols from any scope (incl. inaccessible scopes) when there

[PATCH] D55649: [clangd] Enable cross-namespace completions by default in clangd

2018-12-13 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349049: [clangd] Enable cross-namespace completions by default in clangd (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION ht

r349050 - [CodeComplete] Set preferred type to bool on conditions

2018-12-13 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Dec 13 07:36:32 2018 New Revision: 349050 URL: http://llvm.org/viewvc/llvm-project?rev=349050&view=rev Log: [CodeComplete] Set preferred type to bool on conditions Reviewers: kadircet Reviewed By: kadircet Subscribers: cfe-commits Differential Revision: https://revi

[PATCH] D55431: [CodeComplete] Set preferred type to bool on conditions

2018-12-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349050: [CodeComplete] Set preferred type to bool on conditions (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION https://

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

2018-12-13 Thread Mikael Nilsson via Phabricator via cfe-commits
mikael marked an inline comment as done. mikael added inline comments. Comment at: lib/Sema/SemaInit.cpp:4539 + if (InitCategory.isPRValue() || InitCategory.isXValue()) +T1Quals.removeAddressSpace(); + This is probably not the correct way to solve this. But

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

2018-12-13 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. Firefox is good enough. Thanks for finding http://comments.gmane.org/gmane.comp.compilers.clang.scm/47203 -- this was from before we did reviews on phab, so I was able to find the review in m

[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 178069. ilya-biryukov marked 4 inline comments as done. ilya-biryukov added a comment. - Address review comments Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55648/new/ https://reviews.llvm.org/D55648 Files: include

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.h:121 bool ShouldStop = false; - std::deque Queue; + std::list> Tasks; std::vector ThreadPool; // FIXME: Abstract this away. Why not `std::deque`? Repository: rCTE Clang Tools Ex

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet marked an inline comment as done. kadircet added inline comments. Comment at: clangd/index/Background.h:121 bool ShouldStop = false; - std::deque Queue; + std::list> Tasks; std::vector ThreadPool; // FIXME: Abstract this away. ilya-biryukov wrote

[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Thanks for the review! Comment at: lib/Sema/SemaCodeComplete.cpp:4928 +if (LHSType->isIntegralOrEnumerationType()) + return S.getASTContext().IntTy; +return QualType(); kadircet wrote: > why not LHSType ? The shifts a

[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: lib/Sema/SemaCodeComplete.cpp:4928 +if (LHSType->isIntegralOrEnumerationType()) + return S.getASTContext().IntTy; +return QualType(); ilya-biryukov wrote: > kadircet wrote: > > why not LHSType ? > The shift

[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 178071. ilya-biryukov added a comment. Herald added a subscriber: arphaman. - Update the test after changes Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55648/new/ https://reviews.llvm.org/D55648 Files: include/clan

r349054 - Make -Wstring-plus-int warns even if when the result is not out of bounds

2018-12-13 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Thu Dec 13 08:06:23 2018 New Revision: 349054 URL: http://llvm.org/viewvc/llvm-project?rev=349054&view=rev Log: Make -Wstring-plus-int warns even if when the result is not out of bounds Summary: Patch by Arnaud Bienner Reviewers: sylvestre.ledru, thakis Reviewed By: thak

r349053 - [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Dec 13 08:06:11 2018 New Revision: 349053 URL: http://llvm.org/viewvc/llvm-project?rev=349053&view=rev Log: [CodeComplete] Fill preferred type on binary expressions Reviewers: kadircet Reviewed By: kadircet Subscribers: arphaman, cfe-commits Differential Revision: h

[PATCH] D55648: [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC349053: [CodeComplete] Fill preferred type on binary expressions (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D55648?vs=178071&id=178072#toc Repository: r

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

2018-12-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349054: Make -Wstring-plus-int warns even if when the result is not out of bounds (authored by sylvestre, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST

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

2018-12-13 Thread Arnaud Bienner via Phabricator via cfe-commits
ArnaudBienner added a comment. Thanks for the archeological work and finding the conversation related to the initial patch :) Interesting that the last case you mentioned is exactly the bug I had in my project (though in your case this would have been intended). Repository: rL LLVM CHANGES

[PATCH] D55455: Remove stat cache chaining as it's no longer needed after PTH support has been removed

2018-12-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith added a comment. This revision is now accepted and ready to land. It has been about a week since your cfe-dev post with no concerns. I think you can commit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55455/new/ h

[PATCH] D55657: [libcxx] [regex] Use distinct __regex_word on NetBSD

2018-12-13 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: krytarowski, howard.hinnant, dsanders, EricWF. Herald added subscribers: libcxx-commits, ldionne. NetBSD defines character classes up to 0x2000. Use 0x8000 as a safe __regex_word that hopefully will not collide with other values in the foresee

[PATCH] D54489: Implement -frecord-command-line (-frecord-gcc-switches)

2018-12-13 Thread Scott Linder via Phabricator via cfe-commits
scott.linder updated this revision to Diff 178082. scott.linder added a comment. Update documentation to match section naming change, and to explicitly note that the section format differs from the equivalent GCC format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54489/new/ https://

r349059 - Fix CodeCompleteTest.cpp for older gcc plus ccache builds

2018-12-13 Thread David Green via cfe-commits
Author: dmgreen Date: Thu Dec 13 09:20:06 2018 New Revision: 349059 URL: http://llvm.org/viewvc/llvm-project?rev=349059&view=rev Log: Fix CodeCompleteTest.cpp for older gcc plus ccache builds Some versions of gcc, especially when invoked through ccache (-E), can have trouble with raw string liter

Re: r349053 - [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread David Green via cfe-commits
Hello! Certain version of gcc (along with ccache iirc, where they use -E) don't like these raw strings literals inside macros. This happens: https://godbolt.org/g/fsXjB7 I've tried to fix it up in https://reviews.llvm.org/rL349059. My choice of variable nam

r349061 - [CodeComplete] Temporarily disable failing assertion

2018-12-13 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Dec 13 09:23:48 2018 New Revision: 349061 URL: http://llvm.org/viewvc/llvm-project?rev=349061&view=rev Log: [CodeComplete] Temporarily disable failing assertion Found the case in the clang codebase where the assertion fires. To avoid crashing assertion-enabled builds b

[PATCH] D55658: Avoid Decl::getASTContext in hot paths where possible, Part 1

2018-12-13 Thread Bruno Ricci via Phabricator via cfe-commits
riccibruno created this revision. riccibruno added a reviewer: aaron.ballman. riccibruno added a project: clang. Herald added subscribers: cfe-commits, arphaman. Herald added a reviewer: shafik. `Decl::getASTContext` and `DeclContext::getParentASTContext` are not that cheap since they must walk ba

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/index/Background.h:121 bool ShouldStop = false; - std::deque Queue; + std::list> Tasks; std::vector ThreadPool; // FIXME: Abstract this away. kadircet wrote: > ilya-biryukov wrote: > > Why not `std::

Re: r349053 - [CodeComplete] Fill preferred type on binary expressions

2018-12-13 Thread Ilya Biryukov via cfe-commits
Hi David, Thanks for the fix. And sorry for the inconvenience, I've been hit by this so many times and yet I forget again and again... On Thu, Dec 13, 2018 at 6:25 PM David Green wrote: > Hello! > > Certain version of gcc (along with ccache iirc, where they use -E) don't > like these raw string

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2018-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added a reviewer: rjmccall. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. This patch fixes a bug where clang doesn’t reject union fields of non-trivial struct types: struct S0 { id x; }; struct S1 { id y;

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

2018-12-13 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Thu Dec 13 09:32:38 2018 New Revision: 349063 URL: http://llvm.org/viewvc/llvm-project?rev=349063&view=rev Log: [CodeComplete] Adhere to LLVM naming style in CodeCompletionTest. NFC Also reuses the same var for multiple to reduce the chance of accidentally referecing the p

r349064 - Try to update the test to fix the breakage

2018-12-13 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Thu Dec 13 09:39:02 2018 New Revision: 349064 URL: http://llvm.org/viewvc/llvm-project?rev=349064&view=rev Log: Try to update the test to fix the breakage With the new warning, we are showing one more output in the test. Modified: cfe/trunk/bindings/python/tests/cinde

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

2018-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked 6 inline comments as done. MyDeveloperDay added a comment. >> >> >> unsigned BlockOrCode = 0; >> llvm::ErrorOr Res = skipUntilRecordOrBlock(Stream, BlockOrCode); >> if (!Res) >> Res.getError(); >> > > AFAIK `llvm::Error` must be consumed because if it goes

[PATCH] D55659: [Sema][ObjC] Disallow non-trivial C struct fields in unions

2018-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. Just to clarify, this patch doesn't change clang's handling of C++ unions that have non-static data members with non-trivial special member functions. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55659/new/ https://reviews.llvm.org/D55

r349065 - Reinstate DW_AT_comp_dir support after D55519.

2018-12-13 Thread Adrian Prantl via cfe-commits
Author: adrian Date: Thu Dec 13 09:53:29 2018 New Revision: 349065 URL: http://llvm.org/viewvc/llvm-project?rev=349065&view=rev Log: Reinstate DW_AT_comp_dir support after D55519. The DIFile used by the CU is special and distinct from the main source file. Its directory part specifies what become

[PATCH] D55545: Allow IncludeSorter to use #import for Objective-C files

2018-12-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Please add a unittest for it, you can add it in `unittests/clang-tidy/IncludeInserterTest.cpp`. Comment at: clang-tidy/utils/IncludeSorter.cpp:116 bool IsAngled) { + std::string IncludeDirectiv

[PATCH] D55545: Allow IncludeSorter to use #import for Objective-C files

2018-12-13 Thread Ben Hamilton via Phabricator via cfe-commits
benhamilton added inline comments. Comment at: clang-tidy/utils/IncludeSorter.cpp:116 bool IsAngled) { + std::string IncludeDirective = LangOpts->ObjC ? "#import " : "#include "; std::string IncludeStmt =

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/Background.h:121 bool ShouldStop = false; - std::deque Queue; + std::list> Tasks; std::vector ThreadPool; // FIXME: Abstract this away. ilya-biryukov wrote: > kadircet wrote: > > ilya-biryukov wrote

[PATCH] D55315: [clangd] Only reduce priority of a thread for indexing.

2018-12-13 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 178094. kadircet marked 2 inline comments as done. kadircet added a comment. - Use std::deque instead of std::list Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55315/new/ https://reviews.llvm.org/D55315 Files

[PATCH] D55640: [clang-tidy] Implement a check for large Objective-C type encodings 🔍

2018-12-13 Thread Eugene Zelenko via Phabricator via cfe-commits
Eugene.Zelenko added inline comments. Comment at: docs/clang-tidy/checks/objc-type-encoding-size.rst:6 + +Finds Objective-C type encodings that exceed a configured threshold. + Please synchronize with Release Notes. Repository: rCTE Clang Tools Extra CHANGES

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

2018-12-13 Thread Andy Zhang via Phabricator via cfe-commits
axzhang added a comment. In D55044#1329604 , @hokein wrote: > In fact, the existing `modernize-make-unique` can be configured to support > `absl::make_unique`, you'd just need to configure the check option > `MakeSmartPtrFunction` to `absl::make_unique`

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

2018-12-13 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: erik.pilkington, rjmccall, rsmith. ahatanak added a project: clang. Herald added subscribers: dexonsmith, jkorous. Sema shouldn't record uses of weak variables when they are used in an unevaluated context. For example: decltype([obj we

[clang-tools-extra] r349073 - [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via cfe-commits
Author: hwright Date: Thu Dec 13 11:23:52 2018 New Revision: 349073 URL: http://llvm.org/viewvc/llvm-project?rev=349073&view=rev Log: [clang-tidy] Add the abseil-duration-subtraction check Summary: This check uses the context of a subtraction expression as well as knowledge about the Abseil Time

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via Phabricator via cfe-commits
hwright added a comment. Thanks for reviewing, I'll go ahead and commit. I've also removed the hash specialization, since we moved to `llvm::IndexedMap` instead of `std::unordered_map` inside of `getInverseForScale`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55245/new/ https://rev

[PATCH] D55245: [clang-tidy] Add the abseil-duration-subtraction check

2018-12-13 Thread Hyrum Wright via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL349073: [clang-tidy] Add the abseil-duration-subtraction check (authored by hwright, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D55245?vs=

  1   2   >