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

2018-12-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added inline comments. Comment at: lib/Sema/SemaDecl.cpp:9933 +llvm::any_of(FPT->param_types(), + [](QualType Q) { return hasNoexcept(Q); })) + return true; You don't need this lambda. Comment at:

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

2018-12-03 Thread Matt Davis via Phabricator via cfe-commits
mattd updated this revision to Diff 176515. mattd added a comment. - Move the HasNoexcept lambda to its own static function. - Added an additional check in HasNoexcept to recursively check return values. - Modified the parameter check in Sema::CheckFunctionDeclaration to use llvm::any_of, all we

[PATCH] D53787: [Sema] Provide -fvisibility-global-new-delete-hidden option

2018-12-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Looks good with minor changes, thanks. Comment at: clang/include/clang/Basic/LangOptions.def:228 BENIGN_LANGOPT(InlineVisibilityHidden , 1, 0, "hidden default visibility

r348233 - Fix -Wmismatched-tags to not warn on redeclarations of structs in system

2018-12-03 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Dec 3 18:45:28 2018 New Revision: 348233 URL: http://llvm.org/viewvc/llvm-project?rev=348233=rev Log: Fix -Wmismatched-tags to not warn on redeclarations of structs in system headers. Previously, we would only check whether the new declaration is in a system header, but

r348214 - [Hexagon] Fix intrinsic test

2018-12-03 Thread Krzysztof Parzyszek via cfe-commits
Author: kparzysz Date: Mon Dec 3 15:52:33 2018 New Revision: 348214 URL: http://llvm.org/viewvc/llvm-project?rev=348214=rev Log: [Hexagon] Fix intrinsic test Modified: cfe/trunk/test/CodeGen/builtins-hexagon.c Modified: cfe/trunk/test/CodeGen/builtins-hexagon.c URL:

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'm glad you brought this stuff up, found two more bugs to fix. In D54563#1317678 , @Szelethus wrote: > Can you add tests for that just in case? :) The test works, but i noticed that we aren't respecting const references. That is,

[PATCH] D53850: Declares __cpu_model as dso local

2018-12-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53850/new/ https://reviews.llvm.org/D53850 ___

[PATCH] D55250: [clangd] Enhance macro hover to see full definition

2018-12-03 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle created this revision. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, ilya-biryukov. Signed-off-by: Marc-Andre Laperle Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55250 Files: clangd/XRefs.cpp

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D54563#1306358 , @Szelethus wrote: > This suggests to me that `list1.splice(list1.begin(), std::move(list2))` > leaves `list2` in a valid, well-defined, but empty state. I think this should work automagically. Because `list2`

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: test/Analysis/use-after-move.cpp:331 for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is true. Entering loop body}} expected-note {{Loop condition is true. Entering loop body}}

[PATCH] D51568: [modules] Add `-fno-absolute-module-directory` flag for relocatable modules

2018-12-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D51568#1314004 , @andrewjcg wrote: > > I don't think we need to change the serialization format for this: a > > serialized path beginning with / is already treated as absolute and any > > other path is already treated as

[PATCH] D53787: [Sema] Provide -fvisibility-global-new-delete-hidden option

2018-12-03 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348234: [Sema] Provide -fvisibility-global-new-delete-hidden option (authored by phosek, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In D54560#1302051 , @MTC wrote: > > The "moved-from" terminology we adopt here still feels a bit weird to me, > > but i don't have a better suggestion, so i just removed the single-quotes > > so that to at least feel proud about

r348229 - [analyzer] MoveChecker: Improve warning and note messages.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 18:00:29 2018 New Revision: 348229 URL: http://llvm.org/viewvc/llvm-project?rev=348229=rev Log: [analyzer] MoveChecker: Improve warning and note messages. The warning piece traditionally describes the bug itself, i.e. "The bug is a _", eg. "Attempt to

[PATCH] D54560: [analyzer] MoveChecker Pt.3: Improve warning messages a bit.

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348229: [analyzer] MoveChecker: Improve warning and note messages. (authored by dergachev, committed by ). Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54560/new/

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Kristüf Umann via Phabricator via cfe-commits
Szelethus added a comment. Can you add tests for that just in case? :) Comment at: test/Analysis/use-after-move.cpp:331 for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is true. Entering loop body}} expected-note {{Loop condition is true. Entering

r348218 - NFC: Make this test kinder on downstream forks

2018-12-03 Thread Erik Pilkington via cfe-commits
Author: epilk Date: Mon Dec 3 16:31:31 2018 New Revision: 348218 URL: http://llvm.org/viewvc/llvm-project?rev=348218=rev Log: NFC: Make this test kinder on downstream forks Downstream forks that have their own attributes often run into this test failing when a new attribute is added to clang

[PATCH] D52117: Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.

2018-12-03 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/CodeGen/CGLoopInfo.cpp:372 + if (Active.size() >= 2) { +LoopInfo = reverse(Active).begin()[1]; +NewFront.addAccGroups(Front.getNestedAccGroups()); reverse(Active).begin() looks odd. Can we get the same

[PATCH] D54466: [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54466/new/ https://reviews.llvm.org/D54466 ___ cfe-commits mailing list

[PATCH] D53787: [Sema] Provide -fvisibility-global-new-delete-hidden option

2018-12-03 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 176533. phosek marked 2 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53787/new/ https://reviews.llvm.org/D53787 Files: clang/include/clang/Basic/LangOptions.def

[PATCH] D54604: Automatic variable initialization

2018-12-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: include/clang/Driver/ToolChain.h:355 + virtual LangOptions::TrivialAutoVarInitKind + GetDefaultTrivialAutoVarInit() const { +return LangOptions::TrivialAutoVarInitKind::Uninitialized; I wouldn't introduce this

[PATCH] D53850: Declares __cpu_model as dso local

2018-12-03 Thread Stephen Hines via Phabricator via cfe-commits
srhines added a comment. Craig, does this look ok now? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53850/new/ https://reviews.llvm.org/D53850 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

r348234 - [Sema] Provide -fvisibility-global-new-delete-hidden option

2018-12-03 Thread Petr Hosek via cfe-commits
Author: phosek Date: Mon Dec 3 19:25:25 2018 New Revision: 348234 URL: http://llvm.org/viewvc/llvm-project?rev=348234=rev Log: [Sema] Provide -fvisibility-global-new-delete-hidden option When the global new and delete operators aren't declared, Clang provides and implicit declaration, but this

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Kristüf Umann via Phabricator via cfe-commits
Szelethus added a comment. Okay, I submit! :D Comment at: test/Analysis/use-after-move.cpp:260-262 for (int i = 0; i < bignum(); i++) { // expected-note {{Loop condition is false. Execution jumps to the end of the function}} rightRefCall(std::move(a));//

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348235: [analyzer] MoveChecker: Add more common state resetting methods. (authored by dergachev, committed by ). Changed prior to commit: https://reviews.llvm.org/D54563?vs=176512=176537#toc

r348235 - [analyzer] MoveChecker: Add more common state resetting methods.

2018-12-03 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Dec 3 19:38:08 2018 New Revision: 348235 URL: http://llvm.org/viewvc/llvm-project?rev=348235=rev Log: [analyzer] MoveChecker: Add more common state resetting methods. Includes "resize" and "shrink" because they can reset the object to a known state in certain

[PATCH] D55246: AST: Relax an assertion in constexpr constructor evaluation.

2018-12-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: rsmith. Herald added a subscriber: llvm-commits. It's possible for the base type specified in a constructor to be qualified via sugar, so the existing assertion was too strict. Relax it so that we only check that the unqualified types are the same.

[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

2018-12-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think `-fvisibility=hidden` isn't good enough because you want to infer hidden visibility even for external symbol references, and that's just not how global visibility works. But after this discussion, I'm prepared to accept that (1) we should have some sort of

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 176512. NoQ added a comment. Add a TODO. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54563/new/ https://reviews.llvm.org/D54563 Files: lib/StaticAnalyzer/Checkers/MoveChecker.cpp test/Analysis/use-after-move.cpp Index:

[PATCH] D54563: [analyzer] MoveChecker Pt.4: Add a few more state reset methods.

2018-12-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Hmm, i shouldn't have included `shrink_to_fit`. It definitely keeps the object in unspecified state if it is already in unspecified state. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54563/new/ https://reviews.llvm.org/D54563

r348238 - Remove unnecessary include.

2018-12-03 Thread Richard Trieu via cfe-commits
Author: rtrieu Date: Mon Dec 3 20:53:18 2018 New Revision: 348238 URL: http://llvm.org/viewvc/llvm-project?rev=348238=rev Log: Remove unnecessary include. Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.h Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.h URL:

[PATCH] D55189: Extract TextNodeDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Start by moving some utilities to it. It will eventually house dumping of individual nodes (after indentation etc has already been accounted for). Repository: rC Clang

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55188 Files: include/clang/AST/ASTDumperUtils.h lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176327. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Do not introduce a new local var, reuse existing Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55124/new/

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: lib/Parse/ParseExprCXX.cpp:248 // seen a leading '::' or part of a nested-name-specifier. + ParsedType ObjectTypeForCompletion = ObjectType; ObjectType = nullptr; kadircet wrote: > What about

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

2018-12-03 Thread Marina Kalashina via Phabricator via cfe-commits
MarinaKalashina updated this revision to Diff 176328. MarinaKalashina added a comment. Fixes: - empty line before 'Standalone tool' - table columns with '+/-' aligned - line width limited to 80 (except for the table) Additions: - clang-tidy-vs plugin - Clangd in the intro, the table, and

[PATCH] D55127: [OpenCL] Diagnose conflicting address spaces between template definition and its instantiation

2018-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked an inline comment as done. Anastasia added inline comments. Comment at: lib/Sema/SemaType.cpp:7232 + if (D.getContext() == DeclaratorContext::TemplateArgContext) +// Do not deduce address space for non-pointee type in template arg. +;

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. In D54995#1316457 , @ilya-biryukov wrote: > In D54995#1316437 , @yvvan wrote: > > > Ok, no global option. > > Why not placing your VolatileFSProvider in clang so that libclang could > >

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

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

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

2018-12-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp marked 2 inline comments as done. dkrupp added inline comments. Comment at: test/clang-tidy/misc-redundant-expression.cpp:109 #define COND_OP_OTHER_MACRO 9 +#define COND_OP_THIRD_MACRO COND_OP_MACRO int TestConditional(int x, int y) { JonasToth wrote: >

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan planned changes to this revision. yvvan added a comment. Ok, no global option. Why not placing your VolatileFSProvider in clang so that libclang could you it too? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54995/new/ https://reviews.llvm.org/D54995

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54995#1316437 , @yvvan wrote: > Ok, no global option. > Why not placing your VolatileFSProvider in clang so that libclang could you > it too? Would be happy to, will need to figure out what to do with PCH and PCM

r348126 - Portable Python script across Python version

2018-12-03 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Mon Dec 3 04:11:21 2018 New Revision: 348126 URL: http://llvm.org/viewvc/llvm-project?rev=348126=rev Log: Portable Python script across Python version Python2 supports the two following equivalent construct raise ExceptionType, exception_value and

r348116 - [CMake] Store path to vendor-specific headers in clang-headers target property

2018-12-03 Thread Stefan Granitz via cfe-commits
Author: stefan.graenitz Date: Mon Dec 3 02:34:25 2018 New Revision: 348116 URL: http://llvm.org/viewvc/llvm-project?rev=348116=rev Log: [CMake] Store path to vendor-specific headers in clang-headers target property Summary: LLDB.framework wants a copy these headers. With this change LLDB can

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. Comment is a bit out of date as this is no longer specific to

[PATCH] D55190: Move dump of individual comment nodes to NodeDumper

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added a subscriber: cfe-commits. Repository: rC Clang https://reviews.llvm.org/D55190 Files: include/clang/AST/ASTTextNodeDumper.h lib/AST/ASTDumper.cpp Index: lib/AST/ASTDumper.cpp

Re: r348038 - [analyzer] Emit an error for invalid -analyzer-config inputs

2018-12-03 Thread Ilya Biryukov via cfe-commits
Hi Kristóf, There is clearly a typo in checking for -ctu-dir and -model-path being a directory. Instead of checking -model-path, the code was checking for -ctu-dir twice. Landed a fix in r348125. On Fri, Nov 30, 2018 at 10:27 PM Kristof Umann via cfe-commits < cfe-commits@lists.llvm.org> wrote:

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-12-03 Thread Michael Platings via Phabricator via cfe-commits
michaelplatings accepted this revision. michaelplatings added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55121/new/ https://reviews.llvm.org/D55121 ___ cfe-commits mailing

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

2018-12-03 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp updated this revision to Diff 176372. dkrupp added a comment. new undef/defined testcase added CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55125/new/ https://reviews.llvm.org/D55125 Files: clang-tidy/misc/RedundantExpressionCheck.cpp

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked 4 inline comments as done. courbet added inline comments. Comment at: lib/AST/NestedNameSpecifier.cpp:308-310 +if (ResolveTemplateArguments && getAsRecordDecl()) { + if (const auto *Record = + dyn_cast(getAsRecordDecl())) {

[PATCH] D55124: [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added inline comments. This revision is now accepted and ready to land. Comment at: lib/Parse/ParseExprCXX.cpp:248 // seen a leading '::' or part of a nested-name-specifier. + ParsedType ObjectTypeForCompletion = ObjectType;

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet updated this revision to Diff 176320. courbet added a comment. - Fix spurious formating changes - Add tests - Improve readability. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54903/new/ https://reviews.llvm.org/D54903 Files:

[PATCH] D55136: [OpenCL][Sema] Improve BuildResolvedCallExpr handling of builtins

2018-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:5556 // Extract the return type from the (builtin) function pointer type. -auto FnPtrTy = Context.getPointerType(FDecl->getType()); +// FIXME Several builtins still have setType in

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 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. The isIndexedForCodeCompletion is called in the code patch of SymbolCollector. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D55206

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. It seems there are still cases where memory-mapping should be preferred, even on Windows, specifically: - PCH files produced by libclang: they are huge, loading them in memory is wasteful and they can clearly be used - (maybe?) PCM (precompiled module) files:

r348125 - [Analyzer] Actually check for -model-path being a directory

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 03:34:08 2018 New Revision: 348125 URL: http://llvm.org/viewvc/llvm-project?rev=348125=rev Log: [Analyzer] Actually check for -model-path being a directory The original patch (r348038) clearly contained a typo and checked for '-ctu-dir' twice. Modified:

r348128 - [AST][NFC] Pack CXXDeleteExpr

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 04:32:32 2018 New Revision: 348128 URL: http://llvm.org/viewvc/llvm-project?rev=348128=rev Log: [AST][NFC] Pack CXXDeleteExpr Use the newly available space in the bit-fields of Stmt. This saves 8 bytes per CXXDeleteExpr. NFC. Modified:

[PATCH] D55068: NFC: Simplify dumpStmt child handling

2018-12-03 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 D55068#1315924 , @steveire wrote: > Aaron, you added tests for the existing behavior which pass after this patch. > Is there anything

[clang-tools-extra] r348130 - [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Dec 3 04:53:19 2018 New Revision: 348130 URL: http://llvm.org/viewvc/llvm-project?rev=348130=rev Log: [clangd] Get rid of AST matchers in CodeComplete, NFC Summary: The isIndexedForCodeCompletion is called in the code patch of SymbolCollector. Reviewers: kadircet

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 176370. hokein marked an inline comment as done. hokein added a comment. Using break. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55206/new/ https://reviews.llvm.org/D55206 Files: clangd/CodeComplete.cpp

[PATCH] D54995: [MemoryBuffer] Add the setter to be able to force disabled mmap

2018-12-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Support/MemoryBuffer.cpp:42 +static bool MemoryMappingEnabled = true; + Such global flags are a bad idea in general, and really not great in LLVM's case. The editor would set it for "it's" llvm, but that will

r348124 - [Analysis] Properly prepare test env in test/Analysis/undef-call.c

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 03:28:17 2018 New Revision: 348124 URL: http://llvm.org/viewvc/llvm-project?rev=348124=rev Log: [Analysis] Properly prepare test env in test/Analysis/undef-call.c The test expectes the '%T/ctudir' to be present, but does not create it. Modified:

[PATCH] D55128: [CMake] Store path to vendor-specific headers in clang-headers target property

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348116: [CMake] Store path to vendor-specific headers in clang-headers target property (authored by stefan.graenitz, committed by ). Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/CodeComplete.cpp:1654 +default: + return false; +}; nit: maybe just `break` in here Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55206/new/

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

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

r348127 - Portable Python script across version

2018-12-03 Thread Serge Guelton via cfe-commits
Author: serge_sans_paille Date: Mon Dec 3 04:12:48 2018 New Revision: 348127 URL: http://llvm.org/viewvc/llvm-project?rev=348127=rev Log: Portable Python script across version Have all classes derive from object: that's implicitly the default in Python3, it needs to be done explicilty in

Re: r348123 - [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST'

2018-12-03 Thread Aaron Ballman via cfe-commits
On Mon, Dec 3, 2018 at 6:29 AM Ilya Biryukov via cfe-commits wrote: > > Author: ibiryukov > Date: Mon Dec 3 03:26:35 2018 > New Revision: 348123 > > URL: http://llvm.org/viewvc/llvm-project?rev=348123=rev > Log: > [clang] Do not read from 'test/SemaCXX/Inputs' inside 'test/AST' > > Our integrate

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson created this revision. arichardson added reviewers: george.burgess.iv, aaron.ballman, jdenny. Herald added a subscriber: cfe-commits. I have been trying to statically find and analyze all calls to heap allocation functions to determine how many of them use sizes known at compile time

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson updated this revision to Diff 176368. arichardson added a comment. Remove RUN: line added for debugging Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55212/new/ https://reviews.llvm.org/D55212 Files: include/clang/Basic/Attr.td

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

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: ilya-biryukov. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ioeric. The previous solution (checking the AST) is not a reliable way to determine whether a declaration is explicitly referenced by the source code, we are still

[PATCH] D55121: Make several Python scripts portable across Python2 and Python 3

2018-12-03 Thread serge via Phabricator via cfe-commits
serge-sans-paille updated this revision to Diff 176330. serge-sans-paille edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55121/new/ https://reviews.llvm.org/D55121 Files: bindings/python/clang/cindex.py docs/tools/dump_format_style.py

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov planned changes to this revision. ilya-biryukov added a comment. We need to keep mmapping the PCH files. In D55139#1315944 , @malaperle wrote: > Hi Ilya. Does this apply to compile_commands.json too? I've seen that problem > for that file

[PATCH] D55062: [clangd] Partition include graph on auto-index.

2018-12-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 176356. kadircet added a comment. - Rebase Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55062/new/ https://reviews.llvm.org/D55062 Files: clangd/index/Background.cpp

[PATCH] D54947: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast

2018-12-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54947/new/ https://reviews.llvm.org/D54947 ___ cfe-commits mailing

[PATCH] D55206: [clangd] Get rid of AST matchers in CodeComplete, NFC

2018-12-03 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348130: [clangd] Get rid of AST matchers in CodeComplete, NFC (authored by hokein, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

r348131 - [AST] Fix an uninitialized bug in the bits of FunctionDecl

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 05:04:10 2018 New Revision: 348131 URL: http://llvm.org/viewvc/llvm-project?rev=348131=rev Log: [AST] Fix an uninitialized bug in the bits of FunctionDecl FunctionDeclBits.IsCopyDeductionCandidate was not initialized. This caused a warning with valgrind.

r348135 - [CodeComplete] Cleanup access checking in code completion

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 05:29:17 2018 New Revision: 348135 URL: http://llvm.org/viewvc/llvm-project?rev=348135=rev Log: [CodeComplete] Cleanup access checking in code completion Summary: Also fixes a crash (see the added 'accessibility-crash.cpp' test). Reviewers: ioeric, kadircet

[PATCH] D55188: Extract TextChildDumper class

2018-12-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: include/clang/AST/ASTDumperUtils.h:22 + +namespace ast_dumper { +// Colors used for various parts of the AST dump aaron.ballman wrote: > I'm not certain this namespace is

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

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaChecking.cpp:7711-7715 + // It's an integer promotion if the destination type is the promoted + // source type. + return ICE->getCastKind() == CK_IntegralCast && + From->isPromotableIntegerType() && +

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE348147: [clangd] Avoid memory-mapping files on Windows (authored by ibiryukov, committed by ). Changed prior to commit: https://reviews.llvm.org/D55139?vs=176382=176401#toc Repository: rCTE Clang

r348134 - [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 05:23:56 2018 New Revision: 348134 URL: http://llvm.org/viewvc/llvm-project?rev=348134=rev Log: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType CallExpr::setNumArgs is the only thing that prevents storing the arguments of a call

[PATCH] D54900: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348134: [Sema] Avoid CallExpr::setNumArgs in Sema::BuildCallToObjectOfClassType (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Clement Courbet via Phabricator via cfe-commits
courbet marked an inline comment as done. courbet added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the expression. aaron.ballman wrote: > Comment

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

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1304 +RHSTy = ResultTy; + } + rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > ebevhan wrote: > > > > rjmccall wrote: > > > > > Hmm. So adding a signed integer to an

[PATCH] D55212: Handle alloc_size attribute on function pointers

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:1072 def AllocSize : InheritableAttr { let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[HasFunctionProto]>; Does GCC support writing `alloc_size` on function

[PATCH] D53812: [Analyzer] Iterator Checker - Forbid decrements past the begin() and increments past the end() of containers

2018-12-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 176389. baloghadamsoftware added a comment. One error message slightly updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D53812/new/ https://reviews.llvm.org/D53812 Files: lib/StaticAnalyzer/Checkers/IteratorChecker.cpp

[PATCH] D54961: [AArch64] Add command-line option for SSBS

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC348142: [AArch64] Add command-line option for SSBS (authored by pabbar01, committed by ). Changed prior to commit: https://reviews.llvm.org/D54961?vs=175537=176388#toc Repository: rC Clang CHANGES

r348145 - [AST][Sema] Remove CallExpr::setNumArgs

2018-12-03 Thread Bruno Ricci via cfe-commits
Author: brunoricci Date: Mon Dec 3 06:54:03 2018 New Revision: 348145 URL: http://llvm.org/viewvc/llvm-project?rev=348145=rev Log: [AST][Sema] Remove CallExpr::setNumArgs CallExpr::setNumArgs is the only thing that prevents storing the arguments in a trailing array. There is only 3 places in

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

2018-12-03 Thread Bevin Hansson via Phabricator via cfe-commits
ebevhan marked an inline comment as done. ebevhan added inline comments. Comment at: test/Sema/format-strings-bitfield-promotion.c:1 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -verify %s + ebevhan wrote: > aaron.ballman wrote: > >

[PATCH] D54903: [Sema] Improve static_assert diagnostics.

2018-12-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: lib/Sema/SemaTemplate.cpp:3055 +// Print a diagnostic for the failing static_assert expression. Defaults to +// pretty-printing the

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

2018-12-03 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41005/new/ https://reviews.llvm.org/D41005 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] r348147 - [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Mon Dec 3 07:21:49 2018 New Revision: 348147 URL: http://llvm.org/viewvc/llvm-project?rev=348147=rev Log: [clangd] Avoid memory-mapping files on Windows Summary: Memory-mapping files on Windows leads to them being locked and prevents editors from saving changes to those

[clang-tools-extra] r348133 - [clangd] Fix a stale comment, NFC.

2018-12-03 Thread Haojian Wu via cfe-commits
Author: hokein Date: Mon Dec 3 05:16:04 2018 New Revision: 348133 URL: http://llvm.org/viewvc/llvm-project?rev=348133=rev Log: [clangd] Fix a stale comment, NFC. Modified: clang-tools-extra/trunk/clangd/index/SymbolCollector.cpp clang-tools-extra/trunk/clangd/index/SymbolCollector.h

[PATCH] D54466: [Analyzer] Iterator Checkers - Use the region of the topmost base class for iterators stored in a region

2018-12-03 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 176374. baloghadamsoftware added a comment. Now I think I understand the terminology and the concept so I could add Doxygen comment. I also refactored the code as you suggested, original code was based on `getBaseRegion()`. CHANGES SINCE LAST

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

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. The **idea** of using the AST-based approach here was really nice, it was less expensive and seemed to clearly look at the semantic. I wonder if there's a way to keep it on the AST level, without looking at the source locations. What are the cases we're trying to

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 176381. ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. This revision is now accepted and ready to land. - Keep using memory-mapped files for PCHs - Move once Repository: rCTE Clang Tools Extra CHANGES SINCE LAST

[PATCH] D55139: [clangd] Avoid memory-mapping files on Windows

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added inline comments. Comment at: clangd/FSProvider.cpp:33 + return File; +return std::unique_ptr( +new VolatileFile(std::move(std::move(*File; kadircet wrote: > make_unique?

[PATCH] D54630: Move detection of libc++ include dirs to Driver on MacOS

2018-12-03 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In D54630#1315168 , @arphaman wrote: > So far everything looks fine, but I have to rerun a couple of things due to > infrastructural issues. I should have the final results next Monday. Thanks for the update. Will be

[PATCH] D54902: [AST][Sema] Remove CallExpr::setNumArgs

2018-12-03 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL348145: [AST][Sema] Remove CallExpr::setNumArgs (authored by brunoricci, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D55066: [ASan] Minor documentation fix: remove static linking limitation.

2018-12-03 Thread Max Moroz via Phabricator via cfe-commits
Dor1s added a comment. In D55066#1315365 , @eugenis wrote: > Sorry for the delay. > This is wrong, static linking is NOT supported. > You could be confusing it with static linking of asan runtime library to an > executable - that is and has always been

  1   2   3   >