Re: clang-format: Fix deref treated as binary op in throw

2017-07-17 Thread Manuel Klimek via cfe-commits
LG, thanks for the patch. For next time, it helps to use phabricator to make people catch patches faster :) Do you have commit access or do you need me to check it in? On Thu, Jul 6, 2017 at 6:53 PM Erik Uhlmann via cfe-commits < cfe-commits@lists.llvm.org> wrote: > When dereferencing a pointer

Re: r308044 - Add documentation for @available

2017-07-17 Thread Aaron Ballman via cfe-commits
On Sun, Jul 16, 2017 at 7:49 PM, Nico Weber wrote: > Aaron, https://clang.llvm.org/docs/AttributeReference.html#availability > still doesn't have the AttrDocs.td change I made in this change 2 days ago. > Do I have to do anything to get it to update? No, it's expected to

r308174 - [OPENMP] Codegen for reduction clauses in 'taskloop' directives.

2017-07-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 17 06:30:36 2017 New Revision: 308174 URL: http://llvm.org/viewvc/llvm-project?rev=308174=rev Log: [OPENMP] Codegen for reduction clauses in 'taskloop' directives. Adds codegen for taskloop-based directives. Added:

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Ping. Repository: rL LLVM https://reviews.llvm.org/D35012 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35479: [CodeGen][mips] Support `long_call/far/near` attributes

2017-07-17 Thread Simon Atanasyan via Phabricator via cfe-commits
atanasyan created this revision. atanasyan added a project: clang. Herald added subscribers: arichardson, javed.absar. This patch adds support for the `long_call`, `far`, and `near` attributes for MIPS targets. The `long_call` and `far` attributes are synonyms. All these attributes override

[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-17 Thread Egor Churaev via Phabricator via cfe-commits
echuraev updated this revision to Diff 106851. https://reviews.llvm.org/D35000 Files: test/CodeGenOpenCL/kernel-arg-info.cl Index: test/CodeGenOpenCL/kernel-arg-info.cl === --- test/CodeGenOpenCL/kernel-arg-info.cl +++

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-17 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: include/clang/Tooling/Refactoring/ASTSelection.h:30 + /// inside of its source range. + ContainsSelectionPoint, + It's unclear what a selection point is. I'd have expected this to mean "overlaps" when first reading

[PATCH] D32411: [libcxx] Provide #include_next alternative for MSVC

2017-07-17 Thread Andrey Khalyavin via Phabricator via cfe-commits
halyavin added a comment. In https://reviews.llvm.org/D32411#799878, @mclow.lists wrote: > @smeenai wrote: > > > This is kinda ugly, but I can't think of a better way to do it. I'm fine > > with this, but given that it's a pretty invasive change, I'm not > > comfortable accepting. You may

[PATCH] D35465: [clang] Remove redundant check-prefix=CHECK from tests. NFC.

2017-07-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo accepted this revision. mstorsjo added a comment. This revision is now accepted and ready to land. Looks ok to me, at least for the one file that I wrote. https://reviews.llvm.org/D35465 ___ cfe-commits mailing list

[PATCH] D35472: Implement P0463R1: "Endian just Endian"

2017-07-17 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: include/type_traits:4740 +#if _LIBCPP_STD_VER > 14 +enum class endian (Apologies for double commenting, did not notice that it was in phab until after replying) I'm probably wrong, but if this is a C++2a

[PATCH] D35379: Add documentation for @available

2017-07-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: docs/LanguageExtensions.rst:1347 + +In rare cases, the availability annotation on an API might be overly +conservative. For example, ``[NSProcessInfo processInfo]`` secretly responds to thakis wrote: > arphaman

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-17 Thread Francois Ferrand via Phabricator via cfe-commits
Typz created this revision. Herald added a subscriber: klimek. The current code would return an incorrect value when a preprocessor directive is present immediately after the opening brace: this causes the nanespace end comment fixer to break in some places, for exemple it would not add the

Re: clang-format: Fix deref treated as binary op in throw

2017-07-17 Thread Erik Uhlmann via cfe-commits
I don’t have commit access, so I’d need you to check it in. Thanks for your help! From: Manuel Klimek Date: Monday, July 17, 2017 at 03:31 To: Erik Uhlmann , "cfe-commits@lists.llvm.org" Subject: Re: clang-format: Fix deref

[clang-tools-extra] r308181 - [clang-tidy] Add modernize-use-bool-literals.IgnoreMacros option

2017-07-17 Thread Alexander Kornienko via cfe-commits
Author: alexfh Date: Mon Jul 17 07:43:06 2017 New Revision: 308181 URL: http://llvm.org/viewvc/llvm-project?rev=308181=rev Log: [clang-tidy] Add modernize-use-bool-literals.IgnoreMacros option Added: clang-tools-extra/trunk/test/clang-tidy/modernize-use-bool-literals-ignore-macros.cpp

[PATCH] D35068: [analyzer] Detect usages of unsafe I/O functions

2017-07-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. It'd look good in clang-tidy, but if Daniel is interested in having this feature in the analyzer (and picked by clang-tidy from there), i wouldn't mind. I wonder how noisy this check is - did you test it on large codebases? Because these functions are popular, and in many

[PATCH] D35438: CodeGen: Ensure there is basic block when performing address space cast

2017-07-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 106879. yaxunl edited the summary of this revision. yaxunl added a comment. Insert addr space cast in the same basic block as alloca. https://reviews.llvm.org/D35438 Files: lib/CodeGen/CGExpr.cpp test/CodeGenCXX/amdgcn-automatic-variable.cpp Index:

[PATCH] D35000: [OpenCL] Added extended tests on metadata generation for half data type and arrays.

2017-07-17 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! https://reviews.llvm.org/D35000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35484: Add a warning for missing '#pragma pack (pop)' and suspicious '#pragma pack' uses when including files

2017-07-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. This patch adds a new `-Wpragma-pack` warning. It warns in the following cases: - When a translation unit is missing terminating `#pragma pack (pop)` directives. - When entering an included file if the current alignment value as determined by '#pragma pack'

[PATCH] D35465: [clang] Remove redundant check-prefix=CHECK from tests. NFC.

2017-07-17 Thread Chad Rosier via Phabricator via cfe-commits
mcrosier accepted this revision. mcrosier added a comment. LGTM. https://reviews.llvm.org/D35465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r308182 - [OPENMP] Further fixes of the reduction codegen tests

2017-07-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 17 07:47:59 2017 New Revision: 308182 URL: http://llvm.org/viewvc/llvm-project?rev=308182=rev Log: [OPENMP] Further fixes of the reduction codegen tests Modified: cfe/trunk/test/OpenMP/taskloop_reduction_codegen.cpp

[PATCH] D35109: [Analyzer] SValBuilder Comparison Rearrangement

2017-07-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I think we'd rather delay the unsigned difference feature (as far as i understand, you don't rely on it in the iterator checker), than introduce the artificial cast to signed which may have unexpected consequences, because that's not how unsigned difference normally

[PATCH] D35438: CodeGen: Ensure there is basic block when performing address space cast

2017-07-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D35438#810385, @rjmccall wrote: > Oh, of course. Sadly, in C/C++ the declaration point of a variable does not > necessarily dominate all uses of the variable, so you need to emit the cast > immediately after the alloca. Just temporarily

r308178 - [OPENMP] Further test fixes.

2017-07-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 17 07:22:34 2017 New Revision: 308178 URL: http://llvm.org/viewvc/llvm-project?rev=308178=rev Log: [OPENMP] Further test fixes. Modified: cfe/trunk/test/OpenMP/taskloop_reduction_codegen.cpp cfe/trunk/test/OpenMP/taskloop_simd_reduction_codegen.cpp

[PATCH] D35110: [Analyzer] Constraint Manager Negates Difference

2017-07-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:511 + SSE->getLHS()->getType()->isSignedIntegerOrEnumerationType() || + SSE->getLHS()->getType()->isPointerType()) { + return negV->Negate(BV, F);

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. I'd have a look soon. Is diff 1 the original diff from https://reviews.llvm.org/D28953? It was ok to reopen it, but the new revision is also fine. Regarding 1-bit bools: did you notice https://reviews.llvm.org/D32328 and https://reviews.llvm.org/D35041, do they

r308183 - [OPENMP] Fix reduction combiner test

2017-07-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 17 07:53:02 2017 New Revision: 308183 URL: http://llvm.org/viewvc/llvm-project?rev=308183=rev Log: [OPENMP] Fix reduction combiner test Modified: cfe/trunk/test/OpenMP/taskloop_reduction_codegen.cpp cfe/trunk/test/OpenMP/taskloop_simd_reduction_codegen.cpp

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. I've figured out a test case for this: template class A> class B { typedef A A_int; }; The real-world problem comes from ptr_traits.h . https://reviews.llvm.org/D35212

r308185 - Fix dereference of pointers in throw statements.

2017-07-17 Thread Manuel Klimek via cfe-commits
Author: klimek Date: Mon Jul 17 08:27:53 2017 New Revision: 308185 URL: http://llvm.org/viewvc/llvm-project?rev=308185=rev Log: Fix dereference of pointers in throw statements. Before: throw * x; After: throw *x; Patch by Erik Uhlmann. Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp

Re: clang-format: Fix deref treated as binary op in throw

2017-07-17 Thread Manuel Klimek via cfe-commits
Thx. Submitted as r308185. On Mon, Jul 17, 2017 at 4:28 PM Erik Uhlmann wrote: > I don’t have commit access, so I’d need you to check it in. Thanks for > your help! > > > > *From: *Manuel Klimek > *Date: *Monday, July 17, 2017 at 03:31 > *To: *Erik

r308176 - [OPENMP] Rework tests to pacify buildbots.

2017-07-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 17 07:06:41 2017 New Revision: 308176 URL: http://llvm.org/viewvc/llvm-project?rev=308176=rev Log: [OPENMP] Rework tests to pacify buildbots. Modified: cfe/trunk/test/OpenMP/taskloop_reduction_codegen.cpp

r308192 - [clang] Remove redundant check-prefix=CHECK from tests. NFC.

2017-07-17 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Mon Jul 17 10:31:44 2017 New Revision: 308192 URL: http://llvm.org/viewvc/llvm-project?rev=308192=rev Log: [clang] Remove redundant check-prefix=CHECK from tests. NFC. Reviewers: t.p.northover, mstorsjo, rsmith, mcrosier Reviewed By: mstorsjo, mcrosier Subscribers:

[PATCH] D35465: [clang] Remove redundant check-prefix=CHECK from tests. NFC.

2017-07-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308192: [clang] Remove redundant check-prefix=CHECK from tests. NFC. (authored by mgrang). Changed prior to commit: https://reviews.llvm.org/D35465?vs=106821=106901#toc Repository: rL LLVM

[PATCH] D34955: [Basic] Detect Git submodule version in CMake

2017-07-17 Thread Jordan Rose via Phabricator via cfe-commits
jordan_rose accepted this revision. jordan_rose added a comment. This revision is now accepted and ready to land. Whoops, yes, this new version looks good! https://reviews.llvm.org/D34955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 106883. ddcc added a comment. Fix typo https://reviews.llvm.org/D35450 Files: include/clang/AST/Expr.h include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValExplainer.h

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Looks good to me, other than a nit on indentation and a request for a little bit more info in a comment! Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3394 + // See if the function has 'rc_ownership_trusted_implementation' + //

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @vsk: could you help me turning this into a test case? https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] r308191 - [NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments).

2017-07-17 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Jul 17 10:20:57 2017 New Revision: 308191 URL: http://llvm.org/viewvc/llvm-project?rev=308191=rev Log: [NFC] Update function call names as changed in MacroInfo that should refer to Parameters (as opposed to Arguments). This syncs them up with clang commit r308190

[PATCH] D35472: Implement P0463R1: "Endian just Endian"

2017-07-17 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/type_traits:4740 +#if _LIBCPP_STD_VER > 14 +enum class endian lebedev.ri wrote: > (Apologies for double commenting, did not notice that it was in phab until > after replying) > > I'm probably wrong, but

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Some nits. Comment at: lib/Tooling/Refactoring/ASTSelection.cpp:23 +/// of the cursor or overlap with the selection range. +class ASTSelectionFinder : public RecursiveASTVisitor { + const SourceLocation Location; In LLVM, we use the

[PATCH] D35012: [refactor] Add the AST source selection component

2017-07-17 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Tooling/Refactoring/ASTSelection.h:68-74 +/// Traverses the given ASTContext and creates a tree of selected AST nodes. +/// +/// \returns None if no nodes are selected in the AST, or a selected AST node +/// that

r308190 - [NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions.

2017-07-17 Thread Faisal Vali via cfe-commits
Author: faisalv Date: Mon Jul 17 10:18:43 2017 New Revision: 308190 URL: http://llvm.org/viewvc/llvm-project?rev=308190=rev Log: [NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions. - Extracted the reading of the

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. > Is diff 1 the original diff from https://reviews.llvm.org/D28953? It was ok > to reopen it, but the new revision is also fine. No, diff 1 is already different; it contains most of the bugfixes. I couldn't find any way to reopen the previous review, and `arc diff`

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc updated this revision to Diff 106896. ddcc added a comment. Fix tests after typo fix https://reviews.llvm.org/D35450 Files: include/clang/AST/Expr.h include/clang/Config/config.h.cmake include/clang/StaticAnalyzer/Checkers/SValExplainer.h

[PATCH] D35472: Implement P0463R1: "Endian just Endian"

2017-07-17 Thread David Majnemer via Phabricator via cfe-commits
majnemer added inline comments. Comment at: test/std/utilities/meta/meta.type.synop/endian.pass.cpp:39-42 +union { +uint32_t i; +char c[4]; +} u = {0x01020304}; This is undefined behavior as-is because you are reading from a union member

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. Take a look at the tests in clang/test/Index/Core. You should be able to write a test which uses c-index-test to dump the symbols in this source. https://reviews.llvm.org/D35212 ___ cfe-commits mailing list

[PATCH] D35450: [analyzer] Support generating and reasoning over more symbolic constraint types

2017-07-17 Thread Dominic Chen via Phabricator via cfe-commits
ddcc added a comment. As an update, after fixing the typo and updating the tests, the assertion in `range_casts.c` is no longer triggered and everything seems fine now. https://reviews.llvm.org/D35450 ___ cfe-commits mailing list

[PATCH] D35438: CodeGen: Insert addr space cast for automatic/temp var at right position

2017-07-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:76 auto DestAddrSpace = getContext().getTargetAddressSpace(LangAS::Default); +EnsureInsertPoint(); +auto *CurBB = Builder.GetInsertBlock();

[PATCH] D35438: CodeGen: Insert addr space cast for automatic/temp var at right position

2017-07-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 106910. yaxunl marked an inline comment as done. yaxunl added a comment. Use saveIP/restoreIP. https://reviews.llvm.org/D35438 Files: lib/CodeGen/CGExpr.cpp test/CodeGenCXX/amdgcn-automatic-variable.cpp Index:

[PATCH] D35372: [clang-tidy] Add a close-on-exec check on memfd_create() in Android module.

2017-07-17 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh added a comment. If most code can be shared in a common base class like CloexecCheck, maybe all 8 "Add a close-on-exec check" CLs can be combined into 1 or 2 CLs to consolidate all review efforts. I also prefer a separate check name for each function, so users can enable/disable each check.

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-17 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 added a comment. In https://reviews.llvm.org/D34937#811500, @dcoughlin wrote: > Looks good to me, other than a nit on indentation and a request for a little > bit more info in a comment! Currently, I have added support for generic annotations for __isl_take and __isl_give and I

[PATCH] D34992: Emit static constexpr member as available_externally definition

2017-07-17 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. @rsmith: post-C++-commitee-meeting ping ;) https://reviews.llvm.org/D34992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r308197 - [SystemZ] Add support for IBM z14 processor (1/3)

2017-07-17 Thread Ulrich Weigand via cfe-commits
Author: uweigand Date: Mon Jul 17 10:45:57 2017 New Revision: 308197 URL: http://llvm.org/viewvc/llvm-project?rev=308197=rev Log: [SystemZ] Add support for IBM z14 processor (1/3) This patch series adds support for the IBM z14 processor. This part includes: - Basic support for the new processor

r308198 - [SystemZ] Add support for IBM z14 processor (2/3)

2017-07-17 Thread Ulrich Weigand via cfe-commits
Author: uweigand Date: Mon Jul 17 10:46:47 2017 New Revision: 308198 URL: http://llvm.org/viewvc/llvm-project?rev=308198=rev Log: [SystemZ] Add support for IBM z14 processor (2/3) This patch extends the -fzvector language feature to enable the new "vector float" data type when compiling at

[PATCH] D35372: [clang-tidy] Add a close-on-exec check on memfd_create() in Android module.

2017-07-17 Thread Yan Wang via Phabricator via cfe-commits
yawanng added a comment. In https://reviews.llvm.org/D35372#810525, @alexfh wrote: > In https://reviews.llvm.org/D35372#810457, @alexfh wrote: > > > I have deja vu ;) > > > > Should we make a single check for all CLOEXEC and friends with a single > > configurable list of (function name, flag

[PATCH] D35438: CodeGen: Insert addr space cast for automatic/temp var at right position

2017-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:76 auto DestAddrSpace = getContext().getTargetAddressSpace(LangAS::Default); +EnsureInsertPoint(); +auto *CurBB = Builder.GetInsertBlock(); IRBuilder already has saveIP() and

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-17 Thread Malhar Thakkar via Phabricator via cfe-commits
malhar1995 updated this revision to Diff 106911. malhar1995 added a comment. Addressed comments. Changed the function from isTrustedReferenceCountImplementation() to hasRCAnnotation() (I'm unable to come up with a better name) as this will be useful when I add support to RetainCountChecker to

[PATCH] D34955: [Basic] Detect Git submodule version in CMake

2017-07-17 Thread Brian Gesiak via Phabricator via cfe-commits
modocache added a comment. Awesome, thanks @jordan_rose! https://reviews.llvm.org/D34955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34475: [AArch64] Add support for __builtin_ms_va_list on aarch64

2017-07-17 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. Thanks, looks great! https://reviews.llvm.org/D34475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35483: clang-format: fix block OpeningLineIndex around preprocessor

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Nice! Comment at: lib/Format/UnwrappedLineParser.cpp:461 + +size_t UnwrappedLineParser::computePPHash() const { + size_t h = 0; @djasper: do you aware of some baked-in hash-combine functionality in llvm which this can use directly?

[PATCH] D34859: [COFF, ARM64] Set the data type widths and the data layout string

2017-07-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 106925. mgrang retitled this revision from "[COFF, ARM64] Set the data type widths and the data layout string for COFF ARM64" to "[COFF, ARM64] Set the data type widths and the data layout string". mgrang set the repository for this revision to rL LLVM.

r308209 - Update use of llvm::CallingConv:X86_64_Win64 after LLVM commit r308208

2017-07-17 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Mon Jul 17 13:05:56 2017 New Revision: 308209 URL: http://llvm.org/viewvc/llvm-project?rev=308209=rev Log: Update use of llvm::CallingConv:X86_64_Win64 after LLVM commit r308208 Modified: cfe/trunk/lib/CodeGen/CGCall.cpp cfe/trunk/test/CodeGen/ms_abi.c

[PATCH] D21767: Fix instantiation of friend function templates

2017-07-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 106914. sepavloff added a comment. Aligned implementation with https://reviews.llvm.org/D21508. https://reviews.llvm.org/D21767 Files: lib/AST/Decl.cpp lib/Sema/SemaTemplateInstantiate.cpp test/SemaTemplate/instantiate-friend-function.cpp Index:

[PATCH] D30170: Function definition may have uninstantiated body

2017-07-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Ping. https://reviews.llvm.org/D30170 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34475: [AArch64] Add support for __builtin_ms_va_list on aarch64

2017-07-17 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. Reid, with https://reviews.llvm.org/D34474 approved, does this look like what you had in mind? https://reviews.llvm.org/D34475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34859: [COFF, ARM64] Set the data type widths and the data layout string for COFF ARM64

2017-07-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/Basic/Targets.cpp:6662 +DoubleAlign = LongLongAlign = 64; +LongDoubleWidth = LongDoubleAlign = 64; +IntMaxType = SignedLongLong; If you're changing LongDoubleWidth and LongDoubleAlign, you also have to

[PATCH] D21508: Diagnose friend function template redefinitions

2017-07-17 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 106912. sepavloff edited the summary of this revision. sepavloff added a comment. Aligned implementation with https://reviews.llvm.org/D30170. https://reviews.llvm.org/D21508 Files: include/clang/AST/DeclBase.h lib/AST/Decl.cpp

r308205 - [Basic] Detect Git submodule version in CMake

2017-07-17 Thread Brian Gesiak via cfe-commits
Author: modocache Date: Mon Jul 17 12:22:57 2017 New Revision: 308205 URL: http://llvm.org/viewvc/llvm-project?rev=308205=rev Log: [Basic] Detect Git submodule version in CMake Summary: When searching for Git version control information, libBasic's CMake checks for the path '.git/logs/HEAD'.

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir updated this revision to Diff 106930. krasimir added a comment. - Add an Index test case https://reviews.llvm.org/D35212 Files: lib/Index/IndexingContext.cpp test/Index/Core/no-templated-canonical-decl.cpp Index: test/Index/Core/no-templated-canonical-decl.cpp

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. LGTM, thank you! (Let me know if you need someone to commit this for you.) https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r308218 - [AArch64] Add support for __builtin_ms_va_list on aarch64

2017-07-17 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Mon Jul 17 13:49:45 2017 New Revision: 308218 URL: http://llvm.org/viewvc/llvm-project?rev=308218=rev Log: [AArch64] Add support for __builtin_ms_va_list on aarch64 Move builtins from the x86 specific scope into the global scope. Their use is still limited to x86_64 and

[PATCH] D34859: [COFF, ARM64] Set the data type widths and the data layout string

2017-07-17 Thread Eli Friedman via Phabricator via cfe-commits
efriedma accepted this revision. efriedma added a comment. LGTM Repository: rL LLVM https://reviews.llvm.org/D34859 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D35212: [Index] Prevent canonical decl becoming nullptr

2017-07-17 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @vsk: thank you! https://reviews.llvm.org/D35212 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34475: [AArch64] Add support for __builtin_ms_va_list on aarch64

2017-07-17 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308218: [AArch64] Add support for __builtin_ms_va_list on aarch64 (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D34475?vs=106701=106941#toc Repository: rL LLVM

[libcxx] r308225 - Check for _MSC_VER before defining _LIBCPP_MSVCRT

2017-07-17 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Mon Jul 17 14:52:31 2017 New Revision: 308225 URL: http://llvm.org/viewvc/llvm-project?rev=308225=rev Log: Check for _MSC_VER before defining _LIBCPP_MSVCRT Some targets (e.g. Darwin) might have the Win32 API available, but they do not use MSVC CRT. Assume _LIBCPP_MSVCRT only

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-07-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308225: Check for _MSC_VER before defining _LIBCPP_MSVCRT (authored by bruno). Changed prior to commit: https://reviews.llvm.org/D34588?vs=103975=106960#toc Repository: rL LLVM

[PATCH] D35527: [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into clang/Config/config.h.

2017-07-17 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni created this revision. Herald added a subscriber: mgorny. LLVM_ENABLE_MODULES is sensitive of -D. Move them into config.h. FIXME: It'd be better that they are #cmakedefine01 rather than #cmakedefine. (#if FOO rather than #if defined(FOO)) Then we can find missing #include

[PATCH] D35020: [Modules] Add ability to specify module name to module file mapping

2017-07-17 Thread Boris Kolpackov via Phabricator via cfe-commits
boris updated this revision to Diff 107017. boris added a comment. Rebase on latest HEAD. https://reviews.llvm.org/D35020 Files: docs/ClangCommandLineReference.rst docs/Modules.rst include/clang/Driver/Options.td include/clang/Lex/HeaderSearch.h

[PATCH] D35020: [Modules] Add ability to specify module name to module file mapping

2017-07-17 Thread Boris Kolpackov via Phabricator via cfe-commits
boris added a comment. Ping. I am holding off on proposing the same functionality to GCC because I want to make sure the command line interface is the same for both compilers (GCC has less baggage in this area, option-name-wise). So confirming that at least the naming/semantics are acceptable

[PATCH] D35449: [X86] Implement __builtin_cpu_is

2017-07-17 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. I'm considering making validateCpuIs return a std::pair with the appropriate value and a tag that indicates invalid/vendor/type/subtype. This way we can remove the target based string decoding from CodeGen by reusing the validate function(with a better name). Sema

[PATCH] D34444: Teach codegen to work in incremental processing mode.

2017-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D3#795175, @v.g.vassilev wrote: > @rjmccall, thanks for the prompt and thorough reply. > > In https://reviews.llvm.org/D3#793311, @rjmccall wrote: > > > Okay. In that case, I see two problems, one major and one potentially > >

[PATCH] D35470: [libcxx] Implement pointer_traits::to_address as in P0653R0

2017-07-17 Thread Glen Fernandes via Phabricator via cfe-commits
glenjofe updated this revision to Diff 106965. glenjofe removed rL LLVM as the repository for this revision. glenjofe added a comment. Include full context in the diff. https://reviews.llvm.org/D35470 Files: include/memory

Re: r308176 - [OPENMP] Rework tests to pacify buildbots.

2017-07-17 Thread Galina Kistanova via cfe-commits
Hello Alexey, It looks like your resent commit broke couple of our builders: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast Failing Tests (2): Clang ::

[PATCH] D35479: [CodeGen][mips] Support `long_call/far/near` attributes

2017-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Basic/Attr.td:1191 +def MipsLongCall : InheritableAttr, TargetSpecificAttr { + let Spellings = [GCC<"long_call">, GCC<"far">, GCC<"near">]; Because this is used for all three attributes, I think you

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-07-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. Committed in r308242. Thanks Dominik! Repository: rL LLVM https://reviews.llvm.org/D33645 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added inline comments. Comment at: lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp:3412 + if (FD->getDefinition()) { +canEval = hasRCAnnotation(FD->getDefinition(), + "rc_ownership_trusted_implementation");

r308243 - [OPENMP] Pacify windows buildbots, NFC.

2017-07-17 Thread Alexey Bataev via cfe-commits
Author: abataev Date: Mon Jul 17 17:42:35 2017 New Revision: 308243 URL: http://llvm.org/viewvc/llvm-project?rev=308243=rev Log: [OPENMP] Pacify windows buildbots, NFC. Modified: cfe/trunk/test/OpenMP/taskloop_reduction_codegen.cpp

[PATCH] D35529: [COFF, ARM64] Make +reserve-x18 the default

2017-07-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. Herald added subscribers: kristof.beyls, javed.absar, aemerson. https://reviews.llvm.org/D35529 Files: docs/ClangCommandLineReference.rst lib/Basic/Targets.cpp test/Driver/coff-aarch64-fixed-x18.c Index: test/Driver/coff-aarch64-fixed-x18.c

Re: r308176 - [OPENMP] Rework tests to pacify buildbots.

2017-07-17 Thread Alexey Bataev via cfe-commits
Hi Galina, thanks for the info. Will fix them ASAP. Best regards, Alexey Bataev 17 июля 2017 г., в 18:24, Galina Kistanova > написал(а): Hello Alexey, It looks like your resent commit broke couple of our builders:

r308242 - [analyzer] Add missing documentation for static analyzer checkers

2017-07-17 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Mon Jul 17 17:34:57 2017 New Revision: 308242 URL: http://llvm.org/viewvc/llvm-project?rev=308242=rev Log: [analyzer] Add missing documentation for static analyzer checkers Some checks did not have documentation in the www/analyzer/ folder and also some alpha checks

[PATCH] D33645: [analyzer] Add missing documentation for static analyzer checkers

2017-07-17 Thread Devin Coughlin via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308242: [analyzer] Add missing documentation for static analyzer checkers (authored by dcoughlin). Changed prior to commit: https://reviews.llvm.org/D33645?vs=106184=106989#toc Repository: rL LLVM

[PATCH] D34430: [Clang][TypoCorrection] Clang hangs in typo correction

2017-07-17 Thread Kostya Serebryany via Phabricator via cfe-commits
kcc added a comment. Looks good, but I don't know this code well enough to stamp LGTM. Richard? Repository: rL LLVM https://reviews.llvm.org/D34430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D34937: Suppressing Reference Counting Diagnostics for Functions Containing 'rc_ownership_trusted_implementation' Annotate Attribute

2017-07-17 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. > So, should I submit another patch on the same revision after modifying the > title, summary, etc. or should I create another revision for that? You should create another revision. You can mark it as dependent on this one in Phabricator. Repository: rL LLVM

[PATCH] D35438: CodeGen: Insert addr space cast for automatic/temp var at right position

2017-07-17 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM. https://reviews.llvm.org/D35438 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D35519: Add SEMA checking to attribute 'target'

2017-07-17 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. Attribute 'target' can take either features or architectures. This patch accomplishes this in a couple of ways: 1- It adds support to Targets.cpp for "isValidCPUName" and "isValidFeatureName". HOWEVER, the latter is only implemented for X86. I'm hoping to

[PATCH] D35520: [Sema] Improve diagnostic message for unavailable c++17 aligned allocation functions

2017-07-17 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. This changes the error message Sema prints when an unavailable c++17 aligned allocation function is selected. Original message: "... possibly unavailable on x86_64-apple-macos10.12" New message: "... only available on macosx 10.13 or newer" This is a follow-up

[PATCH] D34588: Check for _MSC_VER before define _LIBCPP_MSVCRT

2017-07-17 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added a comment. > Could something like _WIN32 && _MSC_VER make this better? That would allow > us to differentiate between the various environments. It's kinda icky, but, > does make sense in a round about way. The check in the patch was already under a `#if defined(_WIN32)`, having

[PATCH] D35388: [libc++] Give extern templates default visibility on gcc

2017-07-17 Thread Tom Anderson via Phabricator via cfe-commits
thomasanderson added a comment. Friendly ping for @EricWF https://reviews.llvm.org/D35388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r308222 - [COFF, ARM64] Set the data type widths and the data layout string

2017-07-17 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Mon Jul 17 14:10:45 2017 New Revision: 308222 URL: http://llvm.org/viewvc/llvm-project?rev=308222=rev Log: [COFF, ARM64] Set the data type widths and the data layout string Summary: COFF ARM64 is LLP64 platform. So int is 4 bytes, long is 4 bytes and long long is 8 bytes.

[PATCH] D34859: [COFF, ARM64] Set the data type widths and the data layout string

2017-07-17 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL308222: [COFF, ARM64] Set the data type widths and the data layout string (authored by mgrang). Changed prior to commit: https://reviews.llvm.org/D34859?vs=106925=106952#toc Repository: rL LLVM