r304697 - Revert "[sanitizer-coverage] one more flavor of coverage: -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. (clang part)"

2017-06-05 Thread Renato Golin via cfe-commits
Author: rengolin Date: Mon Jun 5 02:35:45 2017 New Revision: 304697 URL: http://llvm.org/viewvc/llvm-project?rev=304697&view=rev Log: Revert "[sanitizer-coverage] one more flavor of coverage: -fsanitize-coverage=inline-8bit-counters. Experimental so far, not documenting yet. (clang part)" This

[PATCH] D33333: Emit warning when throw exception in destruct or dealloc functions which has a (possible implicit) noexcept specifier

2017-06-05 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 101373. jyu2 added a comment. Add more test include 1> throw/catch reference types. 2> try block. 3>unreachable code. https://reviews.llvm.org/D3 Files: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/AnalysisBasedWarnings.cpp test/CXX/except/ex

[PATCH] D33412: Add support for #pragma clang section

2017-06-05 Thread Javed Absar via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304705: Add support for #pragma clang section (authored by javed.absar). Changed prior to commit: https://reviews.llvm.org/D33412?vs=100846&id=101383#toc Repository: rL LLVM https://reviews.llvm.org

r304705 - Add support for #pragma clang section

2017-06-05 Thread Javed Absar via cfe-commits
Author: javed.absar Date: Mon Jun 5 05:11:57 2017 New Revision: 304705 URL: http://llvm.org/viewvc/llvm-project?rev=304705&view=rev Log: Add support for #pragma clang section This patch provides a means to specify section-names for global variables, functions and static variables, using #pragma

[PATCH] D33719: Add _Float16 as a C/C++ source language type

2017-06-05 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added a comment. Hi Bruno, Akira, Many thanks for your feedback! Apologies for the missing context. The patch touches many files and thus with context it is quite big (~4MB). Thought this would be too much if we need a few iterations. Anyway, will include it from now on. I am wor

r304708 - [OpenCL] Fix pipe size in TypeInfo.

2017-06-05 Thread Anastasia Stulova via cfe-commits
Author: stulova Date: Mon Jun 5 06:27:03 2017 New Revision: 304708 URL: http://llvm.org/viewvc/llvm-project?rev=304708&view=rev Log: [OpenCL] Fix pipe size in TypeInfo. Pipes are now the size of pointers rather than the size of the type that they contain. Patch by Simon Perretta! Differential

[PATCH] D33597: [OpenCL] Fix pipe size in TypeInfo.

2017-06-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304708: [OpenCL] Fix pipe size in TypeInfo. (authored by stulova). Changed prior to commit: https://reviews.llvm.org/D33597?vs=101236&id=101388#toc Repository: rL LLVM https://reviews.llvm.org/D3359

[PATCH] D33826: [clang-tidy] avoid pointer cast to more strict alignment check

2017-06-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for working on this. How does this check compare with the -Wcast-align diagnostic in the Clang frontend? I believe that warning already covers these cases, so I'm wondering what extra value is added with this check? Repository: rL LLVM https://review

r304710 - [analyzer] Nullability: fix notes around synthesized ObjC property accessors.

2017-06-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 5 07:40:03 2017 New Revision: 304710 URL: http://llvm.org/viewvc/llvm-project?rev=304710&view=rev Log: [analyzer] Nullability: fix notes around synthesized ObjC property accessors. Nullable-to-nonnull checks used to crash when the custom bug visitor was trying to

[PATCH] D32437: [analyzer] Nullability: fix a crash when adding notes inside a synthesized property accessor.

2017-06-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304710: [analyzer] Nullability: fix notes around synthesized ObjC property accessors. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D32437?vs=100673&id=101392#toc Repositor

[PATCH] D33406: PR28129 expand vector oparation to an IR constant.

2017-06-05 Thread Dinar Temirbulatov via Phabricator via cfe-commits
dtemirbulatov added a comment. Ping. [andrew.w.kaylor, scanon] Is it OK to assume that FP exceptions are off by default and allow such transformation to constants in the IR since we know that we would have exception with "1.00 -nan" for _mm256_cmp_ps(a, b, 15)? https://reviews.llvm.org/D3340

[PATCH] D33825: [clang-tidy] signal handler must be plain old function check

2017-06-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. This check is an interesting one. The rules around what is signal safe are changing for C++17 to be a bit more lenient than what the rules are for C++14. CERT's rule is written against C++14, and so the current behavior matches the rule wording. However, the *inte

r304713 - [analyzer] Don't add arrow to the inlined function's decl when it has no body.

2017-06-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Mon Jun 5 08:36:28 2017 New Revision: 304713 URL: http://llvm.org/viewvc/llvm-project?rev=304713&view=rev Log: [analyzer] Don't add arrow to the inlined function's decl when it has no body. In plist output mode with alternate path diagnostics, when entering a function, we

[PATCH] D33671: [analyzer] In plist alternate mode, don't add weird control flow pieces from ObjC property declarations to uses.

2017-06-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304713: [analyzer] Don't add arrow to the inlined function's decl when it has no body. (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D33671?vs=100693&id=101396#toc Reposito

[PATCH] D33893: Align definition of DW_OP_plus with DWARF spec [2/3]

2017-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added a subscriber: aprantl. This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things.   The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_pl

[PATCH] D33828: [analyzer] Don't crash when the code tries to construct an Objective-C object in AllocaRegion.

2017-06-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ updated this revision to Diff 101401. NoQ added a comment. Turn the comment into an assertion. https://reviews.llvm.org/D33828 Files: lib/StaticAnalyzer/Core/CallEvent.cpp test/Analysis/DynamicTypePropagation.m Index: test/Analysis/DynamicTypePropagation.m

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 101402. ABataev added a comment. Added DeclContext parameter to constructors of ImplicitParamDecl class. https://reviews.llvm.org/D33735 Files: include/clang/AST/Decl.h lib/AST/ASTImporter.cpp lib/AST/Decl.cpp lib/AST/DeclObjC.cpp lib/CodeGen/CGBl

[PATCH] D33877: [test] Fix baremetal test to allow any -resource-dir

2017-06-05 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs accepted this revision. jroelofs added a comment. This revision is now accepted and ready to land. LGTM... thank you! Repository: rL LLVM https://reviews.llvm.org/D33877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

2017-06-05 Thread Jonathan Roelofs via Phabricator via cfe-commits
jroelofs added a comment. In https://reviews.llvm.org/D33259#772184, @mgorny wrote: > This causes a test failure with non-standard CLANG_RESOURCE_DIR: https://reviews.llvm.org/D33877 (thanks for the patch) https://reviews.llvm.org/D33259 ___ cfe

r304715 - [test] Fix baremetal test to allow any -resource-dir

2017-06-05 Thread Michal Gorny via cfe-commits
Author: mgorny Date: Mon Jun 5 09:13:37 2017 New Revision: 304715 URL: http://llvm.org/viewvc/llvm-project?rev=304715&view=rev Log: [test] Fix baremetal test to allow any -resource-dir The baremetal test (r303873) has been added with expectance of very specific -resource-dir. However, the test i

[PATCH] D33877: [test] Fix baremetal test to allow any -resource-dir

2017-06-05 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304715: [test] Fix baremetal test to allow any -resource-dir (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D33877?vs=101351&id=101403#toc Repository: rL LLVM https://review

[PATCH] D33893: Align definition of DW_OP_plus with DWARF spec [2/3]

2017-06-05 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl accepted this revision. aprantl added a comment. This revision is now accepted and ready to land. Thanks, this LGTM! https://reviews.llvm.org/D33893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailma

[PATCH] D33852: Enable __declspec(selectany) on linux

2017-06-05 Thread Piotr Padlewski via Phabricator via cfe-commits
Prazek added inline comments. Comment at: include/clang/Basic/Attr.td:2421 -def SelectAny : InheritableAttr, TargetSpecificAttr { +def SelectAny : InheritableAttr, TargetSpecificAttr { let Spellings = [Declspec<"selectany">, GCC<"selectany">]; majnemer wrote

Re: [PATCH] D33660: [coroutines] Fix assertion during -Wuninitialized analysis

2017-06-05 Thread David Blaikie via cfe-commits
On Mon, May 29, 2017 at 3:28 PM Eric Fiselier via Phabricator via cfe-commits wrote: > EricWF created this revision. > > @rsmith Is there a better place to put this test? > > > https://reviews.llvm.org/D33660 > > Files: > lib/Sema/SemaCoroutine.cpp > test/SemaCXX/coreturn.cpp > test/SemaCXX

Re: r304190 - Diagnose attempts to build a preprocessed module that defines an unavailable submodule.

2017-06-05 Thread David Blaikie via cfe-commits
On Mon, May 29, 2017 at 10:23 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: rsmith > Date: Tue May 30 00:22:59 2017 > New Revision: 304190 > > URL: http://llvm.org/viewvc/llvm-project?rev=304190&view=rev > Log: > Diagnose attempts to build a preprocessed module th

Re: [PATCH] D33708: [test] [libcxx] Disable MSVC++'s compare(a, b) implies !compare(b, a) assertion in predicate application count tests

2017-06-05 Thread David Blaikie via cfe-commits
Alternatively, you could disable the check (or change the count it checks) if this is defined. (& if you disable the check when this is defined, you could change an existing build/test config (or add a new one) to have this disabled) On Tue, May 30, 2017 at 8:19 PM Billy Robert O'Neal III via Phab

[PATCH] D33900: Print registered targets in clang's version information

2017-06-05 Thread Dimitry Andric via Phabricator via cfe-commits
dim created this revision. Other llvm tools display their registered targets when showing version information, but for some reason clang has never done this. To support this, https://reviews.llvm.org/D33899 adds the llvm parts, which make it possible to print version information to arbitrary raw

Re: [PATCH] D33750: CGCleanup: (NFC) add a test that used to trigger broken IR

2017-06-05 Thread David Blaikie via cfe-commits
On Wed, May 31, 2017 at 5:45 PM Gor Nishanov via Phabricator via cfe-commits wrote: > GorNishanov created this revision. > > Coroutine related test that used to trigger broken IR prior to r304335. > > > https://reviews.llvm.org/D33750 > > Files: > test/CodeGenCoroutines/coro-await-domination.cp

Re: [PATCH] D33765: Show correct column nr. when multi-byte utf8 chars are used.

2017-06-05 Thread David Blaikie via cfe-commits
Is it right to only change the behavior of this caller? Presumably other callers (like getSpellingColumnNumber, getExpansionColumnNumber, etc) probably want the same handling? Do any callers /not/ want this behavior? On Thu, Jun 1, 2017 at 3:14 AM Erik Verbruggen via Phabricator via cfe-commits w

[PATCH] D33448: [CodeGen] Add thumb-mode to target-features for arm/thumb triples.

2017-06-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. I've discovered another problem while doing an ARM bootstrap build with mixed ARM/Thumb codegen. With https://reviews.llvm.org/D33898 , the bootstrap build with mixed ARM/Thumb code works properly. After that's in I'll finally commit this patch. https://reviews.llvm.org

Re: [clang-tools-extra] r304583 - [clang-tidy] Add `const` to operator() to fix a warning.

2017-06-05 Thread David Blaikie via cfe-commits
what was the warning? On Fri, Jun 2, 2017 at 11:48 AM Alexander Kornienko via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: alexfh > Date: Fri Jun 2 13:47:50 2017 > New Revision: 304583 > > URL: http://llvm.org/viewvc/llvm-project?rev=304583&view=rev > Log: > [clang-tidy] Add `const

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-05 Thread Florian Hahn via Phabricator via cfe-commits
fhahn updated this revision to Diff 101427. fhahn marked an inline comment as done. fhahn added a comment. use else if https://reviews.llvm.org/D33721 Files: lib/Basic/Targets.cpp test/CodeGen/arm-target-attr.c Index: test/CodeGen/arm-target-attr.c

Re: r299921 - [lsan] Enable LSan on arm Linux, clang part

2017-06-05 Thread David Blaikie via cfe-commits
This change seemed to be buggy (& I assume missing test coverage to demonstrate that). Galina fixed it in http://llvm.org/viewvc/llvm-project?rev=304663&view=rev based on a compiler warning. Can you add test coverage to this code to exercise these untested codepaths? On Tue, Apr 11, 2017 at 12:34

Re: r304663 - Fixed warning: enum constant in boolean context.

2017-06-05 Thread David Blaikie via cfe-commits
I followed up on the original commit (r299921) to request that as well. On Sat, Jun 3, 2017 at 1:26 PM Richard Smith via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Can we get a testcase for this bug? Seems like we can't have any coverage > for the case where IsArmArch is supposed to be fa

[PATCH] D33478: [libclang] When getting platform availabilities, merge multiple declarations if possible

2017-06-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: tools/libclang/CIndex.cpp:7322 + + for (int I = 0, E = AvailabilityAttrs.size(); I < E && I < availability_size; + ++I) { rdwampler wrote: > arphaman wrote: > > You can use a ranged for loop here if you use `take

[PATCH] D33875: PR27037: Use correct CVR qualifier on an upcast on method pointer call

2017-06-05 Thread Taiju Tsuiki via Phabricator via cfe-commits
tzik added a comment. Hi, Richard. Could you PTAL to this? https://reviews.llvm.org/D33875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: r299921 - [lsan] Enable LSan on arm Linux, clang part

2017-06-05 Thread Maxim Ostapenko via cfe-commits
On 05/06/17 20:16, David Blaikie wrote: This change seemed to be buggy (& I assume missing test coverage to demonstrate that). Galina fixed it in http://llvm.org/viewvc/llvm-project?rev=304663&view=rev based on a compiler warning. Oh, right, I've missed that. Sorry! Can you add test covera

Re: r299921 - [lsan] Enable LSan on arm Linux, clang part

2017-06-05 Thread David Blaikie via cfe-commits
On Mon, Jun 5, 2017 at 10:28 AM Maxim Ostapenko wrote: > On 05/06/17 20:16, David Blaikie wrote: > > This change seemed to be buggy (& I assume missing test coverage to > > demonstrate that). Galina fixed it in > > http://llvm.org/viewvc/llvm-project?rev=304663&view=rev based on a > > compiler wa

Re: r299921 - [lsan] Enable LSan on arm Linux, clang part

2017-06-05 Thread Maxim Ostapenko via cfe-commits
On 05/06/17 21:06, David Blaikie wrote: On Mon, Jun 5, 2017 at 10:28 AM Maxim Ostapenko > wrote: On 05/06/17 20:16, David Blaikie wrote: > This change seemed to be buggy (& I assume missing test coverage to > demonstrate that). Galina fixed it in > h

r304726 - Rather than rejecting attempts to run preprocessor-only actions on AST files,

2017-06-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jun 5 13:10:11 2017 New Revision: 304726 URL: http://llvm.org/viewvc/llvm-project?rev=304726&view=rev Log: Rather than rejecting attempts to run preprocessor-only actions on AST files, replay the steps taken to create the AST file with the preprocessor-only action install

Re: r299921 - [lsan] Enable LSan on arm Linux, clang part

2017-06-05 Thread Galina Kistanova via cfe-commits
The tests from https://reviews.llvm.org/rL299921 are not obviously enough. Those tests test only positive cases, thus do not catch when some flag is always true, like the bug we are discussing. There are missing tests that cover negative cases, when some sanitizer is not specified for a target. Th

[PATCH] D33904: Add a __has_attribute_enhancement macro to clang

2017-06-05 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv created this revision. Herald added a subscriber: javed.absar. Attributes may gain features or added flexibility over time. This patch aims to add a simple and uniform way to directly add/query for arbitrary changes in attributes, instead of having to rely on other information

[PATCH] D32332: Add support for transparent overloadable functions in clang

2017-06-05 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Ping :) https://reviews.llvm.org/D33904 is what I imagine would be a good way to detect this change. https://reviews.llvm.org/D32332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

r304727 - Attempt to fix Windows buildbot failure due to mismatching directory separators in preprocessed output.

2017-06-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jun 5 13:39:31 2017 New Revision: 304727 URL: http://llvm.org/viewvc/llvm-project?rev=304727&view=rev Log: Attempt to fix Windows buildbot failure due to mismatching directory separators in preprocessed output. Modified: cfe/trunk/test/Modules/preprocess-module.cpp

[PATCH] D30963: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls.

2017-06-05 Thread Jorge Gorbe via Phabricator via cfe-commits
jgorbe updated this revision to Diff 101437. jgorbe added a comment. Herald added a subscriber: sanjoy. Removed unneeded branch. https://reviews.llvm.org/D30963 Files: lib/Sema/SemaLookup.cpp test/Modules/Inputs/crash-typo-correction-visibility/module.h test/Modules/Inputs/crash-typo-corr

[PATCH] D30963: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls.

2017-06-05 Thread Jorge Gorbe via Phabricator via cfe-commits
jgorbe added inline comments. Comment at: lib/Sema/SemaLookup.cpp:3792-3793 static void checkCorrectionVisibility(Sema &SemaRef, TypoCorrection &TC) { if (TC.begin() == TC.end()) return; rsmith wrote: > jgorbe wrote: > > rsmith wrote: > > > Do we need

r304728 - Factor out and unify emission of "module is unavailable" diagnostics.

2017-06-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jun 5 13:57:56 2017 New Revision: 304728 URL: http://llvm.org/viewvc/llvm-project?rev=304728&view=rev Log: Factor out and unify emission of "module is unavailable" diagnostics. Inspired by post-commit review of r304190. Modified: cfe/trunk/include/clang/Basic/Diagno

Re: r304190 - Diagnose attempts to build a preprocessed module that defines an unavailable submodule.

2017-06-05 Thread Richard Smith via cfe-commits
On 5 June 2017 at 09:35, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, May 29, 2017 at 10:23 PM Richard Smith via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rsmith >> Date: Tue May 30 00:22:59 2017 >> New Revision: 304190 >> >> URL: http://llvm.o

Re: [PATCH] D33708: [test] [libcxx] Disable MSVC++'s compare(a, b) implies !compare(b, a) assertion in predicate application count tests

2017-06-05 Thread Billy O'Neal via cfe-commits
But I actually want the predicate count assertions turned on -- if a user turns off iterator debugging they need to get exactly what the standard asks for, and that means both predicate assertions like this and the Iterator Debug Array Overloads go away. I need to figure out how to do this with ou

[PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-05 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Adding an unsigned offset to a base pointer has undefined behavior if the result of the expression would precede the base. An example from @regehr: int foo(char *p, unsigned offset) { return p + offset >= p; // This may be optimized to '1'. } foo(p, -1); //

[libcxx] r304730 - [test] Remove workaround for C1XX empty parameter pack bug

2017-06-05 Thread Casey Carter via cfe-commits
Author: caseycarter Date: Mon Jun 5 14:59:17 2017 New Revision: 304730 URL: http://llvm.org/viewvc/llvm-project?rev=304730&view=rev Log: [test] Remove workaround for C1XX empty parameter pack bug Was VSO#109062. This bug was filed *4 years ago*. I submitted a workaround to enable the scoped_all

[PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-05 Thread John Regehr via Phabricator via cfe-commits
regehr added a comment. I'm afraid I don't have a better name for this. Here's the obligatory gcc explorer link though: https://godbolt.org/g/s10h0O https://reviews.llvm.org/D33910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: r304726 - Rather than rejecting attempts to run preprocessor-only actions on AST files,

2017-06-05 Thread Evgenii Stepanov via cfe-commits
This change leaks memory: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/5453/steps/check-clang%20asan/logs/stdio On Mon, Jun 5, 2017 at 11:10 AM, Richard Smith via cfe-commits wrote: > Author: rsmith > Date: Mon Jun 5 13:10:11 2017 > New Revision: 304726 > > URL: http://ll

[PATCH] D33913: [index] Index static_assert declarations

2017-06-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. static_assert declarations have to be indexed to gather the declaration references in their assert expression. Repository: rL LLVM https://reviews.llvm.org/D33913 Files: lib/Index/IndexDecl.cpp test/Index/Core/index-source.cpp Index: test/Index/Core/ind

Re: r304726 - Rather than rejecting attempts to run preprocessor-only actions on AST files,

2017-06-05 Thread Richard Smith via cfe-commits
Thanks, investigating. On 5 June 2017 at 13:14, Evgenii Stepanov wrote: > This change leaks memory: > http://lab.llvm.org:8011/builders/sanitizer-x86_64- > linux-fast/builds/5453/steps/check-clang%20asan/logs/stdio > > On Mon, Jun 5, 2017 at 11:10 AM, Richard Smith via cfe-commits > wrote: > >

[PATCH] D33102: [clang] Implement -Wcast-qual for C++

2017-06-05 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. I still feel like that's more testing than would be ideal (does the context of the cast matter? Wether it's dereferenced, a struct member access, assigned, initialized, etc - it doesn't lo

r304740 - Fix memory leak exposed by r304726.

2017-06-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jun 5 17:05:31 2017 New Revision: 304740 URL: http://llvm.org/viewvc/llvm-project?rev=304740&view=rev Log: Fix memory leak exposed by r304726. When giving a ContentCache a null buffer, ignore the DoNotFree flag rather than inheriting it onto whatever buffer we end up usi

Re: r304726 - Rather than rejecting attempts to run preprocessor-only actions on AST files,

2017-06-05 Thread Richard Smith via cfe-commits
Should be fixed in r304740. On 5 June 2017 at 14:09, Richard Smith wrote: > Thanks, investigating. > > On 5 June 2017 at 13:14, Evgenii Stepanov > wrote: > >> This change leaks memory: >> http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux- >> fast/builds/5453/steps/check-clang%20asan/logs

[PATCH] D33875: PR27037: Use correct CVR qualifier on an upcast on method pointer call

2017-06-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaExprCXX.cpp:5108 QualType UseType = isIndirect ? Context.getPointerType(Class) : Class; +UseType = UseType.withCVRQualifiers(LHS.get()->getType().getCVRQualifiers()); ExprValueKind VK = isIndirect ? VK_RValue :

r304745 - Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls

2017-06-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jun 5 17:29:36 2017 New Revision: 304745 URL: http://llvm.org/viewvc/llvm-project?rev=304745&view=rev Log: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls. Make sure that all paths through checkCorrectionVisibility set

[PATCH] D30963: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls replaced by visible decls.

2017-06-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304745: Fix crash when an 'import a module' TypoCorrection has its CorrectionDecls (authored by rsmith). Changed prior to commit: https://reviews.llvm.org/D30963?vs=101437&id=101466#toc Repository: r

[PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Looks good, with a couple of tweaks (and corresponding test changes). Comment at: lib/CodeGen/CGExprScalar.cpp:3910-3911 (Opcode == BO_Add) ? SAddIntrinsic : SMulIntrinsic, {LHS, RHS}); OffsetOverflows = Builder.CreateOr( OffsetOve

[PATCH] D33820: [PowerPC] Pass CPU to assembler with -no-integrated-as

2017-06-05 Thread Eric Christopher via Phabricator via cfe-commits
echristo added a comment. One inline comment otherwise LGTM Comment at: lib/Driver/ToolChains/Gnu.cpp:681 CmdArgs.push_back("-mppc"); -CmdArgs.push_back("-many"); +std::string CPU = getCPUName(Args, getToolChain().getTriple()); +CmdArgs.push_back(ppc::getPPCAsm

[PATCH] D33721: [ARM] Add support for target("arm") and target("thumb").

2017-06-05 Thread Eric Christopher via Phabricator via cfe-commits
echristo accepted this revision. echristo added a comment. This revision is now accepted and ready to land. Ah right. Thanks for looking. LGTM. -eric https://reviews.llvm.org/D33721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://li

[PATCH] D33920: [index] Record C++17 binding declarations

2017-06-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman created this revision. Global binding declarations should be recorded as `variable` symbols. Repository: rL LLVM https://reviews.llvm.org/D33920 Files: lib/Index/IndexDecl.cpp lib/Index/IndexSymbol.cpp test/Index/Core/index-source.cpp Index: test/Index/Core/index-source.cpp

[PATCH] D17215: [Sema] Fix PR14211 Crash for explicit instantiation of overloaded template function within class template

2017-06-05 Thread don hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 101482. hintonda added a comment. Fixes PR14211. Since getMostSpecialized only handles FunctionTemplateDecl matches, keep track of non-FunctionTemplateDecl matches and only call getMostSpecialized if no non-FunctionTemplateDecl matches are found. Added test

[PATCH] D33735: [DebugInfo] Add ThisOrSelf attribute for emission of FlagObjectPointer.

2017-06-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/AST/Decl.h:1387 +IPK_CapturedContext, /// Parameter for captured context +IPK_GeneralParam,/// General implicit parameter + }; I would just call this "Other" and document it as being for kinds

r304756 - Retain header search and preprocessing options from AST file when emitting

2017-06-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jun 5 19:32:01 2017 New Revision: 304756 URL: http://llvm.org/viewvc/llvm-project?rev=304756&view=rev Log: Retain header search and preprocessing options from AST file when emitting preprocessed text for an AST file. Modified: cfe/trunk/include/clang/Frontend/ASTUnit

[PATCH] D17215: [Sema] Fix PR14211 Crash for explicit instantiation of overloaded template function within class template

2017-06-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: lib/Sema/SemaTemplate.cpp:8985 +// FIXME: Would this be considered an almost match as well? +continue; } These continues that you're adding are already at the end of the loop body, so this code

[PATCH] D32109: [Driver] Limit .exe extension addition to Windows hosts

2017-06-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai abandoned this revision. smeenai added a comment. Will just drop the .exe entirely, since that works https://reviews.llvm.org/D32109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D33923: [Driver] Don't force .exe suffix for lld

2017-06-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. When cross-compiling to Windows using lld, we want the driver to invoke it as lld-link rather than lld-link.exe. On Windows, the LLVM fs functions take care of adding the .exe suffix where necessary, so we can just drop the addition in the toolchain entirely. https

[PATCH] D33910: [ubsan] Detect invalid unsigned pointer index expression (clang)

2017-06-05 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 101479. vsk marked 3 inline comments as done. vsk added a comment. Thanks for the review comments. I've changed the calls which use Builder as suggested, and fixed up the tests. It sounds like this patch is in good shape, so I'll commit this after two days prov

[PATCH] D33923: [Driver] Don't force .exe suffix for lld

2017-06-05 Thread Zachary Turner via Phabricator via cfe-commits
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. Seems fine to me. https://reviews.llvm.org/D33923 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D32671: [libcxx] [test] variant: test coverage for LWG2904 and P0602

2017-06-05 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter updated this revision to Diff 101497. CaseyCarter retitled this revision from "[libcxx] [test] variant: test coverage for P0602 extension" to "[libcxx] [test] variant: test coverage for LWG2904 and P0602". CaseyCarter edited the summary of this revision. CaseyCarter added a comment.

[PATCH] D32515: [libcxx] [test] Changes to accommodate LWG 2904 "Make variant move-assignment more exception safe"

2017-06-05 Thread Casey Carter via Phabricator via cfe-commits
CaseyCarter abandoned this revision. CaseyCarter added a comment. Abandoning: these changes have been merged into https://reviews.llvm.org/D32671. https://reviews.llvm.org/D32515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

r304760 - PR33318: Add missing full-expression checking to static_assert expression.

2017-06-05 Thread Richard Smith via cfe-commits
Author: rsmith Date: Mon Jun 5 20:34:24 2017 New Revision: 304760 URL: http://llvm.org/viewvc/llvm-project?rev=304760&view=rev Log: PR33318: Add missing full-expression checking to static_assert expression. This fixes missing lambda-captures for variables referenced only inside a static_assert (

r304761 - [Driver] Don't force .exe suffix for lld

2017-06-05 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Mon Jun 5 21:06:28 2017 New Revision: 304761 URL: http://llvm.org/viewvc/llvm-project?rev=304761&view=rev Log: [Driver] Don't force .exe suffix for lld When cross-compiling to Windows using lld, we want the driver to invoke it as lld-link rather than lld-link.exe. On Window

[PATCH] D33923: [Driver] Don't force .exe suffix for lld

2017-06-05 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304761: [Driver] Don't force .exe suffix for lld (authored by smeenai). Changed prior to commit: https://reviews.llvm.org/D33923?vs=101495&id=101502#toc Repository: rL LLVM https://reviews.llvm.org/

[PATCH] D17215: [Sema] Fix PR14211 Crash for explicit instantiation of overloaded template function within class template

2017-06-05 Thread don hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 101503. hintonda added a comment. - Addressed comments. https://reviews.llvm.org/D17215 Files: lib/Sema/SemaTemplate.cpp test/CXX/temp/temp.decls/temp.mem/p5.cpp Index: test/CXX/temp/temp.decls/temp.mem/p5.cpp

[PATCH] D17215: [Sema] Fix PR14211 Crash for explicit instantiation of overloaded template function within class template

2017-06-05 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. Thanks, looks great. Do you still not have commit access? https://reviews.llvm.org/D17215 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D17215: [Sema] Fix PR14211 Crash for explicit instantiation of overloaded template function within class template

2017-06-05 Thread don hinton via Phabricator via cfe-commits
hintonda added a comment. Great, thanks John. Yes, that's correct -- I do not have commit access. https://reviews.llvm.org/D17215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r304765 - [libcxx] [test] Add _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to msvc_stdlib_force_include.hpp.

2017-06-05 Thread Stephan T. Lavavej via cfe-commits
Author: stl_msft Date: Mon Jun 5 21:46:12 2017 New Revision: 304765 URL: http://llvm.org/viewvc/llvm-project?rev=304765&view=rev Log: [libcxx] [test] Add _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to msvc_stdlib_force_include.hpp. This macro will instruct MSVC's STL to not warn about features that

[PATCH] D33926: [clang] Remove double semicolons. NFC.

2017-06-05 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added a project: clang-c. https://reviews.llvm.org/D33926 Files: lib/AST/Type.cpp lib/Sema/SemaType.cpp Index: lib/Sema/SemaType.cpp === --- lib/Sema/SemaType.cpp +++ lib/Sema/SemaType.cpp @

[PATCH] D33820: [PowerPC] Pass CPU to assembler with -no-integrated-as

2017-06-05 Thread Nemanja Ivanovic via Phabricator via cfe-commits
nemanjai updated this revision to Diff 101508. nemanjai added a comment. Remove the temporary string variable for the CPU. Repository: rL LLVM https://reviews.llvm.org/D33820 Files: lib/Driver/ToolChains/Arch/PPC.cpp lib/Driver/ToolChains/Arch/PPC.h lib/Driver/ToolChains/Gnu.cpp test

[PATCH] D30393: Do not inherit default arguments for friend function in class template.

2017-06-05 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff updated this revision to Diff 101512. sepavloff added a comment. Rebased patch https://reviews.llvm.org/D30393 Files: lib/Sema/SemaDeclCXX.cpp test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp Index: test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp ===