[PATCH] D39279: Stringizing raw string literals containing newline

2017-10-25 Thread Taewook Oh via Phabricator via cfe-commits
twoh updated this revision to Diff 120195. twoh added a comment. clang-format https://reviews.llvm.org/D39279 Files: lib/Lex/Lexer.cpp test/Preprocessor/macro_raw_string.cpp unittests/Lex/LexerTest.cpp Index: unittests/Lex/LexerTest.cpp ===

[PATCH] D39241: [clang-rename] Fix and enable the failing TemplatedClassFunction test.

2017-10-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 120199. hokein added a comment. improve the code and add more tests. https://reviews.llvm.org/D39241 Files: lib/Tooling/Refactoring/Rename/USRFindingAction.cpp test/clang-rename/TemplatedClassFunction.cpp Index: test/clang-rename/TemplatedClassFunction

[PATCH] D39224: Moved QualTypeNames.h from Tooling to AST.

2017-10-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D39224#905431, @rnk wrote: > Can you remind me why `NamedDecl::printQualifiedName` is not appropriate for > your needs? The use-case in code completion (see https://reviews.llvm.org/D38538, the interesting bit is in `SemaCodeComplete

[libunwind] r316559 - Fix the context/cursor size for ARM with WMMX enabled

2017-10-25 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed Oct 25 01:07:19 2017 New Revision: 316559 URL: http://llvm.org/viewvc/llvm-project?rev=316559&view=rev Log: Fix the context/cursor size for ARM with WMMX enabled This was missed in SVN r274744 when the WMMX part was made optional; when made optional, some struct fields

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D38939#904318, @rwols wrote: > I'll have to think about if I want that responsibility! While you're at it, I'll submit this patch for you. But I'd definitely encourage you to get commit access. You've been contributing a bunch of usefu

r316561 - [clang-rename] Fix and enable the failing TemplatedClassFunction test.

2017-10-25 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Oct 25 01:25:25 2017 New Revision: 316561 URL: http://llvm.org/viewvc/llvm-project?rev=316561&view=rev Log: [clang-rename] Fix and enable the failing TemplatedClassFunction test. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits Differential Revisi

[PATCH] D39241: [clang-rename] Fix and enable the failing TemplatedClassFunction test.

2017-10-25 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316561: [clang-rename] Fix and enable the failing TemplatedClassFunction test. (authored by hokein). Repository: rL LLVM https://reviews.llvm.org/D39241 Files: cfe/trunk/lib/Tooling/Refactoring/Rena

[PATCH] D39280: [libunwind] Use uint64_t for unw_word_t in ARM EHABI

2017-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. Herald added subscribers: kristof.beyls, aprantl, aemerson. This reduces the differences between the EHABI and DWARF cases. This allows getting rid of some casts in _LIBUNWIND_TRACE_API log lines, making them match what's in UnwindLevel1.c for DWARF. The only non

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindLevel1.c:79 _LIBUNWIND_TRACE_UNWINDING( "unwind_phase1(ex_ojb=%p): pc=0x%" PRIx64 ", start_ip=0x%" PRIx64 ", func=%s, lsda=0x%" PRIx64 ", personality=0x%" PRIx64 "", mstorsjo wrote

[PATCH] D39281: [libunwind] Express Registers_*::lastDwarfReg using _LIBUNWIND_HIGHEST_DWARF_REGISTER

2017-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo created this revision. This avoids having to keep the same information duplicated in multiple places. https://reviews.llvm.org/D39281 Files: src/Registers.hpp Index: src/Registers.hpp === --- src/Registers.hpp +++ src/

[PATCH] D39251: [libunwind] Fix building for ARM with dwarf exception handling

2017-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/Registers.hpp:1342 } + static int lastDwarfRegNum() { return 287; } mstorsjo wrote: > compnerd wrote: > > Can we not use `_LIBUNWIND_HIGHEST_DWARF_REGISTER` here? > I guess we could - we could do that consist

[clang-tools-extra] r316564 - [clangd] Handle exit notification (proper shutdown)

2017-10-25 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Oct 25 01:45:41 2017 New Revision: 316564 URL: http://llvm.org/viewvc/llvm-project?rev=316564&view=rev Log: [clangd] Handle exit notification (proper shutdown) Summary: This changes the onShutdown handler to do essentially nothing (for now), and instead exits the runlo

[PATCH] D38939: [clangd] Handle exit notification (proper shutdown)

2017-10-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316564: [clangd] Handle exit notification (proper shutdown) (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D38939?vs=119941&id=120210#toc Repository: rL LLVM https://revi

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-25 Thread Johann Klähn via Phabricator via cfe-commits
jklaehn added inline comments. Comment at: test/Index/c-index-getCursor-test.m:167 // CHECK: [57:1 - 57:10] FunctionDecl=f:57:6 (Definition) -// CHECK: [58:4 - 58:8] VarDecl=my_var:58:8 (Definition) +// CHECK: [58:4 - 58:8] VarDecl=my_var:2:1 (Definition) // CHECK: [58:8 - 58:1

Re: r316539 - [Analyzer] Remove spaces inside comments mentioning the parameter name,

2017-10-25 Thread Alexander Kornienko via cfe-commits
Thanks! This should be enough for the tools, however I would also remove all other spaces inside the argument comments for consistency with the rest of LLVM code. Currently different ways of putting spaces inside the argument comments are used in LLVM as follows: 1. /*Name=*/ - in 78 files (this

[PATCH] D39057: [clangd][WIP] Integrate the refactoring actions into clangd

2017-10-25 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a subscriber: malaperle. ilya-biryukov added a comment. There's another patch (https://reviews.llvm.org/D39276) that tries to add `workspace/executeCommand` for a slightly different use-case. Could we take the code for parsing/handling `workspace/executeCommand` from this pat

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware updated this revision to Diff 120214. baloghadamsoftware added a comment. Updated according to comments. https://reviews.llvm.org/D39121 Files: clang-tidy/bugprone/BugproneTidyModule.cpp clang-tidy/bugprone/CMakeLists.txt clang-tidy/bugprone/MisplacedOperatorInStrlenInA

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 5 inline comments as done. baloghadamsoftware added inline comments. Comment at: clang-tidy/misc/MisplacedOperatorInStrlenInAllocCheck.cpp:30 + Finder->addMatcher( + callExpr(callee(functionDecl(hasName("malloc"))), + hasArgument(0, a

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware marked 4 inline comments as done. baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#902728, @alexfh wrote: > Apart from all other comments, I think, this check would better be placed > under bugprone/. I moved it there. https://reviews.llvm.org/D39121

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#902121, @martong wrote: > Consider the use of a function pointer: > > void* malloc(int); > int strlen(char*); > auto fp = malloc; > void bad_malloc(char *str) { char *c = (char *)fp(strlen(str + 1)); } > > > I think, t

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-25 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware added a comment. In https://reviews.llvm.org/D39121#902145, @Eugene.Zelenko wrote: > Same mistake could be made with new[] operator. Yes! However, it seems that I need a new matcher for it so I would do it in a follow-up patch. https://reviews.llvm.org/D39121 _

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo updated this revision to Diff 120215. mstorsjo edited the summary of this revision. mstorsjo added a comment. Updated to take care of saving/restoring XMM registers as well. https://reviews.llvm.org/D38819 Files: docs/index.rst include/__libunwind_config.h include/libunwind.h i

[PATCH] D26105: Allow CaseStmt to be initialized with a SubStmt

2017-10-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun abandoned this revision. xazax.hun added a comment. Since r316069 this is no longer relevant. https://reviews.llvm.org/D26105 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-10-25 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D39239#905641, @probinson wrote: > Have you tried this change against the GDB and LLDB test suites? If they > have failures then we should think about whether those tests are > over-specific or whether we should put this under a

[PATCH] D39178: [rename] support renaming class member.

2017-10-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 120216. hokein marked 2 inline comments as done. hokein added a comment. - remove the code of handling template class methods as it is fixed in another patch. - address review comments. https://reviews.llvm.org/D39178 Files: lib/Tooling/Refactoring/Rename

[PATCH] D39178: [rename] support renaming class member.

2017-10-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I have refined the patch based on the https://reviews.llvm.org/D39241. Please take another look. https://reviews.llvm.org/D39178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D38629: [clangd] Added a callback-based codeComplete in clangd.

2017-10-25 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316565: [clangd] Added a callback-based codeComplete in clangd. (authored by ibiryukov). Changed prior to commit: https://reviews.llvm.org/D38629?vs=119813&id=120218#toc Repository: rL LLVM https://

[clang-tools-extra] r316565 - [clangd] Added a callback-based codeComplete in clangd.

2017-10-25 Thread Ilya Biryukov via cfe-commits
Author: ibiryukov Date: Wed Oct 25 02:35:10 2017 New Revision: 316565 URL: http://llvm.org/viewvc/llvm-project?rev=316565&view=rev Log: [clangd] Added a callback-based codeComplete in clangd. Reviewers: klimek, bkramer, sammccall, krasimir Reviewed By: sammccall Subscribers: rwols, cfe-commits

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-10-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:651-652 + } else if (StoreSite->getLocation().getAs()) { +os << "Reach the max loop limit."; +os << " Assigning a conjured symbol"; +if (R->canPrintPretty()) { --

[PATCH] D39178: [rename] support renaming class member.

2017-10-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric accepted this revision. ioeric added a comment. Still lgtm. https://reviews.llvm.org/D39178 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray created this revision. This feature was discussed but not yet proposed. It allows a structured binding to appear as a //condition// if (auto [ok, val] = f(...)) So the user can save an extra //condition// if the statement can query the value to-be-decomposed instead. Formally, it m

[PATCH] D39178: [rename] support renaming class member.

2017-10-25 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316571: [rename] support renaming class member. (authored by hokein). Repository: rL LLVM https://reviews.llvm.org/D39178 Files: cfe/trunk/lib/Tooling/Refactoring/Rename/USRLocFinder.cpp cfe/trunk

r316571 - [rename] support renaming class member.

2017-10-25 Thread Haojian Wu via cfe-commits
Author: hokein Date: Wed Oct 25 04:54:45 2017 New Revision: 316571 URL: http://llvm.org/viewvc/llvm-project?rev=316571&view=rev Log: [rename] support renaming class member. Reviewers: ioeric Reviewed By: ioeric Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llv

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 120232. ioeric added a comment. - Get rid of the unused 'createExecutorByName' interface. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h include/clang/Tooling/StandaloneExecution.h

[PATCH] D37470: [analyzer] Handle ObjC messages conservatively in CallDescription

2017-10-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun updated this revision to Diff 120233. xazax.hun added a comment. Herald added a subscriber: szepet. - Modify a test to trigger the assertion fail before the patch is applied. https://reviews.llvm.org/D37470 Files: lib/StaticAnalyzer/Core/CallEvent.cpp test/Analysis/objc-message.m

SemaTemplateInstantiateDecl mistakenly issuing diag::warn_func_template_missing for templated deduction guides

2017-10-25 Thread Mário Feroldi via cfe-commits
Following compilation shows the issue: $ clang++ --version clang version 6.0.0 (trunk 316414) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /opt/compiler-explorer/clang-trunk/bin $ cat a.cpp template struct S { template S(U&&)

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not opposed to the functionality, but this isn't a part of C++2a either; I think we should be diagnosing this code with a warning so users don't expect it to work on every compiler. https://reviews.llvm.org/D39284 __

[PATCH] D39053: [Bitfield] Add more cases to making the bitfield a separate location

2017-10-25 Thread Strahinja Petrovic via Phabricator via cfe-commits
spetrovic added a comment. Well, basically I'm just expanding the existing algorithm, why should we split fields just in case when current field is integer, I'm not resolving specific problem with unaligned loads/stores on MIPS. In this example: typedef struct { unsigned int f1 : 28; unsig

[PATCH] D38688: [clang-tidy] Misc redundant expressions checker updated for macros

2017-10-25 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun accepted this revision. xazax.hun added a comment. This revision is now accepted and ready to land. LGTM! But wait for @aaron.ballman, @alexfh, or @hokein for the final word. https://reviews.llvm.org/D38688 ___ cfe-commits mailing list cfe

[PATCH] D39015: [Analyzer] Always use non-reference types when creating expressions in BodyFarm, removes std::call_once crash

2017-10-25 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: cfe/trunk/lib/Analysis/BodyFarm.cpp:366 +M.makeLvalueToRvalue(D->getParamDecl(i), + /* RefersToEnclosingVariableOrCapture= */ false)); george.karpenkov wrote: > alexfh wrote: > > Remo

[PATCH] D38126: Make TBAA information to be part of LValueBaseInfo

2017-10-25 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev abandoned this revision. kosarev added a comment. Indeed, if LValueBaseInfo is what we know about the very first value in a sequence, then TBAA info certainly should not be part of it. This also means whatever is specified as a direct base lvalue to the lvalue we are constructing should

r316577 - Add support of the next Ubuntu (Ubuntu 18.04 - Bionic Beaver)

2017-10-25 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Wed Oct 25 07:21:33 2017 New Revision: 316577 URL: http://llvm.org/viewvc/llvm-project?rev=316577&view=rev Log: Add support of the next Ubuntu (Ubuntu 18.04 - Bionic Beaver) Modified: cfe/trunk/include/clang/Driver/Distro.h cfe/trunk/lib/Driver/Distro.cpp Modifie

r316578 - Also update IsUbuntu() with Ubuntu Bionic

2017-10-25 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Wed Oct 25 07:23:27 2017 New Revision: 316578 URL: http://llvm.org/viewvc/llvm-project?rev=316578&view=rev Log: Also update IsUbuntu() with Ubuntu Bionic Follow up of r316577 Modified: cfe/trunk/include/clang/Driver/Distro.h Modified: cfe/trunk/include/clang/Driver/D

r316579 - Add support of the next Debian (Debian buster - version 10)

2017-10-25 Thread Sylvestre Ledru via cfe-commits
Author: sylvestre Date: Wed Oct 25 07:25:28 2017 New Revision: 316579 URL: http://llvm.org/viewvc/llvm-project?rev=316579&view=rev Log: Add support of the next Debian (Debian buster - version 10) Modified: cfe/trunk/include/clang/Driver/Distro.h cfe/trunk/lib/Driver/Distro.cpp Modified:

[PATCH] D39239: [AST] Incorrectly qualified unscoped enumeration as template actual parameter.

2017-10-25 Thread Carlos Alberto Enciso via Phabricator via cfe-commits
CarlosAlbertoEnciso added a comment. In https://reviews.llvm.org/D39239#905641, @probinson wrote: > Have you tried this change against the GDB and LLDB test suites? If they > have failures then we should think about whether those tests are > over-specific or whether we should put this under a

[PATCH] D34158: For Linux/gnu compatibility, preinclude if the file is available

2017-10-25 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In https://reviews.llvm.org/D34158#905637, @mibintc wrote: > In https://reviews.llvm.org/D34158#905596, @jyknight wrote: > > > I'd still _very_ much like a solution that is acceptable for all libc to > > use, and have that on by default. > > > > However, I guess this is

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 120250. ioeric added a comment. - Only expose result reporting interface from ExecutionContext so that callbacks don't have access to results. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execu

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. simplified the if-else stuff https://reviews.llvm.org/D37808 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37624: add support for -fno-instrument-functions and -finstrument-functions-exclude-{file, function}-list= to match gcc options.

2017-10-25 Thread kchoi via Phabricator via cfe-commits
choikwa updated this revision to Diff 120252. choikwa added a comment. rebase to trunk https://reviews.llvm.org/D37624 Files: docs/ClangCommandLineReference.rst include/clang/Driver/Options.td include/clang/Frontend/CodeGenOptions.h lib/CodeGen/CodeGenFunction.cpp lib/CodeGen/CodeGenF

[PATCH] D37808: [clang-tidy] Add new hicpp-multiway-paths-covered check for missing branches

2017-10-25 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 120251. JonasToth marked 8 inline comments as done. JonasToth added a comment. - Merge 'master' - address review comments https://reviews.llvm.org/D37808 Files: clang-tidy/hicpp/CMakeLists.txt clang-tidy/hicpp/HICPPTidyModule.cpp clang-tidy/hicpp/Mu

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 120254. ioeric added a comment. - Minor comment update. https://reviews.llvm.org/D34272 Files: include/clang/Tooling/CommonOptionsParser.h include/clang/Tooling/Execution.h include/clang/Tooling/StandaloneExecution.h include/clang/Tooling/ToolExecuto

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Execution.h:51-53 + virtual std::vector> AllKVResults() = 0; + virtual void forEachResult( + llvm::function_ref Callback) = 0; ioeric wrote: > klimek wrote: > > Why do we need to get the resul

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-25 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. Hmm, according to our research such loads constitute about 18% of all loads under ##-O -Xclang -disable-llvm-passes## on the LLVM code base. I wonder, do you think it would be nice to not generate them at all? I mean, provided that necessary changes do not add too much

[PATCH] D34158: For Linux/gnu compatibility, preinclude if the file is available

2017-10-25 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. I pulled out all the test changes and the only one that is needed presently is Clang :: Driver/crash-report.c; huh, that's different than what I encountered earlier in the summer. Now I'll recheck those extra tests. https://reviews.llvm.org/D34158 _

[PATCH] D34272: [Tooling] A new framework for executing clang frontend actions.

2017-10-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/Execution.h:76 + + void appendArgumentsAdjuster(ArgumentsAdjuster Adjuster); + I think the argument adjuster adjustment shouldn't be part of this interface, as the argument adjusters cannot be chan

[PATCH] D39290: [rename] Use SymbolOccurrence in RenameLocFinder.

2017-10-25 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a subscriber: klimek. This is first step to integrate qualified rename into clang-refactor. Also a few changes to SymbolOccurrence: - add more information to SymbolOccurrence - remove the way of using SourceLocation as the array size https://reviews.l

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Tooling/Refactoring/RefactoringActionRule.h:60 + /// associated with this rule. + virtual Optional> getEditorCommandInfo() { +return None; I think `getEditorCommandInfo` might be a wrong name here. IM

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-25 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: include/clang/Analysis/AnalysisDeclContext.h:424 /// methods during the analysis. - BodyFarm *BdyFrm = nullptr; + std::unique_ptr BdyFrm; george.karpenkov wrote: > alexfh wrote: > > BdyFrm is somewhat cryptic. Mayb

r316584 - [OPENMP] Constify function parameters, NFC.

2017-10-25 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Oct 25 08:44:52 2017 New Revision: 316584 URL: http://llvm.org/viewvc/llvm-project?rev=316584&view=rev Log: [OPENMP] Constify function parameters, NFC. Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp URL: http://llvm.org/view

[PATCH] D37187: [Analyzer] Fix Bug 25609 - Assertion UNREACHABLE: 'Unexpected ProgramPoint' with widen-loops=true

2017-10-25 Thread Henry Wong via Phabricator via cfe-commits
MTC updated this revision to Diff 120265. MTC marked 3 inline comments as done. MTC added a comment. The message about invalidate variable values is temporarily not printed. This work can be done with separate patch. https://reviews.llvm.org/D37187 Files: lib/StaticAnalyzer/Core/PathDiagnost

r316585 - [OPENMP] Improve debug info for taskgroup implicitly generated

2017-10-25 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Wed Oct 25 08:54:04 2017 New Revision: 316585 URL: http://llvm.org/viewvc/llvm-project?rev=316585&view=rev Log: [OPENMP] Improve debug info for taskgroup implicitly generated expressions. Modified: cfe/trunk/lib/Sema/SemaOpenMP.cpp cfe/trunk/test/OpenMP/taskgroup_tas

[PATCH] D37470: [analyzer] Handle ObjC messages conservatively in CallDescription

2017-10-25 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I think it would be better to add a new "test/Analysis/block-in-critical-section.m" file rather than enabling a random alpha checker in a file that tests the analyzer core. https://reviews.llvm.org/D37470 ___ cfe-commits

[PATCH] D39008: [CodeGen] Propagate may-alias'ness of lvalues with TBAA info

2017-10-25 Thread Ivan Kosarev via Phabricator via cfe-commits
kosarev added a comment. Now that https://reviews.llvm.org/D38796 is comitted and added the tbaa-cast.cpp test case to the mainline, we fail on it with this patch applied. The reason is that we have no special TBAA type node for may-alias accesses, so everything that ever been a potential acces

[PATCH] D39293: Add objcCategoryImplDecl matcher

2017-10-25 Thread Dave Lee via Phabricator via cfe-commits
kastiglione created this revision. Herald added a subscriber: klimek. Add `objcCategoryImplDecl` which matches ObjC category definitions (`@implementation`). This matcher complements `objcCategoryDecl` (`@interface`) which was added in https://reviews.llvm.org/D30854. https://reviews.llvm.org/D3

[PATCH] D39293: Add objcCategoryImplDecl matcher

2017-10-25 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! https://reviews.llvm.org/D39293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D39290: [rename] Use SymbolOccurrence in RenameLocFinder.

2017-10-25 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Could you elaborate on the intention of this change? Is the intention of having more information in `SymbolOccurrence` to benefit users of the rename library or to simplify the internal implementation? Comment at: include/clang/Tooling/Refactoring/Rena

[libclc] r316588 - math: Implement native_log10

2017-10-25 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Oct 25 09:49:22 2017 New Revision: 316588 URL: http://llvm.org/viewvc/llvm-project?rev=316588&view=rev Log: math: Implement native_log10 Use llvm instrinsic by default Provide amdgpu workaround v2: drop old amd copyrights Reviewer: Aaron Watry Reviewed-by: Vedran Milet

[libclc] r316587 - amdgpu/math: Don't use llvm instrinsic for native_log

2017-10-25 Thread Jan Vesely via cfe-commits
Author: jvesely Date: Wed Oct 25 09:49:17 2017 New Revision: 316587 URL: http://llvm.org/viewvc/llvm-project?rev=316587&view=rev Log: amdgpu/math: Don't use llvm instrinsic for native_log AMDGPU targets don't have insturction for it, so it'll be expanded to C * log2 anyway. v2: use native_log2 i

[PATCH] D38596: Implement attribute target multiversioning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120278. erichkeane added a comment. Just a quick rebase, there were a few changes in the area. https://reviews.llvm.org/D38596 Files: include/clang/AST/Decl.h include/clang/Basic/Attr.td include/clang/Basic/DiagnosticSemaKinds.td include/clang/Ba

[PATCH] D39224: Moved QualTypeNames.h from Tooling to AST.

2017-10-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In https://reviews.llvm.org/D39224#906225, @ilya-biryukov wrote: > In https://reviews.llvm.org/D39224#905431, @rnk wrote: > > > Can you remind me why `NamedDecl::printQualifiedName` is not appropriate > > for your needs? > > > The use-case in code completion (see https://rev

r316593 - [X86] Add avx512vpopcntdq to Knights Mill

2017-10-25 Thread Craig Topper via cfe-commits
Author: ctopper Date: Wed Oct 25 10:10:58 2017 New Revision: 316593 URL: http://llvm.org/viewvc/llvm-project?rev=316593&view=rev Log: [X86] Add avx512vpopcntdq to Knights Mill As indicated by Table 1-1 in Intel Architecture Instruction Set Extensions and Future Features Programming Reference fro

[PATCH] D39224: Moved QualTypeNames.h from Tooling to AST.

2017-10-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Looks good https://reviews.llvm.org/D39224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. In https://reviews.llvm.org/D39284#906450, @aaron.ballman wrote: > I'm not opposed to the functionality, but this isn't a part of C++2a either; > I think we should be diagnosing this code with a warning so users don't > expect it to work on every compiler. C++2a the s

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Friedman, Eli via cfe-commits
On 10/6/2017 4:09 PM, Saleem Abdulrasool via cfe-commits wrote: Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=315126&r1=315125&r2=315126&view=diff

r316599 - CodeGen: fix PPC Darwin variadics

2017-10-25 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Oct 25 10:56:50 2017 New Revision: 316599 URL: http://llvm.org/viewvc/llvm-project?rev=316599&view=rev Log: CodeGen: fix PPC Darwin variadics Darwin uses char * for the variadic list type (va_list). We use the PPC SVR4 ABI for PPC, which uses a structure type for the v

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-25 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 120284. eandrews added a comment. Updated patch to set default calling convention for main() in CheckMain() https://reviews.llvm.org/D39210 Files: include/clang/Basic/LangOptions.h include/clang/Driver/CC1Options.td include/clang/Driver/CLCompatOptio

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-25 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain =

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 120285. lebedev.ri added a comment. - Rebased - Handle `-Wsystem-headers` properly, as per irc disscussion. It was suggested that `findMacroSpelling()` might be slow, and `isNullPointerConstant()` should be used, but i'm not sure any of the `NullPointerC

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39284#906800, @lichray wrote: > In https://reviews.llvm.org/D39284#906450, @aaron.ballman wrote: > > > I'm not opposed to the functionality, but this isn't a part of C++2a > > either; I think we should be diagnosing this code with a war

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. The repro in https://bugs.llvm.org/show_bug.cgi?id=34362 caused the left nullptr to be cast to a int* implicitly, which resulted diagnosing this falsely. https://reviews.llvm.org/D39301 Files: lib/Sema/Sema.cpp test/SemaCXX/warn-zero-nullptr.cpp Index: li

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/SemaCXX/warn-zero-nullptr.cpp:29 + +// Shouldn't warn. +struct pr34362 { operator int*() { return nullptr; } }; Maybe wrap into a `namespace PR34362 {}` https://reviews.llvm.org/D39301 __

[PATCH] D38824: [X86] Synchronize the existing CPU predefined macros with the cases that gcc defines them

2017-10-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Ping https://reviews.llvm.org/D38824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120288. erichkeane marked an inline comment as done. erichkeane added a comment. Response to Roman's comment. https://reviews.llvm.org/D39301 Files: lib/Sema/Sema.cpp test/SemaCXX/warn-zero-nullptr.cpp Index: lib/Sema/Sema.cpp =

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D39138#906623, @kosarev wrote: > Hmm, according to our research such loads constitute about 18% of all loads > under ##-O -Xclang -disable-llvm-passes## on the LLVM code base. I wonder, do > you think it would be nice to not generate them at

[PATCH] D38796: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info

2017-10-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think probably the best solution is to track may-alias-ness explicitly in the TBAAAccessInfo instead of relying in the frontend on being able to distinguish things in the LLVM metadata. Repository: rL LLVM https://reviews.llvm.org/D38796 __

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/Sema.cpp:441 return; - if (E->getType()->isNullPtrType()) + if (E->IgnoreImpCasts()->getType()->isNullPtrType()) return; Do we also want to ignore parens here as well with `Expr::IgnoreParenIm

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. In https://reviews.llvm.org/D39284#906860, @aaron.ballman wrote: > I'm aware, but I was unaware that we've accepted this functionality in C++2a > yet within WG21. Did we vote this in and I simply didn't remember it? No. In the first line of the Summary I said this has

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/Sema.cpp:441 return; - if (E->getType()->isNullPtrType()) + if (E->IgnoreImpCasts()->getType()->isNullPtrType()) return; aaron.ballman wrote: > Do we also want to ignore parens here as well with

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120289. erichkeane added a comment. Lets ignore parens too! https://reviews.llvm.org/D39301 Files: lib/Sema/Sema.cpp test/SemaCXX/warn-zero-nullptr.cpp Index: lib/Sema/Sema.cpp === ---

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, this looks a bunch simpler. I have a question about the direction here: AFAICS there's various efforts in the refactoring infrastructure to allow consumers of the Refactor libs (e.g. clang-refactor, clangd, XCode?) to operate without knowing the details of the

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-25 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: include/clang/Analysis/AnalysisDeclContext.h:424 /// methods during the analysis. - BodyFarm *BdyFrm = nullptr; + std::unique_ptr BdyFrm; alexfh wrote: > george.karpenkov wrote: > > alexfh wrote: > > > Bd

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/Sema.cpp:441 return; - if (E->getType()->isNullPtrType()) + if (E->IgnoreImpCasts()->getType()->isNullPtrType()) return; erichkeane wrote: > aaron.ballman wrote: > > Do we also want to ignore pare

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39284#906889, @lichray wrote: > In https://reviews.llvm.org/D39284#906860, @aaron.ballman wrote: > > > I'm aware, but I was unaware that we've accepted this functionality in > > C++2a yet within WG21. Did we vote this in and I simply di

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Can you build some large-ish codebase (say, LLVM) with and without this patch and make sure that this doesn't measurably add to build perf? (With the warning turned on, obviously.) Other than that, this looks good to me. Comment at: test/SemaCXX/warn-

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 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! https://reviews.llvm.org/D39301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. Awesome, thanks much! Like lebedev.ri says, adding a test for the "Parens" part would be good. https://reviews.llvm.org/D39301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. They've got me presenting in the next meeting, but i'll add said test and commit after. Thanks for the reviews guys! https://reviews.llvm.org/D39301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Reid Kleckner via cfe-commits
On Wed, Oct 25, 2017 at 10:56 AM, Friedman, Eli wrote: > On 10/6/2017 4:09 PM, Saleem Abdulrasool via cfe-commits wrote: > >> Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp >> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Too >> lChains/Clang.cpp?rev=315126&r1=315125&r2=31512

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39301#906911, @thakis wrote: > Awesome, thanks much! Like lebedev.ri says, adding a test for the "Parens" > part would be good. I agree. I should have been more explicit with my LGTM, but I presumed you knew to add the tests already.

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D38954#906900, @thakis wrote: > Can you build some large-ish codebase (say, LLVM) with and without this patch > and make sure that this doesn't measurably add to build perf? (With the > warning turned on, obviously.) > > Other than that, t

  1   2   >